private boolean lookup() { /****** * debugging code String thisLookup = word.toString(); boolean added = * lookups.add(thisLookup); if (!added) { * System.out.println("######extra lookup:" + thisLookup); // occaasional * extra lookups aren't necessarily errors... could happen by diff * manipulations // throw new RuntimeException("######extra lookup:" + * thisLookup); } else { // System.out.println("new lookup:" + thisLookup); * } ******/ matchedEntry = dict_ht.get(word.getArray(), 0, word.size()); return matchedEntry != null; }
private DictEntry wordInDict() { /*** * if (matchedEntry != null) { if (dict_ht.get(word.getArray(), 0, * word.size()) != matchedEntry) { * System.out.println("Uh oh... cached entry doesn't match"); } return * matchedEntry; } ***/ if (matchedEntry != null) return matchedEntry; DictEntry e = dict_ht.get(word.getArray(), 0, word.length()); if (e != null && !e.exception) { matchedEntry = e; // only cache if it's not an exception. } // lookups.add(word.toString()); return e; }
final Analyzer analyzer = dtsAnalyzer.get(dt); if (reusableCharArray == null) { reusableCharArray = new ReusableCharArrayReader(termAtt.buffer(), 0, termAtt.length());
final Analyzer analyzer = dtsAnalyzer.get(dt); if (reusableCharArray == null) { reusableCharArray = new ReusableCharArrayReader(termAtt.buffer(), 0, termAtt.length());
inputSegment.write(zzBuffer, zzStartRead, length); entitySegment.clear(); char ch = entityValues.get(zzBuffer, zzStartRead, length).charValue(); entitySegment.append(ch); outputSegment = entitySegment;
DictEntry entry = dict_ht.get(term, 0, len); if (entry != null) { if (entry.root != null) {