deep-crf
deep-crf copied to clipboard
Make stdin and stdout available for prediction
When we predict named entity tags using named entity tagger such as CRF ++, KyTea and KNP, stdin and stdout are used for inputting target data and outputting prediction results. Therefore, it seems to be good to make stdin and stdout available for inputting target data and outputting prediction results when we predict those.
You mean we should use logging for prediction?
The current prediction command is as follows:
$ deep-crf predict input_raw_file.txt --delimiter=' ' --model_filename ./save_model_dir/bilstm-cnn-crf_adam_epoch3.model --save_dir save_model_dir --save_name bilstm-cnn-crf_adam --predicted_output predicted.txt
I think it would be better to be able to also use the following command:
$ deep-crf predict --delimiter=' ' --model_filename ./save_model_dir/bilstm-cnn-crf_adam_epoch3.model --save_dir save_model_dir --save_name bilstm-cnn-crf_adam < input_raw_file.txt > predicted.txt
FYI: Prediction command of KyTea:
kytea -model trained_model.model < input_raw_file.txt > predicted.txt