opencog/opencog — pull request #974 by williampma (2014-08-05 03:40:30+00:00)
Title: RelEx2Logic that-rule post-processing version 2

Based on #930

Implemented the `ReferenceLink` solution for that-rule. Changed SVP-rule to output `EvaluationLink` to fit. However, that means adjective like "happy" could be both a `PredicateNode` (from SVP-rule) and a `ConceptNode` (from admod-rule), as resulted from different sentences. Not sure how this can be handled.

Basically the same as described on the wiki http://wiki.opencog.org/w/Claims_and_contexts except that more are included in the `ReferenceLink`. Namely, all indirectly related links are include, so using the example sentence from the wiki, the link

```
InheritanceLink
ConceptNode dogs@444
ConceptNode small@555
```
will be inside the `ReferenceLink`
```
ReferenceLink
ReferenceNode $that-pQrs123
AndLink
EvaluationLink
PredicateNode fly@666
ListLink
ConceptNode dogs@444
InheritanceLink
ConceptNode dogs@444
ConceptNode small@555
```

Instead of `ReferenceNode`, currently using `VariableNode` as a placeholder. This can be changed easily after `ReferenceNode` is officially created.

P.S. Still won't solve the `that(know, be)` problem.