From c57278172003f9d4aa1171197dd1242e836d43b7 Mon Sep 17 00:00:00 2001 From: Santhosh Thottingal Date: Thu, 26 Mar 2009 22:41:18 +0530 Subject: unwanted files --- silpa/www/css/print.css | 51 ------ silpa/www/dot.png | Bin 44493 -> 0 bytes silpa/www/index.py | 33 ---- silpa/www/js/common.js | 21 --- silpa/www/modules/__init__.py | 3 - silpa/www/modules/lemmatizer/__init__.py | 4 - silpa/www/modules/lemmatizer/lemmatizer.py | 121 -------------- silpa/www/modules/lemmatizer/lemmatizer_ml.rules | 193 ----------------------- silpa/www/silpa.conf | 20 --- silpa/www/templates/__init__.py | 3 - silpa/www/templates/default/silpa.html | 119 -------------- silpa/www/templates/template.py | 124 --------------- silpa/www/utils/__init__.py | 4 - silpa/www/utils/langdetect.py | 76 --------- 14 files changed, 772 deletions(-) delete mode 100644 silpa/www/css/print.css delete mode 100644 silpa/www/dot.png delete mode 100644 silpa/www/index.py delete mode 100644 silpa/www/js/common.js delete mode 100644 silpa/www/modules/__init__.py delete mode 100644 silpa/www/modules/lemmatizer/__init__.py delete mode 100644 silpa/www/modules/lemmatizer/lemmatizer.py delete mode 100644 silpa/www/modules/lemmatizer/lemmatizer_ml.rules delete mode 100644 silpa/www/silpa.conf delete mode 100644 silpa/www/templates/__init__.py delete mode 100644 silpa/www/templates/default/silpa.html delete mode 100644 silpa/www/templates/template.py delete mode 100644 silpa/www/utils/__init__.py delete mode 100644 silpa/www/utils/langdetect.py 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 Binary files a/silpa/www/dot.png and /dev/null 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; i0): - 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 = """ -

Lemmatization

-

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 -

-
- - - -
-
- """ - if(form.has_key('input_text')): - text = action=form['input_text'].value .decode('utf-8') - response=response % text - result = self.lemmatize(text) - response = response+"

Lemmatization Results

" - response = response+"

"+result+"

" - 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 @@ - - - - - -Silpa- The Indian Language Computing project - - - - - - -
- - - -
- - - -
- - -
- -
-

Welcome to Silpa!

-

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 Santhosh

-
- $$SILPA_ERROR$$ - $$SILPA_SUCCESS$$ - $$SILPA_CONTENT$$ - - - - - - - - -
- -
- - 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 = """\ - - - - - -Silpa- The Indian Language Computing project - - - - - - -
- - - -
- - - -
- - -
-
-

Welcome to Silpa!

-

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 Santhosh

-
- $$SILPA_CONTENT$$ - - - - - - - - -
- -
- - - -""" - - 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 = """ -

Language Detection

-

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 -

-
- - - -
-
- """ - 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+"

Language Detection Results

" - response = response+"" - for key in detected_lang_dict: - response = response+"" - response = response+"
WordLanguage
"+key+""+detected_lang_dict[key]+"
" - else: - response=response % "" - return response - -def getInstance(): - return LangDetect() -- cgit