Closed EskenderTamrat closed 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.
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")
It should be written as (![never not] hello)
if you want to exclude more than one word
Thanks. I'm closing the issue.
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>