attardi / deepnl

Deep Learning for Natural Language Processing
GNU General Public License v3.0
457 stars 116 forks source link

ValueError: Buffer has wrong number of dimensions (expected 2, got 1) #8

Closed kiran-surya closed 8 years ago

kiran-surya commented 9 years ago

I'm facing following error while testing:

[ec2-user@ip-172-31-54-168 deepnl-master]$ time python bin/dl-ner.py ner.dnn < ~/data/test.iob > ~/data/test.out.iob Traceback (most recent call last): File "bin/dl-ner.py", line 342, in main() File "bin/dl-ner.py", line 337, in main ConllWriter.write(tagger.tag(sent)) File "/home/ec2-user/deepnl-master/bin/../build/lib.linux-x86_64-2.7/deepnl/ner_tagger.py", line 60, in tag tags = self.toIOB(self.tag_sequence(sent)) File "deepnl/tagger.pyx", line 61, in deepnl.tagger.Tagger.tag_sequence (deepnl/tagger.cpp:2650) cdef np.ndarray[INT_t,ndim=2] seq = self.converter.convert(tokens) ValueError: Buffer has wrong number of dimensions (expected 2, got 1)

real 0m5.887s user 0m5.552s sys 0m0.332s

kiran-surya commented 9 years ago

Could this be testing data specific problem ?

kiran-surya commented 9 years ago

Is this data specific issue ??

kiran-surya commented 9 years ago

Any idea on this ?

attardi commented 9 years ago

I suspect it is a problem withe the format of your data. Make sure it is in CoNLL 2003 format.