[
https://issues.apache.org/jira/browse/OPENNLP-1165?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16276553#comment-16276553
]
ASF GitHub Bot commented on OPENNLP-1165:
-----------------------------------------
kottmann closed pull request #293: OPENNLP-1165: Add id to overlapping
annotation exception in Nam…
URL: https://github.com/apache/opennlp/pull/293
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/opennlp-tools/src/main/java/opennlp/tools/namefind/NameSample.java
b/opennlp-tools/src/main/java/opennlp/tools/namefind/NameSample.java
index a1e1d075c..fb6b33b1d 100644
--- a/opennlp-tools/src/main/java/opennlp/tools/namefind/NameSample.java
+++ b/opennlp-tools/src/main/java/opennlp/tools/namefind/NameSample.java
@@ -76,8 +76,8 @@ public NameSample(String id, String[] sentence, Span[] names,
if (this.names.size() > 1) {
for (int i = 1; i < this.names.size(); i++) {
if (this.names.get(i).getStart() < this.names.get(i - 1).getEnd()) {
- throw new RuntimeException(String.format("name spans %s and %s are
overlapped",
- this.names.get(i - 1), this.names.get(i)));
+ throw new RuntimeException(String.format("name spans %s and %s are
overlapped in file: %s",
+ this.names.get(i - 1), this.names.get(i), id));
}
}
}
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> Add filename to overlapping annotation exception in NameSample
> --------------------------------------------------------------
>
> Key: OPENNLP-1165
> URL: https://issues.apache.org/jira/browse/OPENNLP-1165
> Project: OpenNLP
> Issue Type: Improvement
> Components: Name Finder
> Affects Versions: 1.8.3
> Reporter: Peter Thygesen
> Assignee: Peter Thygesen
> Priority: Minor
> Fix For: 1.8.4
>
>
> When reading Brat annotated files I noticed that if I had overlapped
> annotations an exception was thrown, but it did not contain any information
> about in which file the annotation overlap was found.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)