From ac508c1c8dab046997dac214f90648d19e0e3738 Mon Sep 17 00:00:00 2001 From: Wiktor Walentynowicz <wiktor.walentynowicz@pwr.edu.pl> Date: Tue, 11 Feb 2020 00:06:20 +0000 Subject: [PATCH] Update chunker.py --- iobber/chunker.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/iobber/chunker.py b/iobber/chunker.py index 6bdbd42..9f5aac9 100644 --- a/iobber/chunker.py +++ b/iobber/chunker.py @@ -168,7 +168,7 @@ class Chunker: for tok_idx, _ in enumerate(sent.tokens()): con.set_position(tok_idx) # for WCCL ops feat_vals = [op.base_apply(con) - .to_compact_string(self.tagset).decode('utf-8') + .to_compact_string(self.tagset) for op in self.layer_ops[layer_idx]] # get IOB2 tags as strings, find non-O IOB2 tag... # ...or mark it O @@ -240,7 +240,7 @@ class Chunker: for tok_idx, _ in enumerate(sent.tokens()): con.set_position(tok_idx) feat_vals = [op.base_apply(con) - .to_compact_string(self.tagset).decode('utf-8') + .to_compact_string(self.tagset) for op in self.layer_ops[layer_idx]] classify.eat_token(model, feat_vals) classify.close_sent(model) -- GitLab