diff --git a/iobber/chunker.py b/iobber/chunker.py index 6bdbd426f866ba990bf7daa2eb994e57e00492b3..9f5aac9ef664bd0e8fbdefca6cf0ae179bf67e34 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)