team4alfanous team mailing list archive
-
team4alfanous team
-
Mailing list archive
-
Message #00047
[Branch ~team4alfanous/alfanous/alfanous-git] Rev 240: show vocalizations of each word in output system
------------------------------------------------------------
revno: 240
git commit: 9c95e1123e83232804f511d115412b60d3cdf378
committer: Assem Chelli <assem.ch@xxxxxxxxx>
timestamp: Fri 2012-06-08 04:49:33 +0100
message:
show vocalizations of each word in output system
modified:
src/alfanous/outputs.py
--
lp:~team4alfanous/alfanous/alfanous-git
https://code.launchpad.net/~team4alfanous/alfanous/alfanous-git
Your team Alfanous team is subscribed to branch lp:~team4alfanous/alfanous/alfanous-git.
To unsubscribe from this branch go to https://code.launchpad.net/~team4alfanous/alfanous/alfanous-git/+edit-subscription
=== modified file 'src/alfanous/outputs.py'
--- src/alfanous/outputs.py 2012-06-07 19:52:24 +0000
+++ src/alfanous/outputs.py 2012-06-08 03:49:33 +0000
@@ -16,11 +16,16 @@
## You should have received a copy of the GNU Affero General Public License
## along with this program. If not, see <http://www.gnu.org/licenses/>.
+"""
+TODO offer some linguistic operations like vocalize,derive using Quranic Corpus / functions
+"""
+
from alfanous.main import QuranicSearchEngine, FuzzyQuranicSearchEngine, TraductionSearchEngine, WordSearchEngine
from alfanous.dynamic_resources.arabicnames_dyn import ara2eng_names as Fields
from alfanous.dynamic_resources.std2uth_dyn import std2uth_words
+from alfanous.dynamic_resources.vocalizations_dyn import vocalization_dict
from alfanous.TextProcessing import QArabicSymbolsFilter
import json, re
@@ -344,7 +349,7 @@
matches += term[2]
docs += term[3]
annotation_word_query += u" OR normalised:%s " % STANDARD2UTHMANI( term[1] )
- words_output[ cpt ] = {"word":term[1], "nb_matches":term[2], "nb_ayas":term[3]}
+ words_output[ cpt ] = {"word":term[1], "nb_matches":term[2], "nb_ayas":term[3], "vocalizations": vocalization_dict[term[1]]}
cpt += 1
annotation_word_query += u" ) "
words_output["global"] = {"nb_words":cpt - 1, "nb_matches":matches}