summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSanthosh Thottingal <santhosh.thottingal@gmail.com>2009-03-26 22:41:18 +0530
committerSanthosh Thottingal <santhosh.thottingal@gmail.com>2009-03-26 22:41:18 +0530
commitc57278172003f9d4aa1171197dd1242e836d43b7 (patch)
treee2067ec3aad4515aaf4dbdf6a8920231bb1f6922
parent02d0626ee9a64e4393db1e311f355ac5e0b041f5 (diff)
downloadRachana.git-c57278172003f9d4aa1171197dd1242e836d43b7.tar.gz
Rachana.git-c57278172003f9d4aa1171197dd1242e836d43b7.tar.xz
Rachana.git-c57278172003f9d4aa1171197dd1242e836d43b7.zip
unwanted files
-rw-r--r--silpa/www/css/print.css51
-rw-r--r--silpa/www/dot.pngbin44493 -> 0 bytes
-rw-r--r--silpa/www/index.py33
-rw-r--r--silpa/www/js/common.js21
-rw-r--r--silpa/www/modules/__init__.py3
-rw-r--r--silpa/www/modules/lemmatizer/__init__.py4
-rw-r--r--silpa/www/modules/lemmatizer/lemmatizer.py121
-rw-r--r--silpa/www/modules/lemmatizer/lemmatizer_ml.rules193
-rw-r--r--silpa/www/silpa.conf20
-rw-r--r--silpa/www/templates/__init__.py3
-rw-r--r--silpa/www/templates/default/silpa.html119
-rw-r--r--silpa/www/templates/template.py124
-rw-r--r--silpa/www/utils/__init__.py4
-rw-r--r--silpa/www/utils/langdetect.py76
14 files changed, 0 insertions, 772 deletions
diff --git a/silpa/www/css/print.css b/silpa/www/css/print.css
deleted file mode 100644
index c15f500..0000000
--- a/silpa/www/css/print.css
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
-LEGAL
-=====
-Copyright: Daemon Pty Limited 2006, http://www.daemon.com.au
-Community: Mollio http://www.mollio.org $
-License: Released Under the "Common Public License 1.0",
-http://www.opensource.org/licenses/cpl.php
-License: Released Under the "Creative Commons License",
-http://creativecommons.org/licenses/by/2.5/
-License: Released Under the "GNU Creative Commons License",
-http://creativecommons.org/licenses/GPL/2.0/
-*/
-
-
-body {font: 10pt arial,tahoma,verdana,sans-serif}
-h1, h2, h3, h4, h5, h6 {margin: 1em 0 .2em;font-family: arial,tahoma,verdana,sans-serif}
-
-* {float:none;position:static;width:auto;background:#fff}
-p {margin: 0 0 1em}
-img {border:none;display:block;margin: .5em 0}
-dt {font-weight:bold}
-
-#nav, #search, #nav-secondary, #breadcrumb, #poweredby {display:none}
-
-/* =LINKS */
-a {border:none}
-a,a:link,a:link,a:link,a:hover {background:transparent;text-decoration:underline;cursor:pointer}
-a:link {color:#5291c4}
-a:visited {color:#666}
-a:hover {color:#ff9900;border:none}
-a:active {color:#0066cc}
-
-.teaserBox {clear:both;margin: 0 0 1em}
-
-.sponsors img {margin: .5em 0}
-
-#footer {margin: 1em 0}
-
-#header {border-bottom: 3px solid #c00}
-
-/* TABLES */
-table {font-size: 9pt;margin: 0 0 1em;border-collapse:collapse}
- table th {border-bottom: 3px solid #000;vertical-align:top;padding: 1.5em 3px 3px;line-height:1.1;font: bold 145% arial;letter-spacing:0;text-align:left}
- .table1 th.time {border-bottom: none;font: bold 89% verdana;color:#ff9c00;vertical-align:top;padding: 3px}
- .table1 td {border: 1px solid #ddd;font-size: 9pt;padding: 3px;vertical-align:top}
- .table1 td a {display:block;width:auto;font-weight:bold}
- .table1 td a:link, .table1 td a:visited, .table1 td a:hover, .table1 td a:active {border:none;text-decoration:none}
- .table1 th.sub {background: #aaa}
- .table1 th.sub2 {background: #bbb;color:#000}
- .table1 td ul li {background: #fff}
-
diff --git a/silpa/www/dot.png b/silpa/www/dot.png
deleted file mode 100644
index 69a000b..0000000
--- a/silpa/www/dot.png
+++ /dev/null
Binary files differ
diff --git a/silpa/www/index.py b/silpa/www/index.py
deleted file mode 100644
index edf0582..0000000
--- a/silpa/www/index.py
+++ /dev/null
@@ -1,33 +0,0 @@
-#! /usr/bin/env python
-# -*- coding: utf-8 -*-
-
-from common import *
-from utils import *
-import traceback
-import cgitb
-import cgi
-cgitb.enable()
-def index(form):
- if(form.has_key('action')):
- action=form['action'].value
- else:
- action=None
- response=SilpaResponse()
- if(action):
- module_manager=ModuleManager()
- module_instance = module_manager.getModuleInstance(action)
- if(module_instance):
- response.setBreadcrumb(module_instance.get_module_name())
- response.setContent(module_instance.process(form))
- response.setErrorMessage(module_instance.get_errormessage())
- response.setSuccessMessage(module_instance.get_successmessage())
- else:
- response.setBreadcrumb("Coming Soon")
- response.setErrorMessage("Module not available")
- response.setContent(None)
- response.setSuccessMessage(None)
- return response.toString();
-
-if __name__ == '__main__':
- print "Content-Type: text/html\n\n"
- print index(cgi.FieldStorage()).encode('utf-8')
diff --git a/silpa/www/js/common.js b/silpa/www/js/common.js
deleted file mode 100644
index 40ab87e..0000000
--- a/silpa/www/js/common.js
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
-son of suckerfish menu script from:
-http://www.htmldog.com/articles/suckerfish/dropdowns/
- */
-
- sfHover = function() {
- var sfEls = document.getElementById("nav").getElementsByTagName("LI");
- for (var i=0; i<sfEls.length; i++) {
- sfEls[i].onmouseover=function() {
- this.className+=" sfhover";
- this.style.zIndex=200; //this line added to force flyout to be above relatively positioned stuff in IE
- }
- sfEls[i].onmouseout=function() {
- this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
- }
- }
-}
-if (window.attachEvent) window.attachEvent("onload", sfHover);
-
-
-
diff --git a/silpa/www/modules/__init__.py b/silpa/www/modules/__init__.py
deleted file mode 100644
index a436dc9..0000000
--- a/silpa/www/modules/__init__.py
+++ /dev/null
@@ -1,3 +0,0 @@
-#! /usr/bin/env python
-# -*- coding: utf-8 -*-
-from lemmatizer import *
diff --git a/silpa/www/modules/lemmatizer/__init__.py b/silpa/www/modules/lemmatizer/__init__.py
deleted file mode 100644
index 3e77cd8..0000000
--- a/silpa/www/modules/lemmatizer/__init__.py
+++ /dev/null
@@ -1,4 +0,0 @@
-#! /usr/bin/env python
-# -*- coding: utf-8 -*-
-import lemmatizer
-
diff --git a/silpa/www/modules/lemmatizer/lemmatizer.py b/silpa/www/modules/lemmatizer/lemmatizer.py
deleted file mode 100644
index c1ca78f..0000000
--- a/silpa/www/modules/lemmatizer/lemmatizer.py
+++ /dev/null
@@ -1,121 +0,0 @@
-#! /usr/bin/env python
-# -*- coding: utf-8 -*-
-
-import sys
-import codecs
-import os
-import string
-import curses.ascii
-from common import SilpaModule
-class Lemmatizer(SilpaModule):
-
- def __init__(self):
- self.rules_file = "./modules/lemmatizer/lemmatizer_ml.rules"
- self.rulesDict = dict()
-
- def lemmatize(self, text):
- result = ""
- self.rulesDict = self.LoadRules()
- words=text.split(" ")
- word_count=len(words)
- word_iter=0
- word=""
- while word_iter < word_count:
- word = words[word_iter]
- word = self.trim(word)
- word_length = len(word)
- suffix_pos_itr = 2
- while suffix_pos_itr < word_length :
- suffix = word[suffix_pos_itr:word_length]
- if suffix in self.rulesDict:
- word= word[0:suffix_pos_itr] + self.rulesDict[suffix]
- break;
- suffix_pos_itr = suffix_pos_itr+1
- word_iter = word_iter+1
- #print word
- result = result + word + " "
- return result
-
- def LoadRules(self):
- print "Loading the rules..."
- rules_dict = dict()
- line = []
- line_number = 0
- rule_number = 0
- rules_file = codecs. open(self.rules_file,encoding='utf-8', errors='ignore')
- while 1:
- line_number = line_number +1
- text = unicode( rules_file.readline())
- if text == "":
- break
- if text[0] == '#':
- continue #this is a comment - ignore
- text = text.split("#")[0] #remove the comment part of the line
- line_number = line_number +1
- line = text.strip() # remove unwanted space
- if(line == ""):
- continue
- if(len(line.split("=")) != 2):
- print "[Error] Syntax Error in the Rules. Line number: ", line_number
- print "Line: "+ text
- continue
- lhs = line.split("=") [ 0 ] .strip()
- rhs = line.split("=") [ 1 ] .strip()
- if(len(rhs)>0):
- if(lhs[0]=='"'):
- lhs=lhs[1:len(lhs)] # if the string is "quoted"
- if(lhs[len(lhs)-1]=='"'):
- lhs=lhs[0:len(lhs)-1] # if the string is "quoted"
- if(len(rhs)>0):
- if(rhs[0]=='"'):
- rhs=rhs[1:len(rhs)] # if the string is "quoted"
- if(rhs[len(rhs)-1]=='"'):
- rhs=rhs[0:len(rhs)-1] # if the string is "quoted"
- rule_number=rule_number+1
- rules_dict[lhs]=rhs
- #print "[", rule_number ,"] " +lhs + " : " +rhs
- print "Found ",rule_number, " rules."
- return rules_dict
-
- def trim(self,word):
- punctuations=['~','!','@','#','$','%','^','&','*','(',')','-','+','_','=','{','}','|' ,':',';','<','>','\,','.','?']
- word=word.strip()
- index=len(word)-1
- while index>0:
- if word[index] in punctuations:
- word=word[0:index]
- else:
- break
- index=index-1
- return word
- def process(self, form):
- response = """
- <h2>Lemmatization</h2></hr>
- <p>Enter the text for lemmatization in the below text area.
- Language of each word will be detected.
- You can give the text in any language and even with mixed language
- </p>
- <form action="" method="post">
- <textarea cols='100' rows='25' name='input_text' id='id1'>%s</textarea>
- <input type="submit" id="Lemmatize" value="Lemmatize" name="action" style="width:12em;"/>
- <input type="reset" value="Clear" style="width:12em;"/>
- </br>
- </form>
- """
- if(form.has_key('input_text')):
- text = action=form['input_text'].value .decode('utf-8')
- response=response % text
- result = self.lemmatize(text)
- response = response+"<h2>Lemmatization Results</h2></hr>"
- response = response+"<p>"+result+"</p>"
- else:
- response=response % ""
- return response
-
-def getInstance():
- return Lemmatizer()
-if __name__ == "__main__":
- lemmatizer= Lemmatizer()
- lemmatizer.rules_file="/home/santhosh/www/malayalam.map"
- lemmatizer.lemmatize("മുദ്രാവാക്യവുമായി മുറ്റത്തില്‍")
-
diff --git a/silpa/www/modules/lemmatizer/lemmatizer_ml.rules b/silpa/www/modules/lemmatizer/lemmatizer_ml.rules
deleted file mode 100644
index 5bfc40d..0000000
--- a/silpa/www/modules/lemmatizer/lemmatizer_ml.rules
+++ /dev/null
@@ -1,193 +0,0 @@
-#Malayalam Prathyaya Rules
-$min_root_length=1
-$iterations=1
-#അനുസ്വാരത്തിലവസാനിക്കുന്ന ക്രിയ/നാമം
-ത്തില്‍ = ം
-ത്ത്=ം
-ത്തു്=ം
-ത്തു=ം
-ത്തെ = ം
-വുമായി = ം
-ത്തിനെ=ം
-ത്തിലെ=ം
-ത്തിലേയ്ക്ക് =ം
-ത്തിലേയ്ക്കു്= ം
-ത്തേക്ക്=ം
-ത്തിന്റെ=ം
-ത്തേയ്ക്കു്=ം
-ത്തിലായി= ം
-മാക്കി=ം
-മായും=ം
-മെങ്കില്‍=ം എങ്കില്‍
-വും=ം
-മാണു് = ം ആണു്
-മാണ്=ം ആണ്
-മല്ല = ം അല്ല
-മില്ല = ം ഇല്ല
-മേ =ം
-മാകാം = ം ആകാം
-മായിരിക്കും=ം‌ ആയിരിക്കുക
-മുണ്ടായിരുന്നതായി=ം ഉണ്ടു് ആവുക
-മുണ്ടായി=ം ഉണ്ടു് ആവുക
-മുണ്ടായിരുന്ന=ം ഉണ്ടു് ആവുക
-മുണ്ടായിരുന്നു=ം ഉണ്ടു് ആവുക
-മുള്ള=ം ഉണ്ടാവുക
-മോ = ം
-മെ = ം
-ങ്ങളില്‍= ം
-ങ്ങള്‍ = ം
-ങ്ങളെ=ം
-ങ്ങള്‍ക്ക്=ം
-ങ്ങള്‍ക്കു്=ം
-ുകള്‍ = ു്
-#ക്രിയകള്‍
-യ്ക്കുന്ന = യ്ക്കുക
-ക്കുന്ന = ക്കുക
-#ചില്ലിലവസാനിക്കുന്ന നാമങ്ങള്‍
-രില്‍ = ര്‍
-രാണു് = ര്‍ ആണു്
-രാണ് = ര്‍ ആണ്
-രല്ല = ര്‍ അല്ല
-രില്ല = ര്‍ ഇല്ല
-രുടെ = ര്‍
-രുടേ = ര്‍
-രു് = ര്‍
-രെ = ര്‍
-രോടു് = ര്‍
-രൊടു് = ര്‍
-രൊട് = ര്‍
-രോട് = ര്‍
-രാല്‍ = ര്‍
-രോ = ര്‍
-രും=ര്‍
-നില്‍ = ന്‍
-നാണു് = ന്‍ ആണു്
-നാണ്=ന്‍ ആണ്
-നല്ല = ന്‍ അല്ല
-നില്ല= ന്‍ ഇല്ല
-നുടെ = ന്‍
-നുടേ= ന്‍
-നോടു് = ന്‍
-നോട് = ന്‍
-നായി = ന്‍ ആയി
-നോ =ന്‍
-നും=ന്‍
-ലാണു്= ല്‍ ആണു്
-ലാണ് = ല്‍ ആണ്
-ലല്ല= ല്‍ അല്ല
-ലില്ല = ല്‍ ഇല്ല
-ലില്‍ = ല്‍
-ലിന്റെ = ല്‍
-ലോട് = ല്‍
-ലോടു് = ല്‍
-ലായി=ല്‍ ആയി
-ലോ= ല്‍
-ലും=ല്‍
-ണാണു്= ണ്‍ ആണു്
-ണാണ് = ണ്‍ ആണ്
-ണിന്റെ = ണ്‍
-ണല്ല = ണ്‍ അല്ല
-ണില്ല = ണ്‍ ഇല്ല
-ണോട് =ണ്‍
-ണോടു = ണ്‍
-ണോടു്= ണ്‍
-ണോ= ണ്‍
-ണും=ണ്‍
-ളാണു്= ള്‍ ആണു്
-ളാണ്=ള്‍ ആണ്
-ളല്ല = ള്‍ അല്ല
-ളില്ല= ള്‍ ഇല്ല
-ളില്‍=ള്‍
-ളോട് = ള്‍
-ളോടു് =ള്‍
-ളോടു = ള്‍
-ളോ=ള്‍
-ളുടെ =ള്‍
-ളുടേ=ള്‍
-ള്‍ക്കായി=ള്‍
-ള്‍ക്കുള്ള =ള്‍ ഉള്ള
-ളും=ള്‍
-#അ/ഇകാരത്തിലവസാനിക്കുന്ന നാമങ്ങള്‍
-യില്‍=
-യുടെ=
-യെ=
-യാണു്=
-യിലുള്ള=യില്‍ ഉള്ള
-യാണ്=
-യും=
-യ്ക്ക് =
-യ്ക്കു് =
-യോ=
-യായ=
-യ്ക്കായി=
-ക്കായി=
-#ഉകാരത്തിലവസാനിക്കുന്ന നാമങ്ങള്‍
-വിനെ=
-വിന്റെ=
-വിന്=
-വിനു്=
-വെ=
-#് എന്നതിലവസാനിക്കുന്ന നാമങ്ങള്‍
-ില്‍=ു്
-ിനെ=ു്
-ിന്റെ=ു്
-യായി=
-#അ/ഇകാരത്തിലവസാനിക്കുന്ന ക്രിയകള്‍
-താണു്=
-താണ്=
-കള്‍=
-യാകാന്‍=" ആകാന്‍"
-യുള്ള=" ഉള്ള"
-ീകരിച്ചതു്=ിയാക്കുക
-#ഉകാരത്തിലവസാനിക്കുന്ന ക്രിയകള്‍
-ുണ്ടായ= ു് ഉണ്ടായ
-ുണ്ടാവുക= ു് ഉണ്ടാവുക
-#ത്തുക എന്നതില്‍ അവസാനിക്കുന്ന ക്രിയകള്‍= ഉണര്‍ത്തുക, പകര്‍ത്തുക
-ത്താറുണ്ടു്= ത്തുക ഉണ്ടു്
-ത്താറുണ്ട്= ത്തുക ഉണ്ടു്
-ത്തിയിട്ടുണ്ടു്= ത്തുക ഉണ്ടു്
-ത്തുയിട്ടുണ്ട്=ത്തുക ഉണ്ടു്
-ത്തിയില്ല=ത്തുക ഇല്ല
-ത്തുമോ=ത്തുക
-ത്തി=ത്തുക
-#തുക എന്നതില്‍ അവസാനിക്കുന്ന ക്രിയകള്‍ = കരുതുക. പൊരുതുക
-തി=തുക
-താറുണ്ടു്=തുക ഉണ്ടു്
-താറുണ്ട്=തുക ഉണ്ടു്
-തിയില്ല=തുക ഇല്ല
-#ക്കുക എന്നതില്‍ അവസാനിക്കുന്ന ക്രിയകള്‍ = സഞ്ചരിക്കുക, ഉറക്കുക പറക്കുക
-ക്കാന്‍=ക്കുക
-ക്കാറാണു്= ക്കുക ആണു്
-ക്കാറാണ്=ക്കുക ആണു്
-ക്കി=ക്കുക
-യ്ക്കാനായി=യ്ക്കാന്‍ ആവുക
-ക്കാനായി=ക്കാന്‍ ആവുക
-ച്ചു=യ്ക്കുക
-ിച്ച്=ിയ്ക്കുക
-ിച്ചു്=ിയ്ക്കുക
-റന്നു്=റക്കുക
-റന്ന്=റക്കുക
-ന്നിട്ടുണ്ടു്=ക്കുക ഉണ്ടു്
-ന്നിട്ടുണ്ട്=ക്കുക ഉണ്ടു്
-#കുക എന്നതില്‍ അവസാനിക്കുന്ന ക്രിയകള്‍= പടരുക, തുടരുക, വിടരുക
-ര്‍ന്നു്=രുക
-ര്‍ന്നു=രുക
-ര്‍ന്നില്ല=രുക ഇല്ല
-രാനായി=രുക ആവുക
-രുന്നതിനു=രുക
-ടരും=ടരുക
-#ങ്ങുക എന്നതില്‍ അവസാനിക്കുന്ന ക്രിയകള്‍=കറങ്ങുക
-ങ്ങന്നതിനു്=ങ്ങുക
-ക്കം=ക്കുക
-#msc
-യാണിവ=" ആണു് ഇവ"
-യുള്ളവ=" ഉള്ള അവ"
-യുള്ളതു്=" ഉള്ള അതു്"
-ാക്കപ്പെടുന്ന=ു് ആക്കുക പെടുക"
-ായിരിക്കും=" ു് ആയിരിക്കും"
-യാണുണ്ടാവുക=" ഉണ്ടാവുക"
-ളാണുള്ളത്="ള്‍ ആണു് ഉള്ളതു്"
-യുപയോഗിച്ചു്=ു് ഉപയോഗിക്കുക
-ുപയോഗിച്ചു്=ു് ഉപയോഗിക്കുക
-യുപയോഗിച്ച്=ു് ഉപയോഗിക്കുക
-ുപയോഗിച്ച്=ു് ഉപയോഗിക്കുക
diff --git a/silpa/www/silpa.conf b/silpa/www/silpa.conf
deleted file mode 100644
index 826b806..0000000
--- a/silpa/www/silpa.conf
+++ /dev/null
@@ -1,20 +0,0 @@
-# Silpa configuration file
-# This is a comment
-# Global properties
-SILPA_BASE_URL=http://planet.smc.org.in/exp/silpa/index.py
-SILPA_TEMPLATE=./templates/default/silpa.html
-SILPA_SITE_NAME=Silpa
-SILPA_LANGUAGE=Silpa
-SILPA_SITE_ADMIN_NAME=Santhosh
-SILPA_SITE_ADMIN_EMAIL=santhosh@silpa.org
-SILPA_SITE_COPYRIGHT= Copyright 2008-2009. Silpa Team. All rights Reserved.
-
-#Silpa Plugin Modules
-#Format: action=module. For eg:
-#Action names should be unique. and should be prefixed with "SILPA_ACTION."
-#TO disable an action, comment out the line
-#An example entry
-#SILPA_ACTION.sort=modules.sort #comment at the end of line is also allowed
-SILPA_ACTION.Lemmatize=modules.lemmatizer #Lemmatizer module for Indian Languages
-SILPA_ACTION.Detect Language=utils #This is also a valid module
-#End of Silpa configuration file
diff --git a/silpa/www/templates/__init__.py b/silpa/www/templates/__init__.py
deleted file mode 100644
index 8a966c5..0000000
--- a/silpa/www/templates/__init__.py
+++ /dev/null
@@ -1,3 +0,0 @@
-#! /usr/bin/env python
-# -*- coding: utf-8 -*-
-from base import *
diff --git a/silpa/www/templates/default/silpa.html b/silpa/www/templates/default/silpa.html
deleted file mode 100644
index 43a5b77..0000000
--- a/silpa/www/templates/default/silpa.html
+++ /dev/null
@@ -1,119 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<!--
-Copyright: Daemon Pty Limited 2006, http://www.daemon.com.au
-Community: Mollio http://www.mollio.org $
-License: Released Under the "Common Public License 1.0",
-http://www.opensource.org/licenses/cpl.php
-License: Released Under the "Creative Commons License",
-http://creativecommons.org/licenses/by/2.5/
-License: Released Under the "GNU Creative Commons License",
-http://creativecommons.org/licenses/GPL/2.0/
--->
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-<title>Silpa- The Indian Language Computing project</title>
-<link rel="stylesheet" type="text/css" href="css/main.css" media="screen" />
-<link rel="stylesheet" type="text/css" href="css/print.css" media="print" />
-<!--[if lte IE 6]>
-<link rel="stylesheet" type="text/css" href="css/ie6_or_less.css" />
-<![endif]-->
-<script type="text/javascript" src="js/common.js"></script>
-</head>
-<body id="type-f">
-<div id="wrap">
-
- <div id="header">
-
- <div id="site-name">Silpa</div>
- <div id="search">
- <form action="">
- <label for="searchsite">Site Search:</label>
- <input id="searchsite" name="searchsite" type="text" />
- <input type="submit" value="Go" class="f-submit" />
- </form>
- </div>
-
- <ul id="nav">
- <li class="active"><a href="#">Home</a></li>
- <li class="active"><a href="#">About</a>
- </li>
- <li class="active"><a href="#">Documentation</a>
- <ul>
- <li class="first"><a href="#">Language Detection</a></li>
-
- <li><a href="#">Spellcheck</a></li>
- <li><a href="#">Text to Speech</a></li>
- </ul>
- </li>
- <li class="active"><a href="#">Links</a>
- <li class="active"><a href="#">License</a>
- </ul>
-
- </div>
-
- <div id="content-wrap">
-
- <div id="utility">
-
- <ul id="nav-secondary">
- <li class="first"><a href="?action=Detect+Language">Language Detection</a></li>
- <li><a href="?action=spellcheck">Spellcheck</a></li>
- <li class="active"><a href="#">Font Conversion</a>
- <ul>
- <li class="first"><a href="?action=To+Unicode">Ascii to Unicode</a></li>
- <li><a href="?action=To+Ascii">Unicode to Ascii</a></li>
- </ul>
- </li>
- <li><a href="#">Lemmatizer</a></li>
- <li><a href="#">Normalizer</a></li>
-
- <li class="last"><a href="#">Sort</a></li>
- </ul>
- </div>
-
- <div id="content">
-
- <div id="breadcrumb">
-
- $$SILPA_BREADCRUMB$$
-
- </div>
- <hr />
-
- <div class="featurebox">
- <h3>Welcome to Silpa!</h3>
- <p><strong>Silpa stands for Swathanthra Indian Language Processing Applications. Silpa is a single place in the web
- where you can use the exising free(dom) software langauge processing applications easily. Silpa is in development and if you
- are intersted in contributing just drop a mail to <a href="mailto:santhosh.thottingal@gmail.com">Santhosh</a> </p>
- </div>
- $$SILPA_ERROR$$
- $$SILPA_SUCCESS$$
- $$SILPA_CONTENT$$
- <div id="footer">
- <p>$$SILPA_COPYRIGHT$$</p>
- <p><a href="#">Contact Us</a> | <a href="#">Privacy</a> | <a href="#">Links</a></p>
-
- </div>
-
-
- <div id="sidebar">
-
- <div class="featurebox">
- <h3>Welcome to Silpa!</h3>
- <p><strong>Silpa stands for Swathanthra Indian Language Processing Applications. Silpa is a single place in the web
- where you can use the exising free(dom) software langauge processing applications easily. Silpa is in development and if you
- are intersted in contributing just drop a mail to <a href="mailto:santhosh.thottingal@gmail.com">Santhosh</a> </p>
- </div>
-
-
- </div>
-
-
- <div id="poweredby"><a href="http://smc.org.in">SMC</a></div>
-
- </div>
-
-</div>
-</body>
-</html>
diff --git a/silpa/www/templates/template.py b/silpa/www/templates/template.py
deleted file mode 100644
index 00d6586..0000000
--- a/silpa/www/templates/template.py
+++ /dev/null
@@ -1,124 +0,0 @@
-#! /usr/bin/env python
-# -*- coding: utf-8 -*-
-
-def getBaseHTML():
- content = """\
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<!--
-Copyright: Daemon Pty Limited 2006, http://www.daemon.com.au
-Community: Mollio http://www.mollio.org $
-License: Released Under the "Common Public License 1.0",
-http://www.opensource.org/licenses/cpl.php
-License: Released Under the "Creative Commons License",
-http://creativecommons.org/licenses/by/2.5/
-License: Released Under the "GNU Creative Commons License",
-http://creativecommons.org/licenses/GPL/2.0/
--->
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-<title>Silpa- The Indian Language Computing project</title>
-<link rel="stylesheet" type="text/css" href="css/main.css" media="screen" />
-<link rel="stylesheet" type="text/css" href="css/print.css" media="print" />
-<!--[if lte IE 6]>
-<link rel="stylesheet" type="text/css" href="css/ie6_or_less.css" />
-<![endif]-->
-<script type="text/javascript" src="js/common.js"></script>
-</head>
-<body id="type-f">
-<div id="wrap">
-
- <div id="header">
-
- <div id="site-name">Silpa</div>
- <div id="search">
- <form action="">
- <label for="searchsite">Site Search:</label>
- <input id="searchsite" name="searchsite" type="text" />
- <input type="submit" value="Go" class="f-submit" />
- </form>
- </div>
-
- <ul id="nav">
- <li class="active"><a href="#">Home</a></li>
- <li class="active"><a href="#">About</a>
- </li>
- <li class="active"><a href="#">Documentation</a>
- <ul>
- <li class="first"><a href="#">Language Detection</a></li>
-
- <li><a href="#">Spellcheck</a></li>
- <li><a href="#">Text to Speech</a></li>
- </ul>
- </li>
- <li class="active"><a href="#">Links</a>
- <li class="active"><a href="#">License</a>
- </ul>
-
- </div>
-
- <div id="content-wrap">
-
- <div id="utility">
-
- <ul id="nav-secondary">
- <li class="first"><a href="?action=Detect+Language">Language Detection</a></li>
- <li><a href="?action=spellcheck">Spellcheck</a></li>
- <li class="active"><a href="#">Font Conversion</a>
- <ul>
- <li class="first"><a href="?action=To+Unicode">Ascii to Unicode</a></li>
- <li><a href="?action=To+Ascii">Unicode to Ascii</a></li>
- </ul>
- </li>
- <li><a href="#">Lemmatizer</a></li>
- <li><a href="#">Normalizer</a></li>
-
- <li class="last"><a href="#">Sort</a></li>
- </ul>
- </div>
-
- <div id="content">
-
- <div id="breadcrumb">
-
- $$SILPA_BREADCRUMB$$
-
- </div>
- <hr />
- <div class="featurebox">
- <h3>Welcome to Silpa!</h3>
- <p><strong>Silpa stands for Swathanthra Indian Language Processing Applications. Silpa is a single place in the web
- where you can use the exising free(dom) software langauge processing applications easily. Silpa is in development and if you
- are intersted in contributing just drop a mail to <a href="mailto:santhosh.thottingal@gmail.com">Santhosh</a> </p>
- </div>
- $$SILPA_CONTENT$$
-
-
-
- <div id="sidebar">
-
- <div class="featurebox">
- <h3>Welcome to Silpa!</h3>
- <p><strong>Silpa stands for Swathanthra Indian Language Processing Applications. Silpa is a single place in the web
- where you can use the exising free(dom) software langauge processing applications easily. Silpa is in development and if you
- are intersted in contributing just drop a mail to <a href="mailto:santhosh.thottingal@gmail.com">Santhosh</a> </p>
- </div>
-
-
- </div>
-
-
- <div id="poweredby"><a href="http://smc.org.in">SMC</a></div>
-
- </div>
-
-</div>
-</body>
-</html>
-
-"""
-
- return content
-
-if __name__ == '__main__':
- print getBaseHTML()
diff --git a/silpa/www/utils/__init__.py b/silpa/www/utils/__init__.py
deleted file mode 100644
index b7b55b1..0000000
--- a/silpa/www/utils/__init__.py
+++ /dev/null
@@ -1,4 +0,0 @@
-#! /usr/bin/env python
-# -*- coding: utf-8 -*-
-from silpautils import *
-from langdetect import *
diff --git a/silpa/www/utils/langdetect.py b/silpa/www/utils/langdetect.py
deleted file mode 100644
index a75ba15..0000000
--- a/silpa/www/utils/langdetect.py
+++ /dev/null
@@ -1,76 +0,0 @@
-# Spellchecker with language detection
-# coding: utf-8
-#
-# Copyright © 2008 Santhosh Thottingal
-# Released under the GPLV3+ license
-
-from common import *
-
-class LangDetect(SilpaModule):
-
- def detect_lang(self, text):
- words=text.split(" ")
- word_count=len(words)
- word_iter=0
- word=""
- result_dict=dict()
- while word_iter < word_count:
- word=words[word_iter]
- if(word):
- length = len(word)
- index = 0
- while index < length:
- letter=word[index]
- if ((letter >= u'ം') & (letter <=u'൯')):
- result_dict[word]= "ml_IN"
- if ((letter >= u'ঁ') & (letter <= u'৺')):
- result_dict[word]= "bn_IN"
- if ((letter >= u'ँ') & (letter <= u'ॿ')):
- result_dict[word]= "hi_IN"
- if ((letter >=u'ઁ') & (letter <= u'૱')):
- result_dict[word]= "gu_IN"
- if ((letter >= u'ਁ') & (letter <=u'ੴ')):
- result_dict[word]= "pa_IN"
- if ((letter >= u'ಂ') & (letter <=u'ೲ')):
- result_dict[word]= "ka_IN"
- if ((letter >= u'ଁ') & (letter <= u'ୱ')):
- result_dict[word]= "or_IN"
- if ((letter >=u'ஂ') & (letter <= u'௺')):
- result_dict[word]= "ta_IN"
- if ((letter >=u'ఁ') & (letter <= u'౯')):
- result_dict[word]= "te_IN"
- if ((letter <= u'z')):
- result_dict[word]= "en_US"
-
- index=index+1
- word_iter=word_iter+1
- return result_dict
- def process(self,form):
- response = """
- <h2>Language Detection</h2></hr>
- <p>Enter the text for detecting the language in the below text area.
- Language of each word will be detected.
- You can give the text in any language and even with mixed language
- </p>
- <form action="" method="post">
- <textarea cols='100' rows='25' name='input_text' id='id1'>%s</textarea>
- <input type="submit" id="Detect Language" value="Detect Language" name="action" style="width:12em;"/>
- <input type="reset" value="Clear" style="width:12em;"/>
- </br>
- </form>
- """
- if(form.has_key('input_text')):
- text = action=form['input_text'].value .decode('utf-8')
- response=response % text
- detected_lang_dict = self.detect_lang(text)
- response = response+"<h2>Language Detection Results</h2></hr>"
- response = response+"<table><th><td>Word</td><td>Language</td></th>"
- for key in detected_lang_dict:
- response = response+"<tr><td>"+key+"</td><td>"+detected_lang_dict[key]+"</td></tr>"
- response = response+"</table> "
- else:
- response=response % ""
- return response
-
-def getInstance():
- return LangDetect()