You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Robert Muir (Updated) (JIRA)" <ji...@apache.org> on 2011/12/26 21:18:30 UTC

[jira] [Updated] (LUCENE-3668) offsets issues with multiword synonyms

     [ https://issues.apache.org/jira/browse/LUCENE-3668?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robert Muir updated LUCENE-3668:
--------------------------------

    Attachment: LUCENE-3668_test.patch

here's 2 tests, one for the old impl, one for the new one:

In this case we have national hockey league = nhl.

desired behavior:
||token||posIncr||startOffset||endOffset||
|national|1|0|8|
|nhl|0|0|*22*|
|hockey|1|9|15|
|league|1|16|22|

current behavior (FST impl):
||token||posIncr||startOffset||endOffset||
|national|1|0|8|
|nhl|0|0|*8*|
|hockey|1|9|15|
|league|1|16|22|

old impl:
||token||posIncr||startOffset||endOffset||
|national|1|0|22|
|nhl|0|0|22|
|hockey|1|0|22|
|league|1|0|22|

>From the offsets perspective, nhl is only getting the offsets of national (endoffset=8) but it would be bettter if it got endoffset=22.

Using the old impl imo is no workaround, the offsets are crazy (each individual word gets 0-22). But i think we should just leave it be and try to improve the new one.
                
> offsets issues with multiword synonyms
> --------------------------------------
>
>                 Key: LUCENE-3668
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3668
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: modules/analysis
>            Reporter: Robert Muir
>         Attachments: LUCENE-3668_test.patch
>
>
> as reported on the list, there are some strange offsets with FSTSynonyms, in the case of multiword synonyms.
> as a workaround it was suggested to use the older synonym impl, but it has bugs too (just in a different way).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org