You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importwarningswarnings.filterwarnings("ignore")
importosos.environ["TOKENIZERS_PARALLELISM"] ="false"fromdiscopy.grammar.pregroupimportSpider, Ty, Id, Box, Diagram, WordfromlambeqimportDepCCGParser, pregroupsfromlambeqimportTreeReader, TreeReaderModereader=TreeReader(mode=TreeReaderMode.RULE_ONLY)
sent="Avoiding processed and sugary foods is important for reducing the risk of chronic diseases such as diabetes , obesity , and heart disease ."tree_diagram=reader.sentence2diagram(sent,suppress_exceptions=False)
print(tree_diagram)
which gives the error: Illegal use of UNK: unknown CCG rule.
However, if we run the same program with the following sentence after removing "the", it runs succesffuly.
...
sent="Avoiding processed and sugary foods is important for reducing risk of chronic diseases such as diabetes , obesity , and heart disease ."
...
My attempt to debug the issue has reached a point where the conjunction in "and sugary food" was causing the error by having mismtach CCGRule type in "call" function in CCGRule class. Not sure why this is happening and how to solve it. Any ideas?
Thanks!
The text was updated successfully, but these errors were encountered:
Hi @abuzomol and thanks for spotting this. There is indeed an issue in Bobcat, which seems it's missing a translation for a special case of conjunction. We will look at this and fix it soon.
I have been trying run this code:
which gives the error: Illegal use of UNK: unknown CCG rule.
However, if we run the same program with the following sentence after removing "the", it runs succesffuly.
My attempt to debug the issue has reached a point where the conjunction in "and sugary food" was causing the error by having mismtach CCGRule type in "call" function in CCGRule class. Not sure why this is happening and how to solve it. Any ideas?
Thanks!
The text was updated successfully, but these errors were encountered: