Skip to content
Snippets Groups Projects
Commit ac508c1c authored by Wiktor Walentynowicz's avatar Wiktor Walentynowicz :construction_worker_tone1:
Browse files

Update chunker.py

parent e8763b83
No related merge requests found
...@@ -168,7 +168,7 @@ class Chunker: ...@@ -168,7 +168,7 @@ class Chunker:
for tok_idx, _ in enumerate(sent.tokens()): for tok_idx, _ in enumerate(sent.tokens()):
con.set_position(tok_idx) # for WCCL ops con.set_position(tok_idx) # for WCCL ops
feat_vals = [op.base_apply(con) 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]] for op in self.layer_ops[layer_idx]]
# get IOB2 tags as strings, find non-O IOB2 tag... # get IOB2 tags as strings, find non-O IOB2 tag...
# ...or mark it O # ...or mark it O
...@@ -240,7 +240,7 @@ class Chunker: ...@@ -240,7 +240,7 @@ class Chunker:
for tok_idx, _ in enumerate(sent.tokens()): for tok_idx, _ in enumerate(sent.tokens()):
con.set_position(tok_idx) con.set_position(tok_idx)
feat_vals = [op.base_apply(con) 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]] for op in self.layer_ops[layer_idx]]
classify.eat_token(model, feat_vals) classify.eat_token(model, feat_vals)
classify.close_sent(model) classify.close_sent(model)
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment