diff --git a/COPYING b/COPYING deleted file mode 100755 index c8bae24b6..000000000 --- a/COPYING +++ /dev/null @@ -1,15 +0,0 @@ -Copyright (C) 2009-2012 Assem Chelli - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. diff --git a/README.rst b/README.rst index 917899b1d..b79b1771a 100644 --- a/README.rst +++ b/README.rst @@ -1,94 +1,662 @@ - .. image:: https://img.shields.io/pypi/v/alfanous.svg - :target: https://pypi.python.org/pypi/alfanous +============ +Alfanous API +============ +----- +Build +----- +The API uses many critical resources that must be downloaded and/or prepared to be used. To do that, just run this command in the root path of the project - .. image:: https://travis-ci.org/Alfanous-team/alfanous.png?branch=master - :target: https://travis-ci.org/Alfanous-team/alfanous +#. Install all building dependencies: `pyparsing `_, `epydoc `_, + `sphinx `_. -================ -Alfanous Project -================ ------------------ -What is Alfanous? ------------------ + * (ubuntu 12.04): + + .. code-block:: sh + + $ sudo apt-get install python-qt4 qt4-dev-tools python-qt4-dev pyqt4-dev-tools + $ sudo apt-get install python-distutils-extra + $ sudo easy_install pyparsing epydoc sphinx -Alfanous is a functional, dynamic, comprehensive Qur’an search engine that has been effectively designed to carry out simple or advanced Quranic searches. -:Authors: `Authors.rst `_ -:Mailinglist: `alfanous@googlegroups.com `_ -:Website: `Alfanous.org `_ -:Doc: `Readthedocs `_ ------ -Usage ------ -Install it from Pypi: +#. Run the build command: -.. code-block:: sh + .. code-block:: sh + + $ cd ../../ + $ make build - $ sudo pip install alfanous -You can use it from console: + +For more details check `Makefile `_ + + +------- +Install +------- +To install the API from the source (After Build_ ): .. code-block:: sh - $ alfanous-console -a search -q الله - $ alfanous-console -a search -q Allh + $ sudo python setup.py install + +A console interface will be installed automatically with the API: -or from Python: +.. code-block:: sh + + $ alfanous-console -h + usage: alfanous-console [flags] +----------- +Quick Start +----------- .. code-block:: python - >>> import alfanous - >>> alfanous.search(u"الله") - >>> alfanous.do({"action":"search","query":u"الله"}) - >>> alfanous.do({"action":"search","query":u"Allh"}) # Buckwalter transliteration + # coding: utf-8 + + # import Output object + from alfanous.Outputs import Raw + + # import default Paths + from alfanous.Data import Paths + + # Initialize search engines + RAWoutput = Raw( + QSE_index = Paths.QSE_INDEX , # Quranic Main index path + TSE_index = Paths.TSE_INDEX, # Translations index path + WSE_index = Paths.WSE_INDEX, # Quranic words index path + Recitations_list_file = Paths.RECITATIONS_LIST_FILE, + Translations_list_file = Paths.TRANSLATIONS_LIST_FILE , + Hints_file = Paths.HINTS_FILE, + Stats_file = Paths.STATS_FILE, + Information_file = Paths.INFORMATION_FILE + ) + + ## prepare a suggestion query + suggest_flags = { + "action":"suggest", + "query": "ابراهيم" + } + results = RAWoutput.do( suggest_flags ) + + print "number of missed words", len(results["suggest"]) + + + ## prepare a search query + search_flags = { + "action":"search", + "query": "الحمد لله", + "sortedby":"mushaf", + "reverse_order": False, + "page": 1, + "word_info": True, + "highlight": "css", + "script": "standard", + "sura_info": True, + "aya_position_info": True, + "aya_theme_info": False, + "aya_stat_info": False, + "aya_sajda_info": True, + "translation": 2, + } + + results = RAWoutput.do( search_flags ) + + print "runtime", results["search"]["runtime"] + print "total", results["search"]["interval"]["total"] + +see `sample.py `_. + +-------------- +Flags +-------------- -You can use it also from the web service: +======== ==================== ================= ================ ============================================ ================= ======================================================================================================================================================================== + number flag related action related unit description default value accepted values +-------- -------------------- ----------------- ---------------- -------------------------------------------- ----------------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + 1 **action** action to perform "search" search | suggest | show + 2 unit search, suggest search unit "aya" aya | word | translation + 2 ident identifier of requester [experimental] "undefined" undefined + 3 platform platform used by requester "undefined" undefined | wp7 | s60 | android | ios | linux | window + 4 domain web domain of requester if applicable "undefined" \* + 5a **query** search,suggest query attached to action "" \* + 5b **query** show query attached to action "" all | translations |recitations | information | hints | surates | chapters | defaults | flags | fields | fields_reverse | errors | domains | help_messages | roots + 6 highlight search highlight method "css" css | html | genshi | bold | bbcode + 7 script search aya, word script of aya text "standard" standard | uthmani + 8 vocalized search aya, word enable vocalization of aya text "True" True | False + 9 recitation search aya recitation id "1" 1 to 30 + 10 translation search aya, trans translation id "None" \* + 11 romanization search aya, word type of romanization "none" none | buckwalter | iso | arabtex + 12a view search aya, word pre-defined configuration for view "custom" minimal | normal | full | statistic | linguistic | custom + 12b view search translation pre-defined configuration for view "custom" minimal | normal | full | custom + 13 prev_aya search aya enable previous aya retrieving "False" True | False + 14 next_aya search aya enable next aya retrieving "False" True | False + 15 sura_info search aya enable sura information retrieving "True" True | False + 16 sura_stat_info search aya enable sura stats retrieving "False" True | False + 17 word_info search aya, word enable word information retrieving "True" True | False + 17a word_synonyms search aya enable retrieving of keyword synonyms "False" True | False + 17b word_derivations search aya enable retrieving of keyword derivations "True" True | False + 17c word_vocalizations search aya enable retrieving of keyword vocalizations "True" True | False + 18 aya_position_info search aya enable aya position information retrieving "True" True | False + 19 aya_theme_info search aya enable aya theme information retrieving "True" True | False + 20 aya_stat_info search aya enable aya stat information retrieving "True" True | False + 21 aya_sajda_info search aya enable aya sajda information retrieving "True" True | False + 22 annotation_word search aya, word enable query terms annotations retrieving "False" True | False + 23 annotation_aya search aya enable aya words annotations retrieving "False" True | False + 24 sortedby search aya sorting order of results "score" total | score | mushaf | tanzil | subject + 25 offset search starting offset of results "1" 1 to 6236 + 26 range search range of results "10" 1 to 25 + 27 page search page number [override offset] "1" 1 to 6236 + 28 perpage search results per page [override range] "10" 1 to 25 + 29 fuzzy search aya fuzzy search [exprimental] "False" True | False + 30 aya search word,trans enable retrieving of aya text "True" True | False -http://alfanous.org/api/search?query=الله +======== ==================== ================= ================ ============================================ ================= ======================================================================================================================================================================== -http://alfanous.org/api/search?query=Allh +----------------------- +Advanced Query Examples +----------------------- +Aya Search: ---------------- -Search Features ---------------- -This is the list of search features already implemented, preview links use Alfanous web user interface: www.alfanous.org. +* Simple search: الحمد +* Phrases : "الحمد لله" +* Logical relations - ANDNOT : (الصلاة - الزكاة) +* Logical relations - AND : الصلاة + الزكاة +* Logical relations - OR : الصلاة | الزكاة +* Joker \* : \*نبي\* +* Joker \? : نعم؟ +* Fielded search : سورة:يس ( look for other Fields_ ) +* Fielded search (2) : سجدة:نعم +* Intervals : رقم_السورة:[1 الى 5] و الله +* Partial vocalization : آية_:'مَن' +* Tuples (root,type= أداة | اسم | فعل) as: {قول،اسم} +* Derivations - lemma : >مالك +* Derivations - root : >>مالك -#. Exact Word: that is the simple search, eg: `فأسقيناكموه `_ -#. Phrase: for searching a whole phrase rather then independent words, eg:`"رسول الله" `_ -#. Logical relations +Translation Search: - * Conjuction: for searching only the ayahs that contains two terms or more, eg: `الصلاة + الزكاة `_. - * Disjunction (default): for searching all the ayahs that contains one of two terms or more, eg:`الصلاة | الزكاة `_. - * Exception: for eleminating a term from search results, eg:`الصلاة - الزكاة `_. You can understand it as "Ayahs that contains الصلاة but doesn't contain الزكاة". +* Exact search: god +* Phrase search: "seven heavens" +* Logical relations - OR: prayer ANDNOT charity +* Logical relations - AND: prayer AND charity +* Logical relations - OR: prayer OR charity +* Wildcards - Joker \*: pray* +* Wildcards - Joker \?: produc? +* Fielded search: lang:fr +* Fielded search (2) : author:Shakir -#. Wildcards or Jokers: for search all words that share many letters, we have: +------ +Fields +------ +* Aya Search Fields: + +===== ==================== =================== =================== ============================================================ + n عربي English Values Description +----- -------------------- ------------------- ------------------- ------------------------------------------------------------ + 1 رقم gid 1 to 6236 Global order of Aya in the whole Quran + 2 رقم_الآية aya_id 1 to 300 order of Aya inside its Sura + 3 آية aya Text Aya non-vocalized standard text ( used for search) + 4 آية_ aya_ Text Aya vocalized standard text ( used for show/search) + 5 عثماني uth Text Aya vocalized uthmani text ( used for show/search) + 6 عثماني_ uth_ Text Aya vocalized uthmani text ( used for show) + 7 موضوع subject Text Thematic Division: **Chapter** > **Topic** > **Subtopic** + 8 فصل chapter Text Thematic Division: **Chapter** > Topic > Subtopic + 9 فرع topic Text Thematic Division: Chapter > **Topic** > Subtopic + 10 باب subtopic Text Thematic Division: Chapter > Topic > **Subtopic** + 11 رقم_السورة sura_id 1 to 114 Order of Sura in Mus-haf + 12 سورة sura_arabic Text Arabic Name of Sura + 12+ سورة_إنجليزي sura_english Text English Name of Sura + 12+ سورة_تهجئة sura Text Romanized Name of Sura + 13 نوع_السورة sura_type_arabic مدنية|مكية Revelation place of Sura [Arabic] + 13+ نوع_السورة_إنجليزي sura_type Meccan|Medinan Revelation place of Sura [English] + 14 ترتيب_السورة sura_order 1 to 114 Revelation order of Sura + 15 جزء juz 1 to 30 Structural Division : **Juz** > Hizb > Rub + 16 حزب hizb 1 to 60 Structural Division : Juz > **Hizb** > Rub + 17 نصف nisf 1 to 2 Deprecated + 18 ربع rub 1 to 4 Structural Division : Juz > Hizb > **Rub** + 19 صفحة page Number Structural Division : Page + 19+ صفحة_هندي page_IN Number Structural Division : Page (INDIAN MUSHAF) + 20 منزل manzil 1 to 7 Structural Division : **Manzil** > Ruku + 21 ركوع ruku Number Structural Division : Manzil > **Ruku** + 22 سجدة sajda نعم | لا Test existence of a Sajda + 23 رقم_السجدة sajda_id 1 | 14 Order of the Sajda if exist + 24 نوع_السجدة sajda_type واجبة|مستحبة Type of the Sajda if exist + 25 ح_س s_l Number Number of **letters** in **Sura** + 26 ك_س s_w Number Number of **words** in **Sura** + 27 ج_س s_g Number Number of **God's names** in **Sura** + 28 آ_س s_a Number Number of **Ayas** in **Sura** + 29 ر_س s_r Number Number of **Ruku-s** in **Sura** + 30 ح_آ a_l Number Number of **letters** in **Aya** + 31 ك_آ a_w Number Number of **words** in **Aya** + 32 ج_آ a_g Number Number of **God's names** in **Aya** +===== ==================== =================== =================== ============================================================ + + +---------------- +SortedBy Options +---------------- +* Aya Search: +========== ================================================================================= + Option Description +---------- --------------------------------------------------------------------------------- + score The relevance of the results compared to the query keywords + mushaf The default order of ayas in Mus-haf + tanzil The revelation order + subject The alphabetic order of the values for subjects fields + ayalenght The length of ayah from the shortest to the longest + FIELD The numerical order or alphabetic order of a costum field (see Fields_ ) + +========== ================================================================================= + + +-------------- +Schema Samples +-------------- +* Aya Search: + +Suggestions +^^^^^^^^^^^ +flags: + +.. code-block:: python + + { + "action"="suggest", + "query"="مءصدة" + } + +response: + +.. code-block:: python + + { + "suggest": [ + ["\u0645\u0621\u0635\u062f\u0629", + ["\u0645\u0642\u062a\u0635\u062f\u0629", "\u0645\u0624\u0635\u062f\u0629"] + ] + ], + "error": { + "msg": "success ## action=suggest ; query=\u0645\u0621\u0635\u062f\u0629", + "code": 0 + } + } + +Results +^^^^^^^ +flags: + +.. code-block:: python - * Asterisk: replace zero or many undefined letters, eg: `*نبي* `_ - * Interogation mark: replace one undefined letter, eg: `نعم؟ `_ + { + "action":"search", + "query": "الكوثر", + "sortedby":"score", + "page": 1, + "word_info":True, + "highlight":"css", + "script": "standard", + "prev_aya": True, + "next_aya": True, + "sura_info": True, + "aya_position_info": True, + "aya_theme_info": True, + "aya_stat_info": True, + "aya_sajda_info": True, + "annotation_word": True, + "annotation_aya": True, + "translation":"None", + "recitation": 1 -#. Fielded search: to search in more information of Quran , not only ayahs'text, we cite here the most significant fields for users: + } - * aya_id or رقم_الآية (Aya local ID): that's the number of ayah inside its sura, use it for example to search all first ayahs (`رقم_الآية:1 `_). - * sura_id or رقم_السورة (Sura ID): use it with aya_id to specify an exact ayah,for example the first ayah of surate an-nass will be : `aya_id:1 + sura_id:114 `_. - * subject or موضوع (Topics): thats field contains all topics information, it will be helpful to search for a topic,eg: `موضوع:الشيطان `_ - for more fields, see: `Fields `_ +response: -#. Intervals: this will be helpful in statistics or positions, for example search the divine name only in the first surahs: `رقم_السورة :[1 الى 5 ] + الله `_ -#. Partial vocalization: to consider given diacritics and ignore the others, eg: `آية_ :'مَن' `_. -#. Word Properties: to search using root and type of words, type could be اسم, فعل or أداة,eg: `{قول،اسم} `_. -#. Derivations +.. code-block:: python + + { + + "search": { + "runtime": 1.0951571464538574, + "interval": { + "start": 1, + "total": 1, + "end": 1 + } + "words": { + "global": { + "nb_words": 1, + "nb_matches": 1, + "nb_vocalizations": 1, + }, + "individual": { + + "1": { + "word": "\u0627\u0644\u0643\u0648\u062b\u0631", + "nb_matches": 1, + "nb_ayas": 1, + "nb_vocalizations": 1, + "vocalizations": ["\u0627\u0644\u0652\u0643\u064e\u0648\u0652\u062b\u064e\u0631\u064e"], + }, + }, + + }, + + "ayas": { + "1": { + + "identifier": { + "gid": 6205, + "aya_id": 1, + "sura_id": 108, + "sura_name": "\u0627\u0644\u0643\u0648\u062b\u0631", + + }, + "aya": { + "id": 1, + "text": "\u0625\u0650\u0646\u0651\u064e\u0627 \u0623\u064e\u0639\u0652\u0637\u064e\u064a\u0652\u0646\u064e\u0627\u0643\u064e \u0627\u0644\u0652\u0643\u064e\u0648\u0652\u062b\u064e\u0631\u064e", + "recitation": "http://www.everyayah.com/data/Abdul_Basit_Murattal_64kbps/108001.mp3", + "translation": null, + "prev_aya": { + "id": 7, + "sura": "\u0627\u0644\u0645\u0627\u0639\u0648\u0646", + "text": "\u0648\u064e\u064a\u064e\u0645\u0652\u0646\u064e\u0639\u064f\u0648\u0646\u064e \u0627\u0644\u0652\u0645\u064e\u0627\u0639\u064f\u0648\u0646\u064e", + }, + "next_aya": { + "id": 2, + "sura": "\u0627\u0644\u0643\u0648\u062b\u0631", + "text": "\u0641\u064e\u0635\u064e\u0644\u0651\u0650 \u0644\u0650\u0631\u064e\u0628\u0651\u0650\u0643\u064e \u0648\u064e\u0627\u0646\u0652\u062d\u064e\u0631\u0652", + }, + }, + + + "sura": { + "id": 108, + "name": "\u0627\u0644\u0643\u0648\u062b\u0631", + "type": "\u0645\u0643\u064a\u0629", + "order": 15, + "ayas": 3, + "stat": { + "words": 10, + "letters": 42, + "godnames": 0, + + }, + }, + "theme": { + "chapter": "\u0623\u0631\u0643\u0627\u0646 \u0627\u0644\u0625\u0633\u0644\u0627\u0645 ", + "topic": "\u0627\u0644\u062d\u062c \u0648\u0627\u0644\u0639\u0645\u0631\u0629 ", + "subtopic": null + }, + + + "position": { + "rub": 0, + "manzil": 7, + "ruku": 550, + "hizb": 60, + "page": 602 + }, + "sajda": { + "exist": false, + "id": null, + "type": null + }, + + "stat": { + "letters": 16, + "godnames": 0, + "words": 3 + }, + "annotations": { + "1": { + "arabicroot": null, + "arabicmood": null, + "number": null, + "spelled": "\u0627\u0646\u0627\u0653", + "aspect": null, + "word_gid": 75871, + "word_id": 1, + "mood": null, + "arabicspecial": "\u0625\u0650\u0646\u0651", + "state": null, + "arabiclemma": "\u0625\u0650\u0646\u0651", + "gid": 116333, + "type": "Particles", + "aya_id": 1, + "arabictoken": null, + "form": null, + "pos": "Accusative particle", + "arabiccase": "\u0645\u0646\u0635\u0648\u0628", + "part": "\u062c\u0630\u0639", + "normalized": "\u0625\u0646\u0627\u0653", + "case": "Accusative case", + "sura_id": 108, + "word": "\u0625\u0650\u0646\u0651\u064e\u0627\u0653", + "derivation": null, + "arabicpos": "\u062d\u0631\u0641 \u0646\u0635\u0628", + "person": null, + "token": null, + "gender": null, + "voice": null, + "order": 1 + }, + "2": { + "arabicroot": "\u0639\u0637\u0648", + "arabicmood": null, + "number": "\u062c\u0645\u0639", + "spelled": "\u0627\u0639\u0637\u064a\u0646\u0670\u0643", + "aspect": "Perfect verb", + "word_gid": 75872, + "word_id": 2, + "mood": null, + "arabicspecial": null, + "state": null, + "arabiclemma": null, + "gid": 116335, + "type": "Verbs", + "aya_id": 1, + "arabictoken": null, + "form": "Fourth form", + "pos": "Verb", + "arabiccase": null, + "part": "\u062c\u0630\u0639", + "normalized": "\u0623\u0639\u0637\u064a\u0646\u0670\u0643", + "case": null, + "sura_id": 108, + "word": "\u0623\u064e\u0639\u0652\u0637\u064e\u064a\u0652\u0646\u064e\u0670\u0643\u064e", + "derivation": null, + "arabicpos": "\u0641\u0639\u0644", + "person": "\u0645\u062a\u0643\u0644\u0645", + "token": null, + "gender": "\u0645\u0630\u0651\u0643\u0631", + "voice": null, + "order": 1 + }, + "3": { + "arabicroot": null, + "arabicmood": null, + "number": null, + "spelled": "\u0671\u0644\u0643\u0648\u062b\u0631", + "aspect": null, + "word_gid": 75873, + "word_id": 3, + "mood": null, + "arabicspecial": null, + "state": null, + "arabiclemma": null, + "gid": 116337, + "type": "determiner", + "aya_id": 1, + "arabictoken": "\u0627\u0644", + "form": null, + "pos": null, + "arabiccase": null, + "part": "\u0633\u0627\u0628\u0642", + "normalized": "\u0671\u0644\u0643\u0648\u062b\u0631", + "case": null, + "sura_id": 108, + "word": "\u0671\u0644\u0652\u0643\u064e\u0648\u0652\u062b\u064e\u0631\u064e", + "derivation": null, + "arabicpos": null, + "person": null, + "token": "al", + "gender": null, + "voice": null, + "order": 1 + } + }, + }, + }, + "translation_info": {}, + }, + + "error": { + "code": 0, + "msg": "success ## action=search ; query=\u0627\u0644\u0643\u0648\u062b\u0631", + } + } - * light (using lemma): to search all the words having the same lemma of the given word,eg: `>ملك `_. - * heavy (using root): to search all the words having the same root of the given word,eg: `>>ملك `_. +Translations +^^^^^^^^^^^ +TODO + + +Information +^^^^^^^^^^^ +flags: + +.. code-block:: python + + { + "action"="show", + "query"="information" + } + +response: + +.. code-block:: python + + { + "show": { + "information": { + "engine": "Alfanous", + "wiki": "http://wiki.alfanous.org/doku.php?id=json_web_service", + "description": "Alfanous is a Quranic search engine provides simple and advanced search services in the diverse information of the Holy Quran .", + "author": "Assem chelli", + "version": "0.5", + "contact": "assem.ch@gmail.com", + "console_note": "this is console interface of Alfanous, try -h to get help ", + "json_output_system_note": "\n This is the JSON output system of Alfanous project .This feature is in Alpha test and the Json schema may be it's not stable . We are waiting for real feadbacks and suggestions to improve its efficacity,quality and stability. To contact the author ,please send a direct email to assem.ch[at]gmail.com or to the mailing list alfanous [at] googlegroups.com\n

For more details visit the page of this service here\n " + } + }, + "error": { + "msg": "success ## action=show ; query=information", + "code": 0 + } + } + + +Recitations +^^^^^^^^^^^ + +flags: + +.. code-block:: python + + { + "action"="show", + "query"="recitations" + } + +response (sample): + +.. code-block:: python + + { + "show": { + "recitations": { + "45": { + "bitrate": "192kbps", + "name": "English/Ibrahim Walk TEST", + "subfolder": "English/Ibrahim_Walk_192kbps_TEST" + }, + "54": { + "bitrate": "128kbps", + "name": "Salah Al Budair", + "subfolder": "Salah_Al_Budair_128kbps" + } + + + } + }, + "error": { + "msg": "success ## action=show ; query=recitations", + "code": 0 + } + } + + +Fields +^^^^^^ + +flags: + +.. code-block:: python + + { + "action"="show", + "query"="fields" + } + +response: + +.. code-block:: python + + { + "show": { + "fields": { + "جزء": "juz", + "عثماني ": "uth", + "نوع_السورة": "sura_type", + "رقم_السجدة": "sajda_id", + "صفحة": "page", + "ربع": "rub", + "ر_س": "s_r", + "ركوع": "ruku", + "رقم_السورة": "sura_id", + "آ_س": "s_a", + "آية_": "aya_", + "موضوع": "subject", + "ج_س": "s_g", + "ك_آ": "a_w", + "فصل": "chapter", + "ح_آ": "a_l", + "سورة": "sura", + "فرع": "topic", + "آية": "aya", + "رقم_الآية": "aya_id", + "عثماني_": "uth_", + "ك_س": "s_w", + "نوع_السجدة": "sajda_type", + "رقم": "gid", + "باب": "subtopic", + "نصف": "nisf", + "ح_س": "s_l", + "حزب": "hizb", + "منزل": "manzil", + "ج_آ": "a_g", + "سجدة": "sajda", + "ترتيب_السورة": "sura_order" + } + }, + "error": { + "msg": "success ## action=show ; query=fields", + "code": 0 + } + } -**note:** you can find the perspective search features under the milestones: `Quranic Search Features Pack 1 `_, `Quranic Search Features Pack 2 `_. --------- -See also --------- -#. `Application Programming Interface & Console Interface `_ diff --git a/src/alfanous-import/Parser.py b/src/alfanous-import/Parser.py deleted file mode 100644 index 13de97763..000000000 --- a/src/alfanous-import/Parser.py +++ /dev/null @@ -1,5 +0,0 @@ -''' -Created on Jun 15, 2012 - -@author: assem -''' diff --git a/src/alfanous-import/README.rst b/src/alfanous-import/README.rst deleted file mode 100644 index e69de29bb..000000000 diff --git a/src/alfanous-import/Standardizer.py b/src/alfanous-import/Standardizer.py deleted file mode 100644 index 13de97763..000000000 --- a/src/alfanous-import/Standardizer.py +++ /dev/null @@ -1,5 +0,0 @@ -''' -Created on Jun 15, 2012 - -@author: assem -''' diff --git a/src/alfanous-import/alfanous-import.rst b/src/alfanous-import/alfanous-import.rst deleted file mode 100644 index 6c663cd83..000000000 --- a/src/alfanous-import/alfanous-import.rst +++ /dev/null @@ -1,75 +0,0 @@ -alfanous-import Package -======================= - -:mod:`Downloader` Module ------------------------- - -.. automodule:: alfanous-import.Downloader - :members: - :undoc-members: - :show-inheritance: - -:mod:`Importer` Module ----------------------- - -.. automodule:: alfanous-import.Importer - :members: - :undoc-members: - :show-inheritance: - -:mod:`Parser` Module --------------------- - -.. automodule:: alfanous-import.Parser - :members: - :undoc-members: - :show-inheritance: - -:mod:`Standardizer` Module --------------------------- - -.. automodule:: alfanous-import.Standardizer - :members: - :undoc-members: - :show-inheritance: - -:mod:`Transformer` Module -------------------------- - -.. automodule:: alfanous-import.Transformer - :members: - :undoc-members: - :show-inheritance: - -:mod:`Updater` Module ---------------------- - -.. automodule:: alfanous-import.Updater - :members: - :undoc-members: - :show-inheritance: - -:mod:`initial_importing` Module -------------------------------- - -.. automodule:: alfanous-import.initial_importing - :members: - :undoc-members: - :show-inheritance: - -:mod:`main` Module ------------------- - -.. automodule:: alfanous-import.main - :members: - :undoc-members: - :show-inheritance: - -:mod:`setup` Module -------------------- - -.. automodule:: alfanous-import.setup - :members: - :undoc-members: - :show-inheritance: - diff --git a/src/alfanous-import/setup.sh b/src/alfanous-import/setup.sh deleted file mode 100755 index 45353c6ae..000000000 --- a/src/alfanous-import/setup.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh - -NAME=Qimport - -python setup.py bdist_wininst -python setup.py bdist_egg -python setup.py register -#python setup.py upload -epydoc --html -v --graph all --no-sourcecode --show-imports -n $NAME -u alfanous.sourceforge.com/cms . -7z a -tzip $NAME-html.zip ./html/* -mv -f $NAME-html.zip ./dist diff --git a/src/alfanous/Misc.py b/src/alfanous/Misc.py index f45be0412..5b372027f 100755 --- a/src/alfanous/Misc.py +++ b/src/alfanous/Misc.py @@ -1,22 +1,5 @@ # coding: utf-8 -""" Misc functions """ - -#localization functions -#import gettext -#gettext.bindtextdomain( "fanous", "./locale" ) -#gettext.textdomain( "fanous" ) -#_ = gettext.gettext -#N_ = gettext.ngettext - - -##get location -#import locale -#LOC = locale.getdefaultlocale()[0] - -##get platform -#import sys -#SYS = sys.platform FILTER_DOUBLES = filter_doubles = lambda lst:list( set( lst ) ) LOCATE = lambda source, dist, itm: dist[source.index( itm )] \ diff --git a/src/alfanous/Outputs.py b/src/alfanous/Outputs.py index bbb8cb82c..f3c997e4d 100755 --- a/src/alfanous/Outputs.py +++ b/src/alfanous/Outputs.py @@ -55,7 +55,7 @@ from alfanous.Data import * from alfanous.Romanization import transliterate from alfanous.Misc import LOCATE, FIND, FILTER_DOUBLES -from alfanous.Constants import LANGS +from alfanous.constants import LANGS STANDARD2UTHMANI = lambda x: std2uth_words[x] if std2uth_words.has_key( x ) else x diff --git a/src/alfanous/README.rst b/src/alfanous/README.rst deleted file mode 100644 index b79b1771a..000000000 --- a/src/alfanous/README.rst +++ /dev/null @@ -1,662 +0,0 @@ -============ -Alfanous API -============ ------ -Build ------ -The API uses many critical resources that must be downloaded and/or prepared to be used. To do that, just run this command in the root path of the project - -#. Install all building dependencies: `pyparsing `_, `epydoc `_, - `sphinx `_. - - * (ubuntu 12.04): - - .. code-block:: sh - - $ sudo apt-get install python-qt4 qt4-dev-tools python-qt4-dev pyqt4-dev-tools - $ sudo apt-get install python-distutils-extra - $ sudo easy_install pyparsing epydoc sphinx - - - - -#. Run the build command: - - .. code-block:: sh - - $ cd ../../ - $ make build - - - -For more details check `Makefile `_ - - -------- -Install -------- -To install the API from the source (After Build_ ): - -.. code-block:: sh - - $ sudo python setup.py install - -A console interface will be installed automatically with the API: - -.. code-block:: sh - - $ alfanous-console -h - usage: alfanous-console [flags] - ------------ -Quick Start ------------ -.. code-block:: python - - # coding: utf-8 - - # import Output object - from alfanous.Outputs import Raw - - # import default Paths - from alfanous.Data import Paths - - # Initialize search engines - RAWoutput = Raw( - QSE_index = Paths.QSE_INDEX , # Quranic Main index path - TSE_index = Paths.TSE_INDEX, # Translations index path - WSE_index = Paths.WSE_INDEX, # Quranic words index path - Recitations_list_file = Paths.RECITATIONS_LIST_FILE, - Translations_list_file = Paths.TRANSLATIONS_LIST_FILE , - Hints_file = Paths.HINTS_FILE, - Stats_file = Paths.STATS_FILE, - Information_file = Paths.INFORMATION_FILE - ) - - ## prepare a suggestion query - suggest_flags = { - "action":"suggest", - "query": "ابراهيم" - } - results = RAWoutput.do( suggest_flags ) - - print "number of missed words", len(results["suggest"]) - - - ## prepare a search query - search_flags = { - "action":"search", - "query": "الحمد لله", - "sortedby":"mushaf", - "reverse_order": False, - "page": 1, - "word_info": True, - "highlight": "css", - "script": "standard", - "sura_info": True, - "aya_position_info": True, - "aya_theme_info": False, - "aya_stat_info": False, - "aya_sajda_info": True, - "translation": 2, - } - - results = RAWoutput.do( search_flags ) - - print "runtime", results["search"]["runtime"] - print "total", results["search"]["interval"]["total"] - -see `sample.py `_. - --------------- -Flags --------------- - -======== ==================== ================= ================ ============================================ ================= ======================================================================================================================================================================== - number flag related action related unit description default value accepted values --------- -------------------- ----------------- ---------------- -------------------------------------------- ----------------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ - 1 **action** action to perform "search" search | suggest | show - 2 unit search, suggest search unit "aya" aya | word | translation - 2 ident identifier of requester [experimental] "undefined" undefined - 3 platform platform used by requester "undefined" undefined | wp7 | s60 | android | ios | linux | window - 4 domain web domain of requester if applicable "undefined" \* - 5a **query** search,suggest query attached to action "" \* - 5b **query** show query attached to action "" all | translations |recitations | information | hints | surates | chapters | defaults | flags | fields | fields_reverse | errors | domains | help_messages | roots - 6 highlight search highlight method "css" css | html | genshi | bold | bbcode - 7 script search aya, word script of aya text "standard" standard | uthmani - 8 vocalized search aya, word enable vocalization of aya text "True" True | False - 9 recitation search aya recitation id "1" 1 to 30 - 10 translation search aya, trans translation id "None" \* - 11 romanization search aya, word type of romanization "none" none | buckwalter | iso | arabtex - 12a view search aya, word pre-defined configuration for view "custom" minimal | normal | full | statistic | linguistic | custom - 12b view search translation pre-defined configuration for view "custom" minimal | normal | full | custom - 13 prev_aya search aya enable previous aya retrieving "False" True | False - 14 next_aya search aya enable next aya retrieving "False" True | False - 15 sura_info search aya enable sura information retrieving "True" True | False - 16 sura_stat_info search aya enable sura stats retrieving "False" True | False - 17 word_info search aya, word enable word information retrieving "True" True | False - 17a word_synonyms search aya enable retrieving of keyword synonyms "False" True | False - 17b word_derivations search aya enable retrieving of keyword derivations "True" True | False - 17c word_vocalizations search aya enable retrieving of keyword vocalizations "True" True | False - 18 aya_position_info search aya enable aya position information retrieving "True" True | False - 19 aya_theme_info search aya enable aya theme information retrieving "True" True | False - 20 aya_stat_info search aya enable aya stat information retrieving "True" True | False - 21 aya_sajda_info search aya enable aya sajda information retrieving "True" True | False - 22 annotation_word search aya, word enable query terms annotations retrieving "False" True | False - 23 annotation_aya search aya enable aya words annotations retrieving "False" True | False - 24 sortedby search aya sorting order of results "score" total | score | mushaf | tanzil | subject - 25 offset search starting offset of results "1" 1 to 6236 - 26 range search range of results "10" 1 to 25 - 27 page search page number [override offset] "1" 1 to 6236 - 28 perpage search results per page [override range] "10" 1 to 25 - 29 fuzzy search aya fuzzy search [exprimental] "False" True | False - 30 aya search word,trans enable retrieving of aya text "True" True | False - -======== ==================== ================= ================ ============================================ ================= ======================================================================================================================================================================== - ------------------------ -Advanced Query Examples ------------------------ - -Aya Search: - -* Simple search: الحمد -* Phrases : "الحمد لله" -* Logical relations - ANDNOT : (الصلاة - الزكاة) -* Logical relations - AND : الصلاة + الزكاة -* Logical relations - OR : الصلاة | الزكاة -* Joker \* : \*نبي\* -* Joker \? : نعم؟ -* Fielded search : سورة:يس ( look for other Fields_ ) -* Fielded search (2) : سجدة:نعم -* Intervals : رقم_السورة:[1 الى 5] و الله -* Partial vocalization : آية_:'مَن' -* Tuples (root,type= أداة | اسم | فعل) as: {قول،اسم} -* Derivations - lemma : >مالك -* Derivations - root : >>مالك - -Translation Search: - -* Exact search: god -* Phrase search: "seven heavens" -* Logical relations - OR: prayer ANDNOT charity -* Logical relations - AND: prayer AND charity -* Logical relations - OR: prayer OR charity -* Wildcards - Joker \*: pray* -* Wildcards - Joker \?: produc? -* Fielded search: lang:fr -* Fielded search (2) : author:Shakir - ------- -Fields ------- -* Aya Search Fields: - -===== ==================== =================== =================== ============================================================ - n عربي English Values Description ------ -------------------- ------------------- ------------------- ------------------------------------------------------------ - 1 رقم gid 1 to 6236 Global order of Aya in the whole Quran - 2 رقم_الآية aya_id 1 to 300 order of Aya inside its Sura - 3 آية aya Text Aya non-vocalized standard text ( used for search) - 4 آية_ aya_ Text Aya vocalized standard text ( used for show/search) - 5 عثماني uth Text Aya vocalized uthmani text ( used for show/search) - 6 عثماني_ uth_ Text Aya vocalized uthmani text ( used for show) - 7 موضوع subject Text Thematic Division: **Chapter** > **Topic** > **Subtopic** - 8 فصل chapter Text Thematic Division: **Chapter** > Topic > Subtopic - 9 فرع topic Text Thematic Division: Chapter > **Topic** > Subtopic - 10 باب subtopic Text Thematic Division: Chapter > Topic > **Subtopic** - 11 رقم_السورة sura_id 1 to 114 Order of Sura in Mus-haf - 12 سورة sura_arabic Text Arabic Name of Sura - 12+ سورة_إنجليزي sura_english Text English Name of Sura - 12+ سورة_تهجئة sura Text Romanized Name of Sura - 13 نوع_السورة sura_type_arabic مدنية|مكية Revelation place of Sura [Arabic] - 13+ نوع_السورة_إنجليزي sura_type Meccan|Medinan Revelation place of Sura [English] - 14 ترتيب_السورة sura_order 1 to 114 Revelation order of Sura - 15 جزء juz 1 to 30 Structural Division : **Juz** > Hizb > Rub - 16 حزب hizb 1 to 60 Structural Division : Juz > **Hizb** > Rub - 17 نصف nisf 1 to 2 Deprecated - 18 ربع rub 1 to 4 Structural Division : Juz > Hizb > **Rub** - 19 صفحة page Number Structural Division : Page - 19+ صفحة_هندي page_IN Number Structural Division : Page (INDIAN MUSHAF) - 20 منزل manzil 1 to 7 Structural Division : **Manzil** > Ruku - 21 ركوع ruku Number Structural Division : Manzil > **Ruku** - 22 سجدة sajda نعم | لا Test existence of a Sajda - 23 رقم_السجدة sajda_id 1 | 14 Order of the Sajda if exist - 24 نوع_السجدة sajda_type واجبة|مستحبة Type of the Sajda if exist - 25 ح_س s_l Number Number of **letters** in **Sura** - 26 ك_س s_w Number Number of **words** in **Sura** - 27 ج_س s_g Number Number of **God's names** in **Sura** - 28 آ_س s_a Number Number of **Ayas** in **Sura** - 29 ر_س s_r Number Number of **Ruku-s** in **Sura** - 30 ح_آ a_l Number Number of **letters** in **Aya** - 31 ك_آ a_w Number Number of **words** in **Aya** - 32 ج_آ a_g Number Number of **God's names** in **Aya** -===== ==================== =================== =================== ============================================================ - - ----------------- -SortedBy Options ----------------- -* Aya Search: -========== ================================================================================= - Option Description ----------- --------------------------------------------------------------------------------- - score The relevance of the results compared to the query keywords - mushaf The default order of ayas in Mus-haf - tanzil The revelation order - subject The alphabetic order of the values for subjects fields - ayalenght The length of ayah from the shortest to the longest - FIELD The numerical order or alphabetic order of a costum field (see Fields_ ) - -========== ================================================================================= - - --------------- -Schema Samples --------------- -* Aya Search: - -Suggestions -^^^^^^^^^^^ -flags: - -.. code-block:: python - - { - "action"="suggest", - "query"="مءصدة" - } - -response: - -.. code-block:: python - - { - "suggest": [ - ["\u0645\u0621\u0635\u062f\u0629", - ["\u0645\u0642\u062a\u0635\u062f\u0629", "\u0645\u0624\u0635\u062f\u0629"] - ] - ], - "error": { - "msg": "success ## action=suggest ; query=\u0645\u0621\u0635\u062f\u0629", - "code": 0 - } - } - -Results -^^^^^^^ -flags: - -.. code-block:: python - - { - "action":"search", - "query": "الكوثر", - "sortedby":"score", - "page": 1, - "word_info":True, - "highlight":"css", - "script": "standard", - "prev_aya": True, - "next_aya": True, - "sura_info": True, - "aya_position_info": True, - "aya_theme_info": True, - "aya_stat_info": True, - "aya_sajda_info": True, - "annotation_word": True, - "annotation_aya": True, - "translation":"None", - "recitation": 1 - - } - -response: - -.. code-block:: python - - { - - "search": { - "runtime": 1.0951571464538574, - "interval": { - "start": 1, - "total": 1, - "end": 1 - } - "words": { - "global": { - "nb_words": 1, - "nb_matches": 1, - "nb_vocalizations": 1, - }, - "individual": { - - "1": { - "word": "\u0627\u0644\u0643\u0648\u062b\u0631", - "nb_matches": 1, - "nb_ayas": 1, - "nb_vocalizations": 1, - "vocalizations": ["\u0627\u0644\u0652\u0643\u064e\u0648\u0652\u062b\u064e\u0631\u064e"], - }, - }, - - }, - - "ayas": { - "1": { - - "identifier": { - "gid": 6205, - "aya_id": 1, - "sura_id": 108, - "sura_name": "\u0627\u0644\u0643\u0648\u062b\u0631", - - }, - "aya": { - "id": 1, - "text": "\u0625\u0650\u0646\u0651\u064e\u0627 \u0623\u064e\u0639\u0652\u0637\u064e\u064a\u0652\u0646\u064e\u0627\u0643\u064e \u0627\u0644\u0652\u0643\u064e\u0648\u0652\u062b\u064e\u0631\u064e", - "recitation": "http://www.everyayah.com/data/Abdul_Basit_Murattal_64kbps/108001.mp3", - "translation": null, - "prev_aya": { - "id": 7, - "sura": "\u0627\u0644\u0645\u0627\u0639\u0648\u0646", - "text": "\u0648\u064e\u064a\u064e\u0645\u0652\u0646\u064e\u0639\u064f\u0648\u0646\u064e \u0627\u0644\u0652\u0645\u064e\u0627\u0639\u064f\u0648\u0646\u064e", - }, - "next_aya": { - "id": 2, - "sura": "\u0627\u0644\u0643\u0648\u062b\u0631", - "text": "\u0641\u064e\u0635\u064e\u0644\u0651\u0650 \u0644\u0650\u0631\u064e\u0628\u0651\u0650\u0643\u064e \u0648\u064e\u0627\u0646\u0652\u062d\u064e\u0631\u0652", - }, - }, - - - "sura": { - "id": 108, - "name": "\u0627\u0644\u0643\u0648\u062b\u0631", - "type": "\u0645\u0643\u064a\u0629", - "order": 15, - "ayas": 3, - "stat": { - "words": 10, - "letters": 42, - "godnames": 0, - - }, - }, - "theme": { - "chapter": "\u0623\u0631\u0643\u0627\u0646 \u0627\u0644\u0625\u0633\u0644\u0627\u0645 ", - "topic": "\u0627\u0644\u062d\u062c \u0648\u0627\u0644\u0639\u0645\u0631\u0629 ", - "subtopic": null - }, - - - "position": { - "rub": 0, - "manzil": 7, - "ruku": 550, - "hizb": 60, - "page": 602 - }, - "sajda": { - "exist": false, - "id": null, - "type": null - }, - - "stat": { - "letters": 16, - "godnames": 0, - "words": 3 - }, - "annotations": { - "1": { - "arabicroot": null, - "arabicmood": null, - "number": null, - "spelled": "\u0627\u0646\u0627\u0653", - "aspect": null, - "word_gid": 75871, - "word_id": 1, - "mood": null, - "arabicspecial": "\u0625\u0650\u0646\u0651", - "state": null, - "arabiclemma": "\u0625\u0650\u0646\u0651", - "gid": 116333, - "type": "Particles", - "aya_id": 1, - "arabictoken": null, - "form": null, - "pos": "Accusative particle", - "arabiccase": "\u0645\u0646\u0635\u0648\u0628", - "part": "\u062c\u0630\u0639", - "normalized": "\u0625\u0646\u0627\u0653", - "case": "Accusative case", - "sura_id": 108, - "word": "\u0625\u0650\u0646\u0651\u064e\u0627\u0653", - "derivation": null, - "arabicpos": "\u062d\u0631\u0641 \u0646\u0635\u0628", - "person": null, - "token": null, - "gender": null, - "voice": null, - "order": 1 - }, - "2": { - "arabicroot": "\u0639\u0637\u0648", - "arabicmood": null, - "number": "\u062c\u0645\u0639", - "spelled": "\u0627\u0639\u0637\u064a\u0646\u0670\u0643", - "aspect": "Perfect verb", - "word_gid": 75872, - "word_id": 2, - "mood": null, - "arabicspecial": null, - "state": null, - "arabiclemma": null, - "gid": 116335, - "type": "Verbs", - "aya_id": 1, - "arabictoken": null, - "form": "Fourth form", - "pos": "Verb", - "arabiccase": null, - "part": "\u062c\u0630\u0639", - "normalized": "\u0623\u0639\u0637\u064a\u0646\u0670\u0643", - "case": null, - "sura_id": 108, - "word": "\u0623\u064e\u0639\u0652\u0637\u064e\u064a\u0652\u0646\u064e\u0670\u0643\u064e", - "derivation": null, - "arabicpos": "\u0641\u0639\u0644", - "person": "\u0645\u062a\u0643\u0644\u0645", - "token": null, - "gender": "\u0645\u0630\u0651\u0643\u0631", - "voice": null, - "order": 1 - }, - "3": { - "arabicroot": null, - "arabicmood": null, - "number": null, - "spelled": "\u0671\u0644\u0643\u0648\u062b\u0631", - "aspect": null, - "word_gid": 75873, - "word_id": 3, - "mood": null, - "arabicspecial": null, - "state": null, - "arabiclemma": null, - "gid": 116337, - "type": "determiner", - "aya_id": 1, - "arabictoken": "\u0627\u0644", - "form": null, - "pos": null, - "arabiccase": null, - "part": "\u0633\u0627\u0628\u0642", - "normalized": "\u0671\u0644\u0643\u0648\u062b\u0631", - "case": null, - "sura_id": 108, - "word": "\u0671\u0644\u0652\u0643\u064e\u0648\u0652\u062b\u064e\u0631\u064e", - "derivation": null, - "arabicpos": null, - "person": null, - "token": "al", - "gender": null, - "voice": null, - "order": 1 - } - }, - }, - }, - "translation_info": {}, - }, - - "error": { - "code": 0, - "msg": "success ## action=search ; query=\u0627\u0644\u0643\u0648\u062b\u0631", - } - } - - -Translations -^^^^^^^^^^^ -TODO - - -Information -^^^^^^^^^^^ -flags: - -.. code-block:: python - - { - "action"="show", - "query"="information" - } - -response: - -.. code-block:: python - - { - "show": { - "information": { - "engine": "Alfanous", - "wiki": "http://wiki.alfanous.org/doku.php?id=json_web_service", - "description": "Alfanous is a Quranic search engine provides simple and advanced search services in the diverse information of the Holy Quran .", - "author": "Assem chelli", - "version": "0.5", - "contact": "assem.ch@gmail.com", - "console_note": "this is console interface of Alfanous, try -h to get help ", - "json_output_system_note": "\n This is the JSON output system of Alfanous project .This feature is in Alpha test and the Json schema may be it's not stable . We are waiting for real feadbacks and suggestions to improve its efficacity,quality and stability. To contact the author ,please send a direct email to assem.ch[at]gmail.com or to the mailing list alfanous [at] googlegroups.com\n

