use of org.omegat.core.statistics.FindMatches in project omegat by omegat-org.
the class FindMatchesThread method search.
@Override
protected List<NearString> search() throws Exception {
if (!project.isProjectLoaded()) {
// project is closed
return Collections.emptyList();
}
if (project.getSourceTokenizer() == null) {
return null;
}
long before = System.currentTimeMillis();
try {
FindMatches finder = new FindMatches(project, OConsts.MAX_NEAR_STRINGS, true, false);
List<NearString> result = finder.search(processedEntry.getSrcText(), true, true, this::isEntryChanged);
LOGGER.finer(() -> "Time for find matches: " + (System.currentTimeMillis() - before));
return result;
} catch (FindMatches.StoppedException ex) {
throw new EntryChangedException();
}
}
Aggregations