From 2c10cf2f88a8a7285c12a54c434ef354afdc0992 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCrer=20=C3=96zen?= Date: Sat, 4 Nov 2006 12:37:48 +0000 Subject: [PATCH] =?UTF-8?q?ayn=C4=B1=20s=C3=B6zc=C3=BC=C4=9F=C3=BC=20birde?= =?UTF-8?q?n=20fazla=20d=C3=B6nd=C3=BCrme?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pisi/search/preprocess.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pisi/search/preprocess.py b/pisi/search/preprocess.py index b3790325..97964091 100644 --- a/pisi/search/preprocess.py +++ b/pisi/search/preprocess.py @@ -20,7 +20,10 @@ def normalize(lang, terms): terms = map(lambda x: unicode(x).lower(), terms) if lang == "tr": locale.setlocale(locale.LC_CTYPE, old_locale) - return terms + unique_terms = set() + for term in terms: + unique_terms.add(unicode(term)) + return list(unique_terms) def preprocess(lang, str): terms = tokenize.tokenize(lang, str)