summaryrefslogtreecommitdiffstats
path: root/silpa/modules/transliterator
diff options
context:
space:
mode:
authorSanthosh Thottingal <santhosh.thottingal@gmail.com>2009-07-19 18:32:04 +0530
committerSanthosh Thottingal <santhosh.thottingal@gmail.com>2009-07-19 18:32:04 +0530
commitc8a17ee264a269a59651936b34a960f4d40a9074 (patch)
tree3b2b21be4668f50a5c5f307c89e42323b8a8c292 /silpa/modules/transliterator
parent05f7f938168f9b3195c9b101f4b98f298ab2e981 (diff)
downloadRachana.git-c8a17ee264a269a59651936b34a960f4d40a9074.tar.gz
Rachana.git-c8a17ee264a269a59651936b34a960f4d40a9074.tar.xz
Rachana.git-c8a17ee264a269a59651936b34a960f4d40a9074.zip
JSON RPC Based new architecture and corresponding changes
Diffstat (limited to 'silpa/modules/transliterator')
-rwxr-xr-xsilpa/modules/transliterator/__init__.py6
-rwxr-xr-x[-rw-r--r--]silpa/modules/transliterator/transliterate.py5
2 files changed, 10 insertions, 1 deletions
diff --git a/silpa/modules/transliterator/__init__.py b/silpa/modules/transliterator/__init__.py
new file mode 100755
index 0000000..1c040cb
--- /dev/null
+++ b/silpa/modules/transliterator/__init__.py
@@ -0,0 +1,6 @@
+#! /usr/bin/env python
+# -*- coding: utf-8 -*-
+
+from transliterate import *
+
+
diff --git a/silpa/modules/transliterator/transliterate.py b/silpa/modules/transliterator/transliterate.py
index 1b534cf..aa10e02 100644..100755
--- a/silpa/modules/transliterator/transliterate.py
+++ b/silpa/modules/transliterator/transliterate.py
@@ -72,7 +72,10 @@ class Transliterator(SilpaModule):
words=text.split(" ")
for word in words:
if(word.strip()>""):
- src_lang_code=ld.detect_lang(word)[word]
+ try:
+ src_lang_code=ld.detect_lang(word)[word]
+ except:
+ continue #FIXME
if((target_lang_code=="en_US") and (src_lang_code=="ml_IN")):
tx_str=tx_str + self.transliterate_ml_en(word)
continue