Constructor and Description |
---|
Util.TopNSearcher(FST<T> fst,
int topN,
int maxQueueDepth,
Comparator<T> comparator)
Creates an unbounded TopNSearcher
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
acceptResult(IntsRef input,
T output) |
protected void |
addIfCompetitive(Util.FSTPath<T> path) |
void |
addStartPaths(FST.Arc<T> node,
T startOutput,
boolean allowEmptyString,
IntsRefBuilder input)
Adds all leaving arcs, including 'finished' arc, if
the node is final, from this node into the queue.
|
Util.TopResults<T> |
search() |
public Util.TopNSearcher(FST<T> fst, int topN, int maxQueueDepth, Comparator<T> comparator)
fst
- the FST
to search ontopN
- the number of top scoring entries to retrievemaxQueueDepth
- the maximum size of the queue of possible top entriescomparator
- the comparator to select the top Nprotected void addIfCompetitive(Util.FSTPath<T> path)
public void addStartPaths(FST.Arc<T> node, T startOutput, boolean allowEmptyString, IntsRefBuilder input) throws IOException
IOException
public Util.TopResults<T> search() throws IOException
IOException
Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.