searcher.addStartPaths(scratchArc, fst.outputs.add(path.output, scratchArc.output), false, path.input); searcher.addStartPaths(path.fstNode, path.output, true, path.input);
searcher.addStartPaths(scratchArc, fst.outputs.add(path.output, scratchArc.output), false, path.input); searcher.addStartPaths(path.fstNode, path.output, true, path.input);
searcher.addStartPaths(scratchArc, fst.outputs.add(path.output, scratchArc.output), false, path.input); searcher.addStartPaths(path.fstNode, path.output, true, path.input);
searcher.addStartPaths(arc, prefixOutput, true, new IntsRefBuilder());
searcher.addStartPaths(scratchArc, fst.outputs.add(path.output, scratchArc.output), false, path.input); searcher.addStartPaths(path.fstNode, path.output, true, path.input);
searcher.addStartPaths(scratchArc, fst.outputs.add(path.output, scratchArc.output), false, path.input); searcher.addStartPaths(path.fstNode, path.output, true, path.input);
searcher.addStartPaths(scratchArc, fst.outputs.add(path.output, scratchArc.output), false, path.input); searcher.addStartPaths(path.fstNode, path.output, true, path.input);
searcher.addStartPaths(path.fstNode, path.output, false, path.input, scorer.weight.boost(), scorer.weight.context());
public void addStartPaths(FST.Arc<T> node, T startOutput, boolean allowEmptyString, IntsRefBuilder input) throws IOException { addStartPaths(node, startOutput, allowEmptyString, input, 0, null, -1); }
public void addStartPaths(FST.Arc<T> node, T startOutput, boolean allowEmptyString, IntsRefBuilder input) throws IOException { addStartPaths(node, startOutput, allowEmptyString, input, 0, null); }
public void addStartPaths(FST.Arc<T> node, T startOutput, boolean allowEmptyString, IntsRefBuilder input) throws IOException { addStartPaths(node, startOutput, allowEmptyString, input, 0, null); }
/** Starting from node, find the top N min cost * completions to a final node. */ public static <T> TopResults<T> shortestPaths(FST<T> fst, FST.Arc<T> fromNode, T startOutput, Comparator<T> comparator, int topN, boolean allowEmptyString) throws IOException { // All paths are kept, so we can pass topN for // maxQueueDepth and the pruning is admissible: TopNSearcher<T> searcher = new TopNSearcher<>(fst, topN, topN, comparator); // since this search is initialized with a single start node // it is okay to start with an empty input path here searcher.addStartPaths(fromNode, startOutput, allowEmptyString, new IntsRefBuilder()); return searcher.search(); }
/** Starting from node, find the top N min cost * completions to a final node. */ public static <T> TopResults<T> shortestPaths(FST<T> fst, FST.Arc<T> fromNode, T startOutput, Comparator<T> comparator, int topN, boolean allowEmptyString) throws IOException { // All paths are kept, so we can pass topN for // maxQueueDepth and the pruning is admissible: TopNSearcher<T> searcher = new TopNSearcher<>(fst, topN, topN, comparator); // since this search is initialized with a single start node // it is okay to start with an empty input path here searcher.addStartPaths(fromNode, startOutput, allowEmptyString, new IntsRefBuilder()); return searcher.search(); }
/** Starting from node, find the top N min cost * completions to a final node. */ public static <T> TopResults<T> shortestPaths(FST<T> fst, FST.Arc<T> fromNode, T startOutput, Comparator<T> comparator, int topN, boolean allowEmptyString) throws IOException { // All paths are kept, so we can pass topN for // maxQueueDepth and the pruning is admissible: TopNSearcher<T> searcher = new TopNSearcher<>(fst, topN, topN, comparator); // since this search is initialized with a single start node // it is okay to start with an empty input path here searcher.addStartPaths(fromNode, startOutput, allowEmptyString, new IntsRefBuilder()); return searcher.search(); }
public void addStartPaths(FST.Arc<T> node, T startOutput, boolean allowEmptyString, IntsRefBuilder input) throws IOException { addStartPaths(node, startOutput, allowEmptyString, input, 0, null, -1); }
/** Starting from node, find the top N min cost * completions to a final node. */ public static <T> TopResults<T> shortestPaths(FST<T> fst, FST.Arc<T> fromNode, T startOutput, Comparator<T> comparator, int topN, boolean allowEmptyString) throws IOException { // All paths are kept, so we can pass topN for // maxQueueDepth and the pruning is admissible: TopNSearcher<T> searcher = new TopNSearcher<>(fst, topN, topN, comparator); // since this search is initialized with a single start node // it is okay to start with an empty input path here searcher.addStartPaths(fromNode, startOutput, allowEmptyString, new IntsRefBuilder()); return searcher.search(); }