[ 
https://issues.apache.org/jira/browse/OPENNLP-1271?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17123877#comment-17123877
 ] 

Jeffrey T. Zemerick commented on OPENNLP-1271:
----------------------------------------------

[~smrazaabbas] Thanks for reporting the issue. Would you be able to provide 
some code to duplicate the problem?

>From an initial look, make sure that the {{CharSequence}} being passed to 
>{{getCoveredText()}} is the same text that the {{Span}} was created from. 

> Illegal Argument Exception
> --------------------------
>
>                 Key: OPENNLP-1271
>                 URL: https://issues.apache.org/jira/browse/OPENNLP-1271
>             Project: OpenNLP
>          Issue Type: Bug
>          Components: Name Finder
>            Reporter: Raza Abbas
>            Priority: Major
>             Fix For: 1.9.3
>
>
> I am using this library in some production code. I am getting the following 
> exception once in a while, so I am not being able to reproduce it exactly 
> always. 
>  
> java.lang.IllegalArgumentException: The span [18..23) is outside the given 
> text which has length 12!
> at opennlp.tools.util.Span.getCoveredText(Span.java:231)
> at opennlp.tools.util.Span.spansToStrings(Span.java:351)
> at 
> opennlp.tools.tokenize.AbstractTokenizer.tokenize(AbstractTokenizer.java:25)
> at opennlp.tools.tokenize.TokenizerME.tokenize(TokenizerME.java:76)
>  
>  
> This seems like an internal OpenNLP issue, and not how I'm using the library. 
> Any help would be appreciated. Thanks. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to