models icon indicating copy to clipboard operation
models copied to clipboard

Error in reading full conll line or incorrect sentence batching #Syntaxnet

Open smaransmarty opened this issue 10 years ago • 8 comments

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

smaransmarty avatar Jun 01 '16 08:06 smaransmarty

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 avatar Jun 02 '16 13:06 andorardo

@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.

smaransmarty avatar Jun 02 '16 14:06 smaransmarty

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.

calberti avatar Jun 22 '16 15:06 calberti

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

smaransmarty avatar Jun 23 '16 14:06 smaransmarty

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

vivekdatla avatar Jul 29 '16 16:07 vivekdatla

Have you checked the format of your file? Does it follow the CoNLL format with 8 tab-separated columns?

slavpetrov avatar Aug 13 '16 08:08 slavpetrov

Closing. Please reopen if you can help us reproduce the error.

calberti avatar Aug 26 '16 16:08 calberti

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

scarroll32 avatar Apr 23 '17 12:04 scarroll32