From f1182c8bc123e9b6690f3fbdc0021468e60ba05d Mon Sep 17 00:00:00 2001 From: Santhosh Thottingal Date: Tue, 12 May 2009 20:40:32 +0530 Subject: Various fixes on silpa and new modules-Inexact search --- silpa/modules/dictionary/dictionary.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'silpa/modules/dictionary/dictionary.py') diff --git a/silpa/modules/dictionary/dictionary.py b/silpa/modules/dictionary/dictionary.py index 7ba877a..4de0f76 100644 --- a/silpa/modules/dictionary/dictionary.py +++ b/silpa/modules/dictionary/dictionary.py @@ -28,6 +28,7 @@ import pickle class Dictionary(SilpaModule): def lookup_en_ml(self, key): + key=key.lower() self.dictFile=os.path.dirname(__file__) + "/data/dict.dat" pickled_dict=open(self.dictFile,'r') self.dictionary=pickle.load(pickled_dict) @@ -44,14 +45,15 @@ class Dictionary(SilpaModule):

English Malayalam Dictionary

Enter the word to lookup in the dictionary

-
+ - + +
""" if(form.has_key('word')): - search_key = form['word'].value.decode('utf-8') + search_key = form['word'].value response=response % search_key response = response+"

Search Results

" if(search_key==None): -- cgit