From e2ebf2b5a8f1a94fc06c4d6fadba71b7539d75ac Mon Sep 17 00:00:00 2001 From: Adam Radziszewski <adam.radziszewski@pwr.wroc.pl> Date: Mon, 8 Oct 2012 11:16:02 +0200 Subject: [PATCH] assert expected classifier response --- iobber/chunker.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/iobber/chunker.py b/iobber/chunker.py index e049369..aacdd2f 100644 --- a/iobber/chunker.py +++ b/iobber/chunker.py @@ -227,6 +227,8 @@ class Chunker: non_O_tag, non_O_chan = decsn_array elif len(decsn_array) == 3: non_O_tag, non_O_chan, is_head = decsn_array + else: + raise IOError('Unexpected label returned from classifier: ' + decsn) for chan_name in chans: chan = asent.get_channel(chan_name) # TODO: rename the from_string in corpus2 and fix it here -- GitLab