nlplab / nersuite

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

Fail gracefully on unexpected input #8

Open spyysalo opened 12 years ago

spyysalo commented 12 years ago

While testing #6, noted that if NERsuite is provided with labeled examples in tag mode, the system just crashes with a segmentation fault. As this is a pretty easy mistake to make, it would be nice if it failed more gracefully, e.g. giving a descriptive error message.

To replicate, run

cat DATA-WITH-LABELS | nersuite tag -m model

for some DATA-WITH-LABELS that works find with

cut -f 2- DATA-WITH-LABELS | nersuite tag -m model

the result is a crash with segfault.