google / sling

SLING - A natural language frame semantics parser
Apache License 2.0
1.93k stars 268 forks source link

Problem with myelin/compute.cc #206

Closed g3rfx closed 6 years ago

g3rfx commented 6 years ago

I tried to run the following simple example in Python:

import sling
parser = sling.Parser("path/to/sempar.flow")
text = raw_input("John loves Mary.")
doc = parser.parse(text)
print doc.frame.data(pretty=True)
for m in doc.mentions:
    print "mention", doc.phrase(m.begin, m.end)`

However, I get the following error message:

[2018-06-29 22:18:29.036153: F sling/myelin/compute.cc:1823] Check failed: cell != nullptr Unknown cell: features
Aborted

Thank you in advance for any help on this issue.

OS: Ubuntu 16.04 GCC: 5.4.0 Sling: 2.0.0 (from caspar branch)

ringgaard commented 6 years ago

The caspar branch is not compatible with sempar from the master branch, so you cannot use sempar.flow with the parser runtime in caspar.

We are in the process of switching to a new implementation of the parser trainer using pytorch instead of tensorflow and dragnn. When we have a stable version, we will try to make a new pre-trained parser available.

g3rfx commented 6 years ago

May I suggest updating the example in the caspar branch until the new pre-trained parser is available to prevent confusion? https://github.com/google/sling/blob/caspar/doc/guide/install.md

ringgaard commented 6 years ago

Good point. I have updated install.md to mention that the pre-trained model for caspar is not yet available.