Commit 20965dbb authored by Michal Čihař's avatar Michal Čihař

Use ignore list for similar lookup

parent 26f2abfd
......@@ -208,7 +208,7 @@ class UnitManager(models.Manager):
ret = set([unit.checksum])
with trans.search.get_source_searcher() as searcher:
# Extract up to 10 terms from the source
terms = [kw for kw, score in searcher.key_terms_from_text('source', unit.source, numterms = 10)]
terms = [kw for kw, score in searcher.key_terms_from_text('source', unit.source, numterms = 10) if not kw in IGNORE_SIMILAR]
cnt = len(terms)
# Try to find 10 similar string, remove up to 4 words
while len(ret) < 10 and cnt > 0 and len(terms) - cnt < 4:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment