Skip to content

Python library to read and extract information from the Quranic Arabic Corpus

Notifications You must be signed in to change notification settings

elreynol/python-qurancorpus

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Quran Corpus Python Parser

Python library to read and extract information from the Quranic Arabic Corpus.

Requirments

Install

sudo pip install qurancorpus

or

sudo python setup.py install

Usage

  • Parse a morphology line

      >>> from qurancorpus import MorphologyParser
      >>> MorphologyParser.parse("fa+ POS:INTG LEM:maA l:P+")
      {'prefixes': [{'token': 'fa', 'type': '--undefined--'}], 'base': [{'lemma': 'maA', 'arabiclemma': u'\u0645\u064e\u0627', 'arabicpos': u'\u062d\u0631\u0641 \u0627\u0633\u062a\u0641\u0647\u0627\u0645', 'type': 'Particles', 'pos': 'Interogative particle'}], 'suffixes': []}
    
  • List corpus words:

      >>> from qurancorpus import API
      >>> A = API(source="data/quranic-corpus-morpology.xml")
      A.all_words_generator()  # all words
      A.unique_words() # unique only
    

About

Python library to read and extract information from the Quranic Arabic Corpus

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.6%
  • Shell 0.4%