You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opennlp.apache.org by jo...@apache.org on 2018/05/30 11:25:01 UTC
[opennlp-sandbox] branch master updated: Adjust encoding to match
BioCodec (Java)
This is an automated email from the ASF dual-hosted git repository.
joern pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/opennlp-sandbox.git
The following commit(s) were added to refs/heads/master by this push:
new e483e9f Adjust encoding to match BioCodec (Java)
e483e9f is described below
commit e483e9fc8e54d930718a9a170bcb2afe204e336f
Author: Jörn Kottmann <jo...@apache.org>
AuthorDate: Wed May 30 13:24:38 2018 +0200
Adjust encoding to match BioCodec (Java)
---
tf-ner-poc/src/main/python/namefinder.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tf-ner-poc/src/main/python/namefinder.py b/tf-ner-poc/src/main/python/namefinder.py
index 8b9a73a..e4a015e 100644
--- a/tf-ner-poc/src/main/python/namefinder.py
+++ b/tf-ner-poc/src/main/python/namefinder.py
@@ -98,9 +98,9 @@ class NameFinder:
label = ["other"] * len(name_sample.tokens)
for name in name_sample.names:
- label[name[0]] = "B-" + name[2]
+ label[name[0]] = name[2] + "-start"
for i in range(name[0] + 1, name[1]):
- label[i] = "I-" + name[2]
+ label[i] = name[2] + "-cont"
sentences.append(sentence)
labels.append(label)
--
To stop receiving notification emails like this one, please contact
joern@apache.org.