monikkinom/ner-lstm

how to run this project.

narvin opened this issue · 11 comments

hello sir.
you have did great work to post this code.
but i am getting this error.
please help me!
File "model.py", line 123, in
train(parser.parse_args())
File "model.py", line 81, in train
train_inp, train_out = get_train_data()
File "/home/narvin123/ner-lstm-master/input.py", line 6, in get_train_data
emb = pickle.load(open('embeddings/train_embed.pkl', 'rb'))
IOError: [Errno 2] No such file or directory: 'embeddings/train_embed.pkl'

you need to generate the embeddings from the training dataset first. Example if it is the conll dataset. Run the get_conll_embeddings.py to generate the embeddings and use them as input to train the model.

when ihave tried to run resize_input .py file as following im getting error
python resize_input.py --input /home/kusum/Desktop/codes/ner-lstm-master/data/input/ --output /home/kusum/Desktop/codes/ner-lstm-master/data/output/ --trim 70
Traceback (most recent call last):
File "resize_input.py", line 55, in
remove_crap(args.input)
File "resize_input.py", line 7, in remove_crap
f = open(input_file)
IOError: [Errno 21] Is a directory: '/home/kusum/Desktop/codes/ner-lstm-master/data/input/'

when i run this python resize_input.py --input JAMSHEDPUR00.text --output output1 --trim 50
after this output is like this why it is so
0 sentences trimmed out of 0 total sentences

Iam also getting this error
python hindi_util.py --format ssf --input hindi_ssf_corpus.txt --dist 3
Traceback (most recent call last):
File "hindi_util.py", line 14, in
assert len(args.dist) == 3
AssertionError

when i run this command python hindi_util.py --format ssf --input hindi_ssf_corpus.txt
then it will not give any error but
giving file which has no data

python2 hindi_util.py --format text --input fullnews_id_
Traceback (most recent call last):
File "hindi_util.py", line 12, in
open('hin.text', 'w').write(wxc.convert(open(args.input).read()))
File "/home/kusum/.local/lib/python2.7/site-packages/wxconv/wx_format.py", line 226, in convert
return self.transform(line)
File "/home/kusum/.local/lib/python2.7/site-packages/wxconv/wx.py", line 2922, in utf2wx
unicode_ = self.normalize(unicode_)
File "/home/kusum/.local/lib/python2.7/site-packages/wxconv/wx.py", line 1798, in normalize
text = text.replace('\uFEFF', '') # BYTE_ORDER_MARK
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe0 in position 20: ordinal not in range(128)