opennlp-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tri Nguyen <ytedie...@gmail.com>
Subject Re: Name finder position
Date Sat, 05 Nov 2011 15:53:57 GMT
Hi Jörn,
Obama is correct, but Bill Gates. Since the NameFinderME return the token
index (position in the token array) not the keyword position (the keyword
position in the text). I want to cooperate with keyword position in Lucene.

Best Regards,

Tri.


On Sat, Nov 5, 2011 at 10:38 PM, Jörn Kottmann <kottmann@gmail.com> wrote:

> On 11/5/11 4:33 PM, Tri Nguyen wrote:
>
>> Can I have the word position of a token?
>> ex: word position of token [Bill] should be 12. word position of token
>> [he]
>> should be 6.
>>
>
> Well, looks like I am missing something, but isn't that what
> NameFinderME.find returns?
> It gives back an array of Spans where each span has a start and end offset
> in your input
> token array.
>
> Your sample:
>
>
> [Barack]    [Obama]    [is]    [president]    [of]    [US]    [,]    [he]
> [was]    [born]    [August]    [4]    [,]    [1961]    [.]    [Bill]
> [Gates]    [found]    [Microsoft]    [on]    [April]    [4]    [,]
>  [1975]
> [.]
>
> Here the Span for Obama would be start=0 and end=2.
>
> Jörn
>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message