Metaphor recognition software aims to distinguish friend from foe