RelEx2Logic clean-up-inst implementation

Specified in http://wiki.opencog.org/w/RelEx2Logic#Cleaning_Up_Instances

Hi Amen,

the "noun" "adj" "adv" words are all defined as ConceptNodes...

Ruiting Lian


On Fri, Jun 6, 2014 at 12:18 PM, AmeBel <notifications@github.com> wrote:

> In opencog/nlp/scm/relex-to-logic-post-processing.scm:
>
> > +; Check if a word instance has definite flag
> > +(define (definite? word-inst)
> > +	; get the list of DefinedLinguisticConceptNode connected to word-inst
> > +	(define ling-concept-list (word-inst-get-attr word-inst))
> > +	; for each item in ling-concept-list, want to check if name is "definite"
> > +	(list-index (lambda (a-node) (string=? "definite" (cog-name a-node))) ling-concept-list)
> > +)
> > +
> > +; -----------------------------------------------------------------------
> > +; Check if a word instance can be removed
> > +(define (cleanable? word-inst)
> > +	(or
> > +		(and (not (definite? word-inst)) (word-inst-match-pos? word-inst "noun"))
> > +		(word-inst-match-pos? word-inst "adj")
> > +		(word-inst-match-pos? word-inst "adv")
> > +	)
>
> why only 'adj' and 'adv' ?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/opencog/opencog/pull/825/files#r13476001>.
>