For more details visit the page of this service here\n " - } - }, - "error": { - "msg": "success ## action=show ; query=information", - "code": 0 - } - } - - -Recitations -^^^^^^^^^^^ - -flags: - -.. code-block:: python - - { - "action"="show", - "query"="recitations" - } - -response (sample): - -.. code-block:: python - - { - "show": { - "recitations": { - "45": { - "bitrate": "192kbps", - "name": "English/Ibrahim Walk TEST", - "subfolder": "English/Ibrahim_Walk_192kbps_TEST" - }, - "54": { - "bitrate": "128kbps", - "name": "Salah Al Budair", - "subfolder": "Salah_Al_Budair_128kbps" - } - - - } - }, - "error": { - "msg": "success ## action=show ; query=recitations", - "code": 0 - } - } - - -Fields -^^^^^^ - -flags: - -.. code-block:: python - - { - "action"="show", - "query"="fields" - } - -response: - -.. code-block:: python - - { - "show": { - "fields": { - "جزء": "juz", - "عثماني ": "uth", - "نوع_السورة": "sura_type", - "رقم_السجدة": "sajda_id", - "صفحة": "page", - "ربع": "rub", - "ر_س": "s_r", - "ركوع": "ruku", - "رقم_السورة": "sura_id", - "آ_س": "s_a", - "آية_": "aya_", - "موضوع": "subject", - "ج_س": "s_g", - "ك_آ": "a_w", - "فصل": "chapter", - "ح_آ": "a_l", - "سورة": "sura", - "فرع": "topic", - "آية": "aya", - "رقم_الآية": "aya_id", - "عثماني_": "uth_", - "ك_س": "s_w", - "نوع_السجدة": "sajda_type", - "رقم": "gid", - "باب": "subtopic", - "نصف": "nisf", - "ح_س": "s_l", - "حزب": "hizb", - "منزل": "manzil", - "ج_آ": "a_g", - "سجدة": "sajda", - "ترتيب_السورة": "sura_order" - } - }, - "error": { - "msg": "success ## action=show ; query=fields", - "code": 0 - } - } - - - diff --git a/src/alfanous/TextProcessing.py b/src/alfanous/TextProcessing.py index eba077252..6ecdb374a 100755 --- a/src/alfanous/TextProcessing.py +++ b/src/alfanous/TextProcessing.py @@ -34,7 +34,7 @@ from alfanous.Support.PyArabic.araby import strip_tashkeel, strip_tatweel,strip_shadda, normalize_spellerrors, normalize_hamza, normalize_lamalef, normalize_uthmani_symbols # , HARAKAT_pat, from alfanous.Support.PyArabic.araby import FATHATAN, DAMMATAN, KASRATAN, FATHA, DAMMA, KASRA, SUKUN, SHADDA # * -from alfanous.Constants import INVERTEDSHAPING +from alfanous.constants import INVERTEDSHAPING # from alfanous.dynamic_resources import stopwords_dyn ##should test existence before importing diff --git a/src/alfanous/alfanous.Support.PyArabic.rst b/src/alfanous/alfanous.Support.PyArabic.rst deleted file mode 100644 index 1634b5725..000000000 --- a/src/alfanous/alfanous.Support.PyArabic.rst +++ /dev/null @@ -1,59 +0,0 @@ -PyArabic Package -================ - -:mod:`PyArabic` Package ------------------------ - -.. automodule:: alfanous.Support.PyArabic - :members: - :undoc-members: - :show-inheritance: - -:mod:`Araby_Statistics` Module ------------------------------- - -.. automodule:: alfanous.Support.PyArabic.Araby_Statistics - :members: - :undoc-members: - :show-inheritance: - -:mod:`araby` Module -------------------- - -.. automodule:: alfanous.Support.PyArabic.araby - :members: - :undoc-members: - :show-inheritance: - -:mod:`araby_constants` Module ------------------------------ - -.. automodule:: alfanous.Support.PyArabic.araby_constants - :members: - :undoc-members: - :show-inheritance: - -:mod:`araby_normalizers` Module -------------------------------- - -.. automodule:: alfanous.Support.PyArabic.araby_normalizers - :members: - :undoc-members: - :show-inheritance: - -:mod:`araby_predicates` Module ------------------------------- - -.. automodule:: alfanous.Support.PyArabic.araby_predicates - :members: - :undoc-members: - :show-inheritance: - -:mod:`araby_strip_functions` Module ------------------------------------ - -.. automodule:: alfanous.Support.PyArabic.araby_strip_functions - :members: - :undoc-members: - :show-inheritance: - diff --git a/src/alfanous/alfanous.Support.rst b/src/alfanous/alfanous.Support.rst deleted file mode 100644 index 53e9704ed..000000000 --- a/src/alfanous/alfanous.Support.rst +++ /dev/null @@ -1,19 +0,0 @@ -Support Package -=============== - -:mod:`Support` Package ----------------------- - -.. automodule:: alfanous.Support - :members: - :undoc-members: - :show-inheritance: - -Subpackages ------------ - -.. toctree:: - - alfanous.Support.PyArabic - alfanous.Support.whoosh - diff --git a/src/alfanous/alfanous.Support.whoosh.filedb.rst b/src/alfanous/alfanous.Support.whoosh.filedb.rst deleted file mode 100644 index b53b6a03e..000000000 --- a/src/alfanous/alfanous.Support.whoosh.filedb.rst +++ /dev/null @@ -1,67 +0,0 @@ -filedb Package -============== - -:mod:`fileindex` Module ------------------------ - -.. automodule:: alfanous.Support.whoosh.filedb.fileindex - :members: - :undoc-members: - :show-inheritance: - -:mod:`filepostings` Module --------------------------- - -.. automodule:: alfanous.Support.whoosh.filedb.filepostings - :members: - :undoc-members: - :show-inheritance: - -:mod:`filereading` Module -------------------------- - -.. automodule:: alfanous.Support.whoosh.filedb.filereading - :members: - :undoc-members: - :show-inheritance: - -:mod:`filestore` Module ------------------------ - -.. automodule:: alfanous.Support.whoosh.filedb.filestore - :members: - :undoc-members: - :show-inheritance: - -:mod:`filetables` Module ------------------------- - -.. automodule:: alfanous.Support.whoosh.filedb.filetables - :members: - :undoc-members: - :show-inheritance: - -:mod:`filewriting` Module -------------------------- - -.. automodule:: alfanous.Support.whoosh.filedb.filewriting - :members: - :undoc-members: - :show-inheritance: - -:mod:`postpool` Module ----------------------- - -.. automodule:: alfanous.Support.whoosh.filedb.postpool - :members: - :undoc-members: - :show-inheritance: - -:mod:`structfile` Module ------------------------- - -.. automodule:: alfanous.Support.whoosh.filedb.structfile - :members: - :undoc-members: - :show-inheritance: - diff --git a/src/alfanous/alfanous.Support.whoosh.lang.rst b/src/alfanous/alfanous.Support.whoosh.lang.rst deleted file mode 100644 index 0d64dfe10..000000000 --- a/src/alfanous/alfanous.Support.whoosh.lang.rst +++ /dev/null @@ -1,51 +0,0 @@ -lang Package -============ - -:mod:`lovins` Module --------------------- - -.. automodule:: alfanous.Support.whoosh.lang.lovins - :members: - :undoc-members: - :show-inheritance: - -:mod:`morph_en` Module ----------------------- - -.. automodule:: alfanous.Support.whoosh.lang.morph_en - :members: - :undoc-members: - :show-inheritance: - -:mod:`paicehusk` Module ------------------------ - -.. automodule:: alfanous.Support.whoosh.lang.paicehusk - :members: - :undoc-members: - :show-inheritance: - -:mod:`porter` Module --------------------- - -.. automodule:: alfanous.Support.whoosh.lang.porter - :members: - :undoc-members: - :show-inheritance: - -:mod:`porter2` Module ---------------------- - -.. automodule:: alfanous.Support.whoosh.lang.porter2 - :members: - :undoc-members: - :show-inheritance: - -:mod:`wordnet` Module ---------------------- - -.. automodule:: alfanous.Support.whoosh.lang.wordnet - :members: - :undoc-members: - :show-inheritance: - diff --git a/src/alfanous/alfanous.Support.whoosh.qparser.rst b/src/alfanous/alfanous.Support.whoosh.qparser.rst deleted file mode 100644 index 16732da04..000000000 --- a/src/alfanous/alfanous.Support.whoosh.qparser.rst +++ /dev/null @@ -1,35 +0,0 @@ -qparser Package -=============== - -:mod:`qparser` Package ----------------------- - -.. automodule:: alfanous.Support.whoosh.qparser - :members: - :undoc-members: - :show-inheritance: - -:mod:`default` Module ---------------------- - -.. automodule:: alfanous.Support.whoosh.qparser.default - :members: - :undoc-members: - :show-inheritance: - -:mod:`ngram` Module -------------------- - -.. automodule:: alfanous.Support.whoosh.qparser.ngram - :members: - :undoc-members: - :show-inheritance: - -:mod:`simple` Module --------------------- - -.. automodule:: alfanous.Support.whoosh.qparser.simple - :members: - :undoc-members: - :show-inheritance: - diff --git a/src/alfanous/alfanous.Support.whoosh.rst b/src/alfanous/alfanous.Support.whoosh.rst deleted file mode 100644 index dc8efff69..000000000 --- a/src/alfanous/alfanous.Support.whoosh.rst +++ /dev/null @@ -1,149 +0,0 @@ -whoosh Package -============== - -:mod:`whoosh` Package ---------------------- - -.. automodule:: alfanous.Support.whoosh - :members: - :undoc-members: - :show-inheritance: - -:mod:`analysis` Module ----------------------- - -.. automodule:: alfanous.Support.whoosh.analysis - :members: - :undoc-members: - :show-inheritance: - -:mod:`classify` Module ----------------------- - -.. automodule:: alfanous.Support.whoosh.classify - :members: - :undoc-members: - :show-inheritance: - -:mod:`fields` Module --------------------- - -.. automodule:: alfanous.Support.whoosh.fields - :members: - :undoc-members: - :show-inheritance: - -:mod:`formats` Module ---------------------- - -.. automodule:: alfanous.Support.whoosh.formats - :members: - :undoc-members: - :show-inheritance: - -:mod:`highlight` Module ------------------------ - -.. automodule:: alfanous.Support.whoosh.highlight - :members: - :undoc-members: - :show-inheritance: - -:mod:`index` Module -------------------- - -.. automodule:: alfanous.Support.whoosh.index - :members: - :undoc-members: - :show-inheritance: - -:mod:`postings` Module ----------------------- - -.. automodule:: alfanous.Support.whoosh.postings - :members: - :undoc-members: - :show-inheritance: - -:mod:`query` Module -------------------- - -.. automodule:: alfanous.Support.whoosh.query - :members: - :undoc-members: - :show-inheritance: - -:mod:`reading` Module ---------------------- - -.. automodule:: alfanous.Support.whoosh.reading - :members: - :undoc-members: - :show-inheritance: - -:mod:`scoring` Module ---------------------- - -.. automodule:: alfanous.Support.whoosh.scoring - :members: - :undoc-members: - :show-inheritance: - -:mod:`searching` Module ------------------------ - -.. automodule:: alfanous.Support.whoosh.searching - :members: - :undoc-members: - :show-inheritance: - -:mod:`spelling` Module ----------------------- - -.. automodule:: alfanous.Support.whoosh.spelling - :members: - :undoc-members: - :show-inheritance: - -:mod:`store` Module -------------------- - -.. automodule:: alfanous.Support.whoosh.store - :members: - :undoc-members: - :show-inheritance: - -:mod:`system` Module --------------------- - -.. automodule:: alfanous.Support.whoosh.system - :members: - :undoc-members: - :show-inheritance: - -:mod:`util` Module ------------------- - -.. automodule:: alfanous.Support.whoosh.util - :members: - :undoc-members: - :show-inheritance: - -:mod:`writing` Module ---------------------- - -.. automodule:: alfanous.Support.whoosh.writing - :members: - :undoc-members: - :show-inheritance: - -Subpackages ------------ - -.. toctree:: - - alfanous.Support.whoosh.filedb - alfanous.Support.whoosh.lang - alfanous.Support.whoosh.qparser - alfanous.Support.whoosh.support - diff --git a/src/alfanous/alfanous.Support.whoosh.support.rst b/src/alfanous/alfanous.Support.whoosh.support.rst deleted file mode 100644 index fdfecc443..000000000 --- a/src/alfanous/alfanous.Support.whoosh.support.rst +++ /dev/null @@ -1,43 +0,0 @@ -support Package -=============== - -:mod:`bitstream` Module ------------------------ - -.. automodule:: alfanous.Support.whoosh.support.bitstream - :members: - :undoc-members: - :show-inheritance: - -:mod:`bitvector` Module ------------------------ - -.. automodule:: alfanous.Support.whoosh.support.bitvector - :members: - :undoc-members: - :show-inheritance: - -:mod:`charset` Module ---------------------- - -.. automodule:: alfanous.Support.whoosh.support.charset - :members: - :undoc-members: - :show-inheritance: - -:mod:`filelock` Module ----------------------- - -.. automodule:: alfanous.Support.whoosh.support.filelock - :members: - :undoc-members: - :show-inheritance: - -:mod:`levenshtein` Module -------------------------- - -.. automodule:: alfanous.Support.whoosh.support.levenshtein - :members: - :undoc-members: - :show-inheritance: - diff --git a/src/alfanous/alfanous.dynamic_resources.rst b/src/alfanous/alfanous.dynamic_resources.rst deleted file mode 100644 index e350a3f5c..000000000 --- a/src/alfanous/alfanous.dynamic_resources.rst +++ /dev/null @@ -1,67 +0,0 @@ -dynamic_resources Package -========================= - -:mod:`dynamic_resources` Package --------------------------------- - -.. automodule:: alfanous.dynamic_resources - :members: - :undoc-members: - :show-inheritance: - -:mod:`arabicnames_dyn` Module ------------------------------ - -.. automodule:: alfanous.dynamic_resources.arabicnames_dyn - :members: - :undoc-members: - :show-inheritance: - -:mod:`derivations_dyn` Module ------------------------------ - -.. automodule:: alfanous.dynamic_resources.derivations_dyn - :members: - :undoc-members: - :show-inheritance: - -:mod:`std2uth_dyn` Module -------------------------- - -.. automodule:: alfanous.dynamic_resources.std2uth_dyn - :members: - :undoc-members: - :show-inheritance: - -:mod:`stopwords_dyn` Module ---------------------------- - -.. automodule:: alfanous.dynamic_resources.stopwords_dyn - :members: - :undoc-members: - :show-inheritance: - -:mod:`synonymes_dyn` Module ---------------------------- - -.. automodule:: alfanous.dynamic_resources.synonymes_dyn - :members: - :undoc-members: - :show-inheritance: - -:mod:`vocalizations_dyn` Module -------------------------------- - -.. automodule:: alfanous.dynamic_resources.vocalizations_dyn - :members: - :undoc-members: - :show-inheritance: - -:mod:`word_props_dyn` Module ----------------------------- - -.. automodule:: alfanous.dynamic_resources.word_props_dyn - :members: - :undoc-members: - :show-inheritance: - diff --git a/src/alfanous/alfanous.rst b/src/alfanous/alfanous.rst deleted file mode 100644 index 2631c953b..000000000 --- a/src/alfanous/alfanous.rst +++ /dev/null @@ -1,155 +0,0 @@ -alfanous Package -================ - -:mod:`alfanous` Package ------------------------ - -.. automodule:: alfanous.__init__ - :members: - :undoc-members: - :show-inheritance: - -:mod:`Constants` Module ------------------------ - -.. automodule:: alfanous.Constants - :members: - :undoc-members: - :show-inheritance: - -:mod:`Data` Module ------------------- - -.. automodule:: alfanous.Data - :members: - :undoc-members: - :show-inheritance: - -:mod:`Exceptions` Module ------------------------- - -.. automodule:: alfanous.Exceptions - :members: - :undoc-members: - :show-inheritance: - -:mod:`Indexing` Module ----------------------- - -.. automodule:: alfanous.Indexing - :members: - :undoc-members: - :show-inheritance: - -:mod:`Misc` Module ------------------- - -.. automodule:: alfanous.Misc - :members: - :undoc-members: - :show-inheritance: - -:mod:`Outputs` Module ---------------------- - -.. automodule:: alfanous.Outputs - :members: - :undoc-members: - :show-inheritance: - -:mod:`QueryProcessing` Module ------------------------------ - -.. automodule:: alfanous.QueryProcessing - :members: - :undoc-members: - :show-inheritance: - -:mod:`ResultsProcessing` Module -------------------------------- - -.. automodule:: alfanous.ResultsProcessing - :members: - :undoc-members: - :show-inheritance: - -:mod:`Romanization` Module --------------------------- - -.. automodule:: alfanous.Romanization - :members: - :undoc-members: - :show-inheritance: - -:mod:`Searching` Module ------------------------ - -.. automodule:: alfanous.Searching - :members: - :undoc-members: - :show-inheritance: - -:mod:`Suggestions` Module -------------------------- - -.. automodule:: alfanous.Suggestions - :members: - :undoc-members: - :show-inheritance: - -:mod:`TextProcessing` Module ----------------------------- - -.. automodule:: alfanous.TextProcessing - :members: - :undoc-members: - :show-inheritance: - -:mod:`Threading` Module ------------------------ - -.. automodule:: alfanous.Threading - :members: - :undoc-members: - :show-inheritance: - -:mod:`console` Module ---------------------- - -.. automodule:: alfanous.console - :members: - :undoc-members: - :show-inheritance: - -:mod:`ez_setup` Module ----------------------- - -.. automodule:: alfanous.ez_setup - :members: - :undoc-members: - :show-inheritance: - -:mod:`main` Module ------------------- - -.. automodule:: alfanous.main - :members: - :undoc-members: - :show-inheritance: - -:mod:`setup` Module -------------------- - -.. automodule:: alfanous.setup - :members: - :undoc-members: - :show-inheritance: - -Subpackages ------------ - -.. toctree:: - - alfanous.Support - alfanous.dynamic_resources - diff --git a/src/alfanous/configs/daemon.json b/src/alfanous/configs/daemon.json deleted file mode 100644 index 743063d20..000000000 --- a/src/alfanous/configs/daemon.json +++ /dev/null @@ -1,4 +0,0 @@ -{ -"max_instances": 100, - -} \ No newline at end of file diff --git a/src/alfanous/Constants.py b/src/alfanous/constants.py similarity index 100% rename from src/alfanous/Constants.py rename to src/alfanous/constants.py diff --git a/src/alfanous/indexes/README.rst b/src/alfanous/indexes/README.rst deleted file mode 100644 index e69de29bb..000000000