By context, just as is done in every single case where intent is an element in a crime. If I throw a baseball and strike someone in the head and kill him, is it murder? That depends on intent. How do you infer intent? Context matters. If I did it on a street corner to someone I just found out what banging my wife, context suggests I intended to kill him or at least to cause him potentially mortal injury. If I did it in a ballgame to a dear friend, with all appearances of an accidental wild pitch, that's different.