yanshao9798 / tagger

A Joint Chinese segmentation and POS tagger based on bidirectional GRU-CRF
151 stars 44 forks source link

KeyError: 'local_conv' #6

Closed GabrielLin closed 6 years ago

GabrielLin commented 6 years ago

After I finishing training, with command

python -u tagger.py train -p ud1 -t train.txt -d dev.txt -wv -cp -rd -gru -m model_ud1 -emb Embeddings/glove.txt

there are some model checkpoint files located in ud1 folder.

However, when I run python tagger.py test -p ud1 -e test.txt -m gru_full_ud1 -emb Embeddings/glove.txt it show an error

('Encoding: ', 'utf-8') Traceback (most recent call last): File "tagger.py", line 256, in raise Exception('No model file or weights file under the name of ' + model_file + '.') Exception: No model file or weights file under the name of gru_full_ud1.

I know that it may be something wrong about the parameter and I change to run python tagger.py test -p ud1 -e test.txt -m model_ud1 -emb Embeddings/glove.txt

then I got another error

('Encoding: ', 'utf-8') Traceback (most recent call last): File "tagger.py", line 286, in local_conv = param_dic['local_conv'] KeyError: 'local_conv'

Could you please give me some suggestions, thanks.

yanshao9798 commented 6 years ago

It is a small bug in the code, now it should be fixed.