From abf6c8d483e98437bbc5cd65cba37c5d0a6d243c Mon Sep 17 00:00:00 2001 From: Andrew McLoud Date: Tue, 20 Jun 2017 09:56:30 -0400 Subject: [PATCH] updated offset to return length plus one character to match standard slicing syntax. --- corenlp.iml | 18 ++++++++++++++++-- src/corenlp.cljc | 2 +- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/corenlp.iml b/corenlp.iml index 1a8d0db..fae23ab 100644 --- a/corenlp.iml +++ b/corenlp.iml @@ -14,23 +14,37 @@ - + + + + + + + + + + + + + - + + + diff --git a/src/corenlp.cljc b/src/corenlp.cljc index 1c21424..94fce25 100644 --- a/src/corenlp.cljc +++ b/src/corenlp.cljc @@ -129,7 +129,7 @@ {:token (.get tok-ann CoreAnnotations$TextAnnotation) :named-entity (.get tok-ann CoreAnnotations$NamedEntityTagAnnotation) :start-offset (.beginPosition tok-ann) - :end-offset (dec (.endPosition tok-ann))}) + :end-offset (.endPosition tok-ann)}) (defn- get-token-annotations "Passes TokenAnnotations extracted from SentencesAnnotation to get-tokens-entities