Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ghost - Numbers inside contexts cause errors while parsing. #32

Closed
Brook4846 opened this issue Oct 24, 2018 · 2 comments
Closed

Ghost - Numbers inside contexts cause errors while parsing. #32

Brook4846 opened this issue Oct 24, 2018 · 2 comments

Comments

@Brook4846
Copy link

Brook4846 commented Oct 24, 2018

Recreated from opecog #3267

guile> (ghost-parse "u: (Its 5pm) good timing!")

Backtrace:
           8 (apply-smob/1 #<catch-closure 21ed060>)
           7 (apply-smob/1 #<catch-closure 1e149c0>)
In ice-9/boot-9.scm:
   2312:4  6 (save-module-excursion #<procedure 21ef860 at ice-9/eva…>)
In ice-9/eval-string.scm:
     38:6  5 (read-and-eval #<input: string 21dd5b0> #:lang _)
In opencog/ghost.scm:
    264:2  4 (ghost-parse _)
In system/base/lalr.upstream.scm:
  1930:25  3 (_ _ _)
In unknown file:
           2 (scm-error misc-error #f "~A ~S" ("Syntax error: un…" …) …)
In ice-9/boot-9.scm:
   751:25  1 (dispatch-exception 0 misc-error (#f "~A ~S" ("Sy…" …) …))
In unknown file:
           0 (apply-smob/1 #<catch-closure 1e148a0> misc-error #f "…" …)

ERROR: In procedure apply-smob/1:
Syntax error: unexpected token :  #<lexical-token category: NUM source: #<source-location input: #f line: 0 column: 7 offset: 24 length: #f> value: "5">
ABORT: misc-error

While numbers in the middle or at the end of a word in a context (as opposed to numbers that come at the beginning of a word or alone) execute well.

guile> (ghost-parse "u: (how much is4846) Too much.")
guile> (ghost "how much is4846")
(SentenceNode "sentence@d9dd958b-3842-4084-b44b-b880ec7ea2e8")
guile> (ghost-run)
guile> (ghost-get-result)
((WordNode "Too")
(WordNode "much")
(WordNode ".")
)

@Brook4846 Brook4846 changed the title Ghost - Numbers inside phrases create errors while parsing. Ghost - Numbers inside contexts cause errors while parsing. Oct 24, 2018
@leungmanhin
Copy link
Member

I may have broke it accidentally at some point, should now be fixed in #33

@Brook4846
Copy link
Author

#33 Solves it indeed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants