/** Build lookup from a dictionary. Some implementations may require sorted * or unsorted keys from the dictionary's iterator - use * {@link SortedInputIterator} or * {@link UnsortedInputIterator} in such case. */ public void build(Dictionary dict) throws IOException { build(dict.getEntryIterator()); }
/** Build lookup from a dictionary. Some implementations may require sorted * or unsorted keys from the dictionary's iterator - use * {@link SortedTermFreqIteratorWrapper} or * {@link UnsortedTermFreqIteratorWrapper} in such case. */ public void build(Dictionary dict) throws IOException { BytesRefIterator it = dict.getWordsIterator(); TermFreqIterator tfit; if (it instanceof TermFreqIterator) { tfit = (TermFreqIterator)it; } else { tfit = new TermFreqIterator.TermFreqIteratorWrapper(it); } build(tfit); }
lookup.build(dictionary); if (storeDir != null) { File target = new File(storeDir, factory.storeFileName());
lookup.build(dictionary); if (storeDir != null) { File target = new File(storeDir, factory.storeFileName());