- Authors
- Release
0.7.30
- License
- Tracker
- Mailinglist
Install it from Pypi:
$ sudo pip install alfanous
You can use it from console:
$ alfanous-console -a search -q الله
$ alfanous-console -a search -q Allh
or from Python:
>>> import alfanous
>>> alfanous.search(u"الله")
>>> alfanous.do({"action":"search","query":u"الله"})
>>> alfanous.do({"action":"search","query":u"Allh"}) # Buckwalter transliteration
You can use it also from the web service:
http://alfanous.org/api/search?query=الله
http://alfanous.org/api/search?query=Allh
number | flag | related action | related unit | description | default value | accepted values |
---|---|---|---|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
- Aya Search Fields:
n | عربي | English | Values | Description |
---|---|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||
|
|
|
|
|
|
|
|
||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* 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 )
========== =================================================================================
- Aya Search:
flags:
{
"action"="suggest",
"query"="مءصدة"
}
response:
{
"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
}
}
flags:
{
"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:
{
"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 <span class=\"match term0\">\u0627\u0644\u0652\u0643\u064e\u0648\u0652\u062b\u064e\u0631\u064e</span>",
"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
flags:
{
"action"="show",
"query"="information"
}
response:
{
"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 <a href='http://json.org/'>JSON</a> output system of <a href=\"http://wiki.alfanous.org\">Alfanous</a> 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 <b> assem.ch[at]gmail.com</b> or to the mailing list <b>alfanous [at] googlegroups.com</b>\n <br/><br/> For more details visit the page of this service <a href=\"http://wiki.alfanous.org/doku.php?id=json_web_service\">here</a>\n "
}
},
"error": {
"msg": "success ## action=show ; query=information",
"code": 0
}
}
flags:
{
"action"="show",
"query"="recitations"
}
response (sample):
{
"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
}
}
flags:
{
"action"="show",
"query"="fields"
}
response:
{
"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
}
}
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):
$ 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:
$ cd ../../ $ make build
For more details check Makefile
To install the API from the source (After Build ):
$ sudo python setup.py install
A console interface will be installed automatically with the API:
$ alfanous-console -h
usage: alfanous-console [flags]
note: if you are looking for alfanous legacy code, you can find it under legacy branch