Error in reading full conll line or incorrect sentence batching #Syntaxnet
I have run a batch of 20000 sentences to the dependency parser. The POS tagger works perfectly fine as expected.
The Parser throws an error in
syntaxnet/text_formats.cc:111] Check failed: fields.size() >= 8 (4 vs. 8)Every line has to have at least 8 tab separated fields
I tried debugging and the input file has required number of tabs but the value passed to the ConvertFromString is incomplete. I didnot try going further however I wonder if the batching handles splitting conll sentences correctly.
Any ideas or notes would help
Hi Smaran,
Can you pipe the output of the tagger to a file and then check that the resulting conll file is well formed? Also, it would be great as a sanity check to ensure the tagged corpus contains the same number of sentences as your input corpus.
Daniel
@andorardo I have checked the tagger output. It is wellformed. I even added traces in text_formats.cc. It looks like the value passed to the ConvertFromString function doesnot have the full conll sentence.
Were you able to make any progress with this? If you could attach an input conll file and a way to reproduce this error, we can investigate further.
Well i didnt experiment further, just removed the batching and ran the parser on smaller files. I can try to give a file where this issue is reproducible. Just need to check if i can make the data public
I'm trying to run the syntaxnet from the docker image given on the website. I get the following error when i add "--conll" to "demo.sh". Just wondering is there a way to overcome this error. Attached is my output.
I syntaxnet/embedding_feature_extractor.cc:36] Embedding names: other;prefix2;prefix3;suffix2;suffix3;words I syntaxnet/embedding_feature_extractor.cc:37] Embedding dims: 8;16;16;16;16;64 I syntaxnet/term_frequency_map.cc:101] Loaded 64036 terms from syntaxnet/models/parsey_mcparseface/word-map. F syntaxnet/text_formats.cc:111] Check failed: fields.size() >= 8 (1 vs. 8)Every line has to have at least 8 tab separated fields. INFO:tensorflow:Total processed documents: 0 INFO:tensorflow:Read 0 documents
Have you checked the format of your file? Does it follow the CoNLL format with 8 tab-separated columns?
Closing. Please reopen if you can help us reproduce the error.
To recreate:
Run Syntaxnet in a Docker container
docker run -ti --rm -p 8888:8888 tensorflow/syntaxnet bash
Run demo.sh with a sample sentence, it works:
echo "Bob, a resident of Yorkshire, loves his wife and children" | bash syntaxnet/demo.sh
.
.
INFO:tensorflow:Read 1 documents
Input: Bob , a resident of Yorkshire , loves his wife and children
Parse:
loves VBZ ROOT
+-- Bob NNP nsubj
| +-- , , punct
| +-- resident NN appos
| | +-- a DT det
| | +-- of IN prep
| | +-- Yorkshire NNP pobj
| +-- , , punct
+-- wife NN dobj
+-- his PRP$ poss
+-- and CC cc
+-- children NNS conj
Now try to run it with the --conll flag
echo "Bob, a resident of Yorkshire, loves his wife and children" | bash syntaxnet/demo.sh --conll
It errors:
2017-04-23 12:56:12.893325: I syntaxnet/term_frequency_map.cc:101] Loaded 64036 terms from syntaxnet/models/parsey_mcparseface/word-map.
2017-04-23 12:56:12.947861: I syntaxnet/term_frequency_map.cc:101] Loaded 64036 terms from syntaxnet/models/parsey_mcparseface/word-map.
2017-04-23 12:56:12.950424: F syntaxnet/text_formats.cc:138] Check failed: fields.size() >= 8 (1 vs. 8)Every line has to have at least 8 tab separated fields.
INFO:tensorflow:Total processed documents: 0
INFO:tensorflow:Read 0 documents