nlplab / nersuite

http://nersuite.nlplab.org/
Other
26 stars 12 forks source link

have problem using -l option #31

Open tina123147 opened 8 years ago

tina123147 commented 8 years ago

It is successful when I train one file by using command "nersuite learn -m ~/models/train1.m < ~/train/data.nersuite". But when I try to train NER for a list of files by -l option, there have some problems.

I create Gellus.txt to store the relative path and both .nersuite files and Gellus.txt are under ~/train. When I use command "nersuite learn -m ~/models/train1.m -l ~/train/Gellus.txt ", it stop in "start feature extraction". I saw the former question about -l option, so I try this "sudo nersuite learn -m ~/models/train1.m -l ~/train/Gellus.txt ", it shows " nersuite: error while loading shared libraries: libcrfsuite-0.12.so: cannot open shared object file: No such file or directory ". I use "echo $LD_LIBRARY_PATH" it shows " /usr/local/lib "

How can I deal with this problem? Thanks

priancho commented 8 years ago

Hi tina123147,

nersuite may be reading Gellus.txt file as input data too. Can you please try it after moving Gellus.txt file out of ~/train directory?

For example, 1) using the following Gellus.txt file: myaccount@myserver ~]$ cat Gellus.txt ~/train/data.nersuite and 2) the following command: nersuite learn -m ~/models/train1.m -l ~/Gellus.txt.

If you still have a problem, please let me know.

tina123147 commented 8 years ago

Hi priancho,

I tried your advice to move ~/train/Gellus.txt to ~/Gellus.txt , but it still stop at "start feature extraction". In Gellus.txt, I just put one file "train/data.nersuite" (and i also tried "~/train/data.nersuite").

it's still the same problem that it works when I use "nersuite learn -m ~/models/train1.m < ~/train/data.nersuite", but did not work for "nersuite learn -m ~/models/train11.m -l ~/Gellus.txt" though they are the same file in different ways.

Actually, this problem(stop at feature extraction process) happens when I use command "nersuite learn -m ~/models/train1.m ~/train/data.nersuite" without "<".

Thanks

priancho commented 8 years ago

Hi tina123147,

I looked at the source code and found that -l option is not properly handled. (Probably I accidentally used an old source code during commit that does not implement -l option)

I will fix this bug soon, but as a quick solution, can you please merge input data and use standard input or -f option?

Best wishes, Han-Cheol

tina123147 commented 8 years ago

Ok, Could you please inform me when you fix this problem? Thanks.