summaryrefslogtreecommitdiffstats
path: root/silpa/modules/dictionary/dictionary.py
diff options
context:
space:
mode:
authorSanthosh Thottingal <santhosh.thottingal@gmail.com>2009-05-12 20:40:32 +0530
committerSanthosh Thottingal <santhosh.thottingal@gmail.com>2009-05-12 20:40:32 +0530
commitf1182c8bc123e9b6690f3fbdc0021468e60ba05d (patch)
tree73acf5ce6f6f0a4046f587fdb28be4e97f49302a /silpa/modules/dictionary/dictionary.py
parentee0f42962618bb4d3b607cc18248957c72f18961 (diff)
downloadRachana.git-f1182c8bc123e9b6690f3fbdc0021468e60ba05d.tar.gz
Rachana.git-f1182c8bc123e9b6690f3fbdc0021468e60ba05d.tar.xz
Rachana.git-f1182c8bc123e9b6690f3fbdc0021468e60ba05d.zip
Various fixes on silpa and new modules-Inexact search
Diffstat (limited to 'silpa/modules/dictionary/dictionary.py')
-rw-r--r--silpa/modules/dictionary/dictionary.py8
1 files changed, 5 insertions, 3 deletions
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):
<h2>English Malayalam Dictionary</h2></hr>
<p>Enter the word to lookup in the dictionary
</p>
- <form action="" method="get">
+ <form action="" method="post">
<input type="text" value="%s" name="word"/>
- <input type="submit" id="Find_Meaning" value="Find Meaning" name="action" style="width:12em;"/>
+ <input type="hidden" name="action" value="Dictionary">
+ <input type="submit" id="Find_Meaning" value="Find Meaning" style="width:12em;"/>
</br>
</form>
"""
if(form.has_key('word')):
- search_key = form['word'].value.decode('utf-8')
+ search_key = form['word'].value
response=response % search_key
response = response+"<h2>Search Results</h2></hr>"
if(search_key==None):