Alfanous is a Quranic search engine provides simple and advanced search services in the diverse information of the Holy Quran and is built on the foundations of modern search engines to ensure high stability and high-speed search and we aspire to provide the benefits of facilitating the search for the user like highlight,suggestions ...Etc..
Alfanous is a search engine in the Arabic language necessarily and it provides the morphological analysis , starting from the extraction of roots and other processes different and this will give the user more liberty in the formulation of queries,and also increases the accuracy of the research and its comprehensiveness.
Alfanous is a programming interface (API) a tool of developers working on programs related to the Qur’an and want to take advantage of the search services provided by alfanous
- Advanced search features
- Fielded Search
- jokers (regular expression)
- logical relations
- Phrase Search
- Intervals search
- Additional Features
- spelling Suggestions
- pagination
- Sorting
- Highlight
- Language options
- Signification
- Synonyms and Antonyms (to do)
- Diacritics
- Affixes
- Arabic word Root
- Verb Conjugaisons
- Nouns derivations
- Arabic word type
- Arabic word Pattern (to do)
- Spell Errors :hamza formes,some similar letters
- Options Qur’anic
- Search in Uthmani script
- Extend the search to all qur’anic sciences (to do)
- the ability to search using special indexes
- Structural options
- Statistical Informations
- Other
- Buckwalter query
>>> easy_install alfanous
import and call it
>>> from alfanous.main import QuranicSearchEngine
>>> QSE = QuranicSearchEngine()
<__main__.QuranicSearchEngine instance at 0xb77d168c>
find the results of a query
>>> results,_ =QSE.search_all(u"الحمد")
>>> for r in results:
>>> print r["aya"]
الحمد لله رب العالمين
show more information about a result : sura’s name, aya’s number ,aya’s vocalized text
>>> for r in results:
>>> print r["sura_name"],":",r["aya_id"],":",r["aya_"]
الفاتحة:2:الْحَمْدُ لِلَّهِ رَبِّ الْعَالَمِينَ
find the terms used to search from a query
>>> _,terms =QSE.search_all(u"الحمد")
>>> print terms
[("aya",u"الحمد")]
>>> print ",".join([term[1] for term in list(terms)])
الحمد
use the terms to highlight the aya text
>>> Qhighlight(u"الْحَمْدُ لِلَّهِ رَبِّ الْعَالَمِينَ", [u"الحمد", u"لله"])
<span style="color:red;font-size:100.0%"><b>الْحَمْدُ</b></span> <span style="color:green;font-size:100.0%"><b>لِلَّـهِ</b></span> رَبِّ الْعَالَمِينَ
get the search time and the number of results
>>> print "time=%f,number=%d" % (results.runtime,len(results))
time=0.100318,number=160
limit the number of results
>>> results,_ =QSE.search_all(u"الله",limit=10)
order the results by a specific order: score,mushaf,tanzil
>>> results,_ =QSE.search_all(u"الله",sortby="mushaf")
suggest the missed words in query
>>> for key, value in QSE.suggest_all(u" عاصمو ").items():
>>> print key, ":", ",".join(value)
عاصمو : عاصم
use the advanced queries to find exactly the results that you want
>>> سماكم
>>> >سماكم
>>> >>سماكم
>>> ال؟لك
>>> رسول * الله
>>> "رب العالمين"
>>> %المأصدة
>>> الصلاة و الزكاة
>>> الصلاة أو الزكاة
>>> الصلاة وليس الزكاة
>>> ~السعير
>>> #السعير
>>> سورة:الفاتحة
>>> رقم_السورة:[112 إلى 114]
>>> 'المَلك'
>>> {ملك,فعل}
>>> fawoqa