aonotas / deep-crf

An implementation of Conditional Random Fields (CRFs) with Deep Learning Method
http://deep-crf.com
MIT License
167 stars 48 forks source link

TypeError: coercing to Unicode: need string or buffer, list found #50

Open masakuri opened 6 years ago

masakuri commented 6 years ago

When I run the following command to predict, I got this error. $ deep-crf predict data/predict --delimiter=' ' --model_filename ./save_model_dir/bilstm-cnn-crf_adam_epoch43.model --save_dir save_model_dir/ --save_name bilstm-cnn-crf_adam --predicted_output predicted43.txt --gpu 0

data/predict is the following data format.

SOCCER - JAPAN GET LUCKY WIN , CHINA IN SURPRISE DEFEAT .
Nadim Ladki
AL-AIN , United Arab Emirates 1996-12-06
Japan began the defence of their Asian Cup title with a lucky 2-1 win against Syria in a Group C championship match on Friday .
But China saw their luck desert them in the second match of the group , crashing to a surprise 2-0 defeat to newcomers Uzbekistan .

I have no idea to solve it. Any ideas? Thank you.

aonotas commented 6 years ago

Hi, thank you for your report. I notice that I also get the same error. I will try to fix it.

@massongit Do you have any idea to solve this error?

aonotas commented 6 years ago

I'm sorry. I found the bug and I fix it now. Please use recent commit version? @masakuri

If you have further problems, Please let me know.

massongit commented 6 years ago

Fixed commit: https://github.com/aonotas/deep-crf/commit/845def4439bad3d674ab5d711784b3336ca3612d

Note: If you wish to associate an issue or PR with a commit, you should include "#{issue (PR) number}" in the commit message.

masakuri commented 6 years ago

It worked! Thank you for your help.