singnet / opencog

A framework for integrated Artificial Intelligence & Artificial General Intelligence (AGI)
http://wiki.opencog.org/w/Development
Other
14 stars 3 forks source link

Ghost - Negation in the middle of sentence #37

Closed EskenderTamrat closed 5 years ago

EskenderTamrat commented 5 years ago

Recreated from https://github.com/opencog/opencog/issues/3269

Negation (unless it is in the start of sentence) gives syntax error

scheme@(guile-user) > (ghost-parse "u: ( !never eat meat ) good ^keep") scheme@(guile-user) > (ghost-parse "u: ( I !never eat meat ) good ^keep") ERROR: In procedure scm-error: Syntax error: unexpected token : #<lexical-token category: NOT source: #<source-location input: #f line: 0 column: 6 offset: 35 length: #f> value: #f>

leungmanhin commented 5 years ago

The syntax of the rule is not valid indeed. Negation checks for absence of words for the whole input, but not between two words.

EskenderTamrat commented 5 years ago

Yeah, that's correct. But this also leads to a similar syntax error if we want to check absence of two or more words like the ff.

guile> (ghost-parse "u: (!never !not hello) answer ^keep")

leungmanhin commented 5 years ago

It should be written as (![never not] hello) if you want to exclude more than one word

EskenderTamrat commented 5 years ago

Thanks. I'm closing the issue.