Hi everyone,

I'm pretty sure we had this discussion last year and that it was fixed! Basically, whenever any NameFinder recognises a single word token the resulting span is something like this:
 (#<Span [3..3)> #<Span [6..6)>)

while I think it should have been (#<Span [3..4)> #<Span [6..7)>).
As a result the following exception is thrown : StringIndexOutOfBoundsException String index out of range: -1 java.lang.AbstractStringBuilder.substring (AbstractStringBuilder.java:872)


I am 99% positive that we've fixed this in the past...at least my private openNLP build behaves as expected. Just in case I'm doing something wrong here are my steps:

- create a RegexNameFinder passing the following regexes in an array: "\d+", "\w+ive?" -call find on it passing the following text in an array ["azestapine" "treatment" "is" "10" "times" "more" "effective" "."]
-I get back the aformentioned spans  (#<Span [3..3)> #<Span [6..6)>)
-trying to convert them to string-array (via Span/spansToStrings) doesn't work!


any ideas? This is quite important isn't it?

Jim

Reply via email to