tokens: In artificial intelligence and cognitive science , the " structure mapping engine " ( " SME " ) is an implementation in software of an algorithm for analogical matching based on the psychological theory of Dedre Gentner .