nlplab / nersuite

http://nersuite.nlplab.org/
Other
26 stars 12 forks source link

Updated nersuite_tokenizer exit codes to meet unix conventions. #36

Closed c4eater closed 5 years ago

c4eater commented 5 years ago

The current exit codes, which are, 0 after help invocation and non-0 (# of processed lines) after normal text processing, are not consistent with Unix conventions and with Makefile workflow. 0 should be used for indicating a success, and non-0 for indicating a failure/inability to continue. The current set of exit codes does not allow to build nersuite_tokenizer into a unix pipeline:

nersuite_tokenizer < input.txt | nersuite_gtagger | nersuite tag <...>

This pipeline always breaks at the first command due to nersuite_tokenizer returning non-0, so currently the user needs a hack like returning a bogus 0 exit code:

nersuite_tokenizer < input.txt; (exit 0) | nersuite_gtagger | nersuite tag <...>