[
https://issues.apache.org/jira/browse/LUCENE-3714?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Michael McCandless updated LUCENE-3714:
---------------------------------------
Attachment: LUCENE-3714.patch
Patch, generalizing to a topN search from the wFST (not just top 1). I fixed
the random test to randomly pick a topN and it's passing!
I think the cost is something like O(N * L) + O(N * log(N)), where N is the top
N and L is the length of each completion. The N * log(N) is because I use a
TreeSet (PQ wasn't enough: I needed pollFirst and pollLast... for 3.x that'll
have to be 2 method calls...)... but I suspect in practice it won't dominate,
since N is typically smaller than L and the constant in front of that is tiny...
Each path requires a traversal through the FST looking for the arcs with
NO_OUTPUT, so if the FST has many non-competitive arcs that will definitely
slow it down (by a [possibly large] constant factor). We need to test on a
real data set how slow it is....
> add suggester that uses shortest path/wFST instead of buckets
> -------------------------------------------------------------
>
> Key: LUCENE-3714
> URL: https://issues.apache.org/jira/browse/LUCENE-3714
> Project: Lucene - Java
> Issue Type: New Feature
> Components: modules/spellchecker
> Reporter: Robert Muir
> Attachments: LUCENE-3714.patch, LUCENE-3714.patch, out.png
>
>
> Currently the FST suggester (really an FSA) quantizes weights into buckets
> (e.g. single byte) and puts them in front of the word.
> This makes it fast, but you lose granularity in your suggestions.
> Lately the question was raised, if you build lucene's FST with
> positiveintoutputs, does it behave the same as a tropical semiring wFST?
> In other words, after completing the word, we instead traverse min(output) at
> each node to find the 'shortest path' to the
> best suggestion (with the highest score).
> This means we wouldnt need to quantize weights at all and it might make some
> operations (e.g. adding fuzzy matching etc) a lot easier.
--
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: [email protected]
For additional commands, e-mail: [email protected]