opencog/opencog — pull request #1105 by williampma (2014-11-17 09:19:16+00:00)
Title: SuReal: handling of multiple mapping of equal link type

Fixes #1058, added handling of mappings by generating all combinations, and remove mappings where the same node get replaced with different words more than once.

```
(r2l "The ugly cat climbs the stairs and grabs the mouse.")
(sureal (SetLink
(EvaluationLink (stv 0.99000001 0.99000001)
(PredicateNode "climbs" (stv 0.001 0.99000001))
(ListLink (stv 0.99000001 0.99000001)
(ConceptNode "robot" (stv 0.001 0.99000001))
(ConceptNode "tree" (stv 0.001 0.99000001))
)
)
(EvaluationLink (stv 0.99000001 0.99000001)
(PredicateNode "grabs" (stv 0.001 0.99000001))
(ListLink (stv 0.99000001 0.99000001)
(ConceptNode "robot" (stv 0.001 0.99000001))
(ConceptNode "apple" (stv 0.001 0.99000001))
)
)
))
```
returns
```
#
```

while
```
(r2l "The mad dog hates the tree and the yellow cat loves the flower.")
(sureal (SetLink (InheritanceLink (ConceptNode "dog") (ConceptNode "yellow")) (InheritanceLink (ConceptNode "cat") (ConceptNode "mad"))))
```
returns
```
#
```