Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable combination of input data and prediction result #25

Open
massongit opened this issue Oct 11, 2017 · 2 comments
Open

Enable combination of input data and prediction result #25

massongit opened this issue Oct 11, 2017 · 2 comments

Comments

@massongit
Copy link
Contributor

massongit commented Oct 11, 2017

In this tool's prediction results, only predicted labels are displayed now.
However, I think that it is more convenient to be able to also display input data.

For Example (--enable_combined_input is option of combination of input data and prediction result):

$ cat predict input_file_multi.txt
Barack  NN
Hussein NN 
Obama   NN
is      VBZ
a       DT
man     NN 
.       . 

Yuji  NN B−PERSON 
Matsumoto NN E−PERSON 
is      VBZ O 
a       DT  O 
man     NN  O 
.       .   O
$ deep-crf predict input_file_multi.txt --delimiter=' ' --input_idx 0,1 --output_idx 2 --model_filename ./save_model_dir/bilstm-cnn-crf_multi_epoch3.model --save_dir save_model_dir --save_name bilstm-cnn-crf_multi  --predicted_output predicted.txt --enable_combined_input
$ cat predicted.txt
Barack  NN B−PERSON 
Hussein NN I−PERSON 
Obama   NN E−PERSON
is      VBZ O 
a       DT  O 
man     NN  O 
.       .   O

Yuji  NN B−PERSON 
Matsumoto NN E−PERSON 
is      VBZ O 
a       DT  O 
man     NN  O 
.       .   O
@aonotas
Copy link
Owner

aonotas commented Oct 12, 2017

OK.
Thank you for your help!
I don't have time time, I will reply and merge your some PR tomorrow.

@indiclinguist
Copy link

Is this option --enable_combined_input implemented? if so, what is the usage command for getting the output_idx as 0,2 (word, chunk) in case of the training data is in 0,1,2 (word, pos, chunk) format?
Thanks in advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants