deep-crf icon indicating copy to clipboard operation
deep-crf copied to clipboard

Make stdin and stdout available for prediction

Open massongit opened this issue 8 years ago • 2 comments

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.

massongit avatar Nov 28 '17 09:11 massongit

You mean we should use logging for prediction?

aonotas avatar Dec 02 '17 23:12 aonotas

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

massongit avatar Dec 03 '17 00:12 massongit