{ "info": { "author": "Alex Lee", "author_email": "alexlee@fastmail.net", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Console", "Intended Audience :: Education", "License :: OSI Approved :: GNU General Public License v2 (GPLv2)", "Natural Language :: Arabic", "Natural Language :: English", "Programming Language :: Python :: 3 :: Only", "Topic :: Education" ], "description": "# pyaramorph\n\n*An Arabic morphological analyzer and lexicon*\n\n## Introduction\n\n**pyaramorph** is a morphological analyzer and lexicon for the Arabic\nlanguage. It is a loose port of the [Buckwalter Arabic Morphological\nAnalyzer Version\n1.0](http://www.ldc.upenn.edu/Catalog/CatalogEntry.jsp?catalogId=LDC2002L49),\nthough it does not implement all of that program\u2019s functionality.\n\nThis software is supposed to provide quick successive analyses of single\nwords or short phrases. Buckwalter\u2019s original Perl script only supported\ninput in the `cp1256` encoding, and I really did not want to refit it\nfor UTF-8. (Also, given how long it has been since I worked with Perl\nand my preference for Python, it seemed worth it to do a Python\nrewrite.) The Java port of the same script,\n[AraMorph](http://www.nongnu.org/aramorph/), does accept UTF-8, but it\nonly processes specified input files, and its dictionary loading is\nquite slow. It\u2019s great for analyzing full texts, but not so much for\ninteractive analysis.\n\nThat\u2019s why I wrote this port. The script itself is quite simple \u2013 Tim\nBuckwalter really did all the hard work by putting together the\ndictionary and table files \u2013 so all credit for the functionality\nprovided by this program should go to him! I have simply re-written the\nprogram to suit my own needs.\n\n## Requirements\n\n1. [python](http://www.python.org/). Currently you need Python 3.\n2. A terminal emulator with UTF-8 and BiDi support. I use\n [mlterm](http://mlterm.sourceforge.net/) with\n [unifont](http://www.unifoundry.com/index.html) or\n [DejaVu Sans Mono](http://dejavu-fonts.org/wiki/Main_Page).\n (Here are some old though perhaps useful\n [setup instructions](http://lists.arabeyes.org/archives/general/2004/February/msg00004.html).)\n3. Ability to type in UTF-8 Arabic text. Linux/Unix users can try the\n Arabic layout included in my\n [Classical Input Methods for M17N](https://bitbucket.org/alexlee/m17n-classical),\n which are intended for use with\n [IBus](https://github.com/ibus/ibus/wiki).\n\n## Installation\n\nYou can install using `pip`, or from source with `python setup.py\ninstall`.\n\n## Usage\n\nOnce you have the software installed and your BiDi-enabled, UTF-8\ncapable terminal up and running, you simply need to run the `pyaramorph`\ncommand. At the prompt, enter an Arabic word or phrase, using Unicode.\nWords not written in the Arabic script will be ignored.\n\nThe session output below should give you an idea of how it works:\n\n alexlee@sartorius:~$ pyaramorph \n loading dictPrefixes ... loaded 299 entries\n loading dictStems ... loaded 38600 lemmas and 82158 entries\n loading dictSuffixes ... loaded 618 entries\n Unicode Arabic Morphological Analyzer (press ctrl-d to exit)\n $ \u0643\u062a\u0628 \u0643\u062a\u0627\u0628\u0627 \u0641\u064a \u0627\u0644\u0645\u0643\u062a\u0628\n analysis for: \u0643\u062a\u0628 ktb\n solution: (\u0643\u064e\u062a\u064e\u0628\u064e kataba) [katab-u_1]\n pos: katab/VERB_PERFECT+a/PVSUFF_SUBJ:3MS\n gloss: ___ + write + he/it \n\n solution: (\u0643\u064f\u062a\u0650\u0628\u064e kutiba) [katab-u_1]\n pos: kutib/VERB_PERFECT+a/PVSUFF_SUBJ:3MS\n gloss: ___ + be written;be fated;be destined + he/it \n\n solution: (\u0643\u064f\u062a\u064f\u0628 kutub) [kitAb_1]\n pos: kutub/NOUN\n gloss: ___ + books + ___\n\n analysis for: \u0643\u062a\u0627\u0628\u0627 ktAbA\n solution: (\u0643\u0650\u062a\u0627\u0628\u0627\u064b kitAbAF) [kitAb_1]\n pos: kitAb/NOUN+AF/NSUFF_MASC_SG_ACC_INDEF\n gloss: ___ + book + [acc.indef.]\n\n solution: (\u0643\u0650\u062a\u0627\u0628\u0627 kitAbA) [kitAb_1]\n pos: kitAb/NOUN+A/NSUFF_MASC_DU_NOM_POSS\n gloss: ___ + book + two\n\n solution: (\u0643\u064f\u062a\u0651\u0627\u0628\u0627\u064b kut~AbAF) [kut~Ab_1]\n pos: kut~Ab/NOUN+AF/NSUFF_MASC_SG_ACC_INDEF\n gloss: ___ + kuttab (village school);Quran school + [acc.indef.]\n\n solution: (\u0643\u064f\u062a\u0651\u0627\u0628\u0627\u064b kut~AbAF) [kAtib_1]\n pos: kut~Ab/NOUN+AF/NSUFF_MASC_SG_ACC_INDEF\n gloss: ___ + authors;writers + [acc.indef.]\n\n analysis for: \u0641\u064a fy\n solution: (\u0641\u0650\u064a fiy) [fiy_1]\n pos: fiy/PREP\n gloss: ___ + in + ___\n\n solution: (\u0641\u0650\u064a\u0651\u064e fiy~a) [fiy_1]\n pos: fiy/PREP+~a/PRON_1S\n gloss: ___ + in + me\n\n solution: (\u0641\u0650\u064a fiy) [fiy_2]\n pos: Viy/ABBREV\n gloss: ___ + V. + ___\n\n analysis for: \u0627\u0644\u0645\u0643\u062a\u0628 Almktb\n solution: (\u0627\u0644\u0645\u064e\u0643\u0652\u062a\u064e\u0628 Almakotab) [makotab_1]\n pos: Al/DET+makotab/NOUN\n gloss: the + bureau;office;department + ___\n\n $\n\n## Todo\n\nDiacritics are ignored for now. It would be nice to use the\nuser-supplied diacritics to filter through the generated solutions. That\nway if you enter something like `dar~ast` (\u062f\u064e\u0631\u0651\u064e\u0633\u062a), it won\u2019t return any\nresults from the `daras` (\u062f\u064e\u0631\u064e\u0633) root.\n\nIn his original Perl script, Buckwalter applies a number of spelling\nsubstitutions if a given word does not generate any solutions. This\nfunctionality should be easy to add, but I didn\u2019t get around to it.\n\nA simple GUI would be nice, for a better choice of fonts (like the\n[SIL Arabic fonts](http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&item_id=ArabicFonts))\nand for Windows support.\n\n## Contact\n\nIf you have any comments, suggestions, fixes, contributions, etc., please\ncontact Alex Lee (alexlee at fastmail net). Thanks!\n", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://bitbucket.org/alexlee/pyaramorph", "keywords": null, "license": "GPLv2", "maintainer": null, "maintainer_email": null, "name": "pyaramorph", "package_url": "https://pypi.org/project/pyaramorph/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/pyaramorph/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://bitbucket.org/alexlee/pyaramorph" }, "release_url": "https://pypi.org/project/pyaramorph/0.2/", "requires_dist": null, "requires_python": null, "summary": "An Arabic morphological analyzer and lexicon", "version": "0.2" }, "last_serial": 2050475, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "50a9fd906bcae5d6bb994dde97cee5d1", "sha256": "0f026b711bc051d6f365da95637e78b1d8ac871db0af666385ed17f9ca676805" }, "downloads": -1, "filename": "pyaramorph-0.1.tar.gz", "has_sig": false, "md5_digest": "50a9fd906bcae5d6bb994dde97cee5d1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1055066, "upload_time": "2016-04-03T22:42:01", "url": "https://files.pythonhosted.org/packages/af/30/a749492c4f812ce19f970657b7e1a136c774979818dd402f36fdb7bdb515/pyaramorph-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "a8e92a57a8766cc50b4408a72de9df24", "sha256": "1903e4a4b2e07d8b768b23590fb030b91fe310eac2b4a38bba5a98254b3520b2" }, "downloads": -1, "filename": "pyaramorph-0.2.tar.gz", "has_sig": false, "md5_digest": "a8e92a57a8766cc50b4408a72de9df24", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1056616, "upload_time": "2016-04-07T02:13:51", "url": "https://files.pythonhosted.org/packages/bd/7d/db168a32e7a656c60c8a5b11917bb4b9ae33191bb4dc532c39cacdf93df5/pyaramorph-0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a8e92a57a8766cc50b4408a72de9df24", "sha256": "1903e4a4b2e07d8b768b23590fb030b91fe310eac2b4a38bba5a98254b3520b2" }, "downloads": -1, "filename": "pyaramorph-0.2.tar.gz", "has_sig": false, "md5_digest": "a8e92a57a8766cc50b4408a72de9df24", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1056616, "upload_time": "2016-04-07T02:13:51", "url": "https://files.pythonhosted.org/packages/bd/7d/db168a32e7a656c60c8a5b11917bb4b9ae33191bb4dc532c39cacdf93df5/pyaramorph-0.2.tar.gz" } ] }