int distance = editDistance(textDesc.toLowerCase(), fbDescriptions[0].toLowerCase());
Counter<String> tokenEditDistanceFeatures = TokenLevelMatchFeatures.extractFeatures(textDesc, fbDescriptions[0]);
if ((popularity > 0 || distance == 0) && TokenLevelMatchFeatures.diffSetSize(textDesc, fbDescriptions[0]) < 4) {
res.add(new EntityLexicalEntry(textDesc, textDesc, ArrayUtils.asSet(fbDescriptions), formula, EntrySource.LUCENE, popularity, distance, types, tokenEditDistanceFeatures));
}
}
Collections.sort(res, new LexicalEntryComparator());
return res.subList(0, Math.min(res.size(), opts.maxEntries));
}