{ "info": { "author": "Gaurav Sahu, Athitya Kumar", "author_email": "sahu.gaurav719@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "# PsyNLP\n\n> Program SYnthesis for NLP\n\nPsyNLP is a Python library, that intends to handle morphological inflections for any language in the form of an interpretable program. :tada:\n\n### Table of Contents\n\n1. [Installation Guidelines](#installation-guidelines)\n2. [Usage](#usage)\n3. [Repository structure](#repository-structure)\n4. [Running the tests](#running-the-tests)\n5. [Contribution Guidelines](#contribution-guidelines)\n6. [License](#license)\n\n### Installation Guidelines\n\n[(Back to ToC)](#table-of-contents)\n\n1. Clone the repository\n\n```sh\n$ git clone git@github.com:Demfier/PsyNLP.git\n```\n\n2. Go to the cloned repository\n\n```sh\n$ cd PsyNLP\n```\n\n3. Install the dependencies\n\n```sh\n$ pip3 install -r requirements.txt\n```\n\nAlternatively, you can also install the module from pip directly using the command:\n\n`pip3 install psynlp`\n\n### Usage\n\n[(Back to ToC)](#table-of-contents)\n\nWith the power of `argparse`, the [main.py](https://github.com/Demfier/PsyNLP/blob/master/main.py) acts as the central script to run any of the pipelines, for any language and training data quality.\n\n\n- Help menu, for more details:\n\n```sh\n$ python3 main.py -h\n```\n\n```\nusage: main.py [-h] [-p PIPELINE] [-l LANGUAGE] [-q QUALITY] [-v]\n\nRuns one of the pipeline scripts, for a given language and quality.\n\noptional arguments:\n -h, --help show this help message and exit\n -p PIPELINE, --pipeline PIPELINE\n Name of the pipeline file (Default: deterministic)\n -l LANGUAGE, --language LANGUAGE\n Name of the language (Default: english)\n -q QUALITY, --quality QUALITY\n Size of the training data (Default: low)\n -v, --verbose Prints verbose output if specified\n```\n\n\n- Running a pipeline (say, ostia) for a language (say, polish) and training data quality (say, high):\n\n```sh\n$ python3 main.py -p ostia -l polish -q high\n```\n\n- Get more output debug-like details with verbose flags (max. 3)\n\n```sh\n# No verbose, just print the exact word-match accuracy\n$ python3 main.py\n\n# Verbose 1, print the expected and actual words\n$ python3 main.py -v\n\n# Verbose 2, print the paths responsible for computing an inflection\n$ python3 main.py -vv\n\n# Verbose 3, print debug details for PAC and OSTIA\n$ python3 main.py -vvv\n```\n\n### Repository structure\n\n[(Back to ToC)](#table-of-contents)\n\n- Base classes:\n\n The code for base classes can be found in the `psynlp/core` directory.\n\n - `fca.py`: Contains implementations of PAC and other methods related to Formal Concept Analysis\n - `fst.py`: Contains generic Transducer methods, like states and arcs\n - `oracle.py`: Contains the oracles that're used while computing the PAC basis in `fca.py`\n - `ostia.py`: Implementation of the well-known OSTIA algorithm, that uses `fst.py`\n\n- Pipelines:\n\n The code for the different pipelines can be found in the `psynlp/pipelines` directory.\n\n - `deterministic.py` : Prediction based on Pandas' `group_by` (deterministic clustering) and OSTIA RegExp matching\n - `ostia.py`: Prediction based on just the input-output tapes of OSTIA\n - `pac_ostia.py`: Prediction based on PAC clusters and OSTIA RegExp matching\n\n- Helpers:\n\n The code for the different helpers can be found in the `psynlp/helpers` directory.\n\n - `builtins.py`: Monkey-patches some required verbose-related builtin functions\n - `importers.py`: Includes functions that imports training and testing data into different structures\n - `misc.py`: Miscellaneous functions\n - `text.py`: Text-related functions such as inflecting, prefix, suffix, edit distance, etc.\n\n- Data:\n\n The `psynlp/data` directory contains all the training and testing data. The files are of the form:\n\n - {language}-train-{quality}\n - {language}-dev\n\n### Running the tests\n\n1. Basic run to check the results:\n\n```sh\npy.test\n```\n\n2. For debugging:\n\n```sh\npy.test -s --fulltrace\n```\n\n### Contribution Guidelines\n\n[(Back to ToC)](#table-of-contents)\n\nYour contributions are always welcome! Please have a look at the [contribution guidelines](CONTRIBUTING.md) first. :tada:\n\n### License\n\n[(Back to ToC)](#table-of-contents)\n\nMIT License 2018 - [Gaurav Sahu](https://github.com/Demfier/) and [Athitya Kumar](https://github.com/athityakumar/).\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/demfier/psynlp", "keywords": "nlp transducer program-synthesis oracle-learning ostia concept-lattice regex-learning pac-basis concept-learning", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "psynlp", "package_url": "https://pypi.org/project/psynlp/", "platform": "", "project_url": "https://pypi.org/project/psynlp/", "project_urls": { "Homepage": "https://github.com/demfier/psynlp" }, "release_url": "https://pypi.org/project/psynlp/1.0.4/", "requires_dist": [ "argparse", "networkx", "pandas" ], "requires_python": "", "summary": "A python module with Program Synthesis techniques for NLP", "version": "1.0.4" }, "last_serial": 3751657, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "9bf6ba4dbee3c2c1b12ed8fddff8cb43", "sha256": "3203b24f1fbd42d30c9912a4a896319c3d96588cbf707a30888c49d9c92f4630" }, "downloads": -1, "filename": "psynlp-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "9bf6ba4dbee3c2c1b12ed8fddff8cb43", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6851, "upload_time": "2018-04-09T20:21:50", "url": "https://files.pythonhosted.org/packages/fa/67/6e628924615dc906b60df029ef80d952c93e16de9f291c12cbb9652aca33/psynlp-1.0.0-py3-none-any.whl" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "dedcc949f0c29fc50460ca6f8ed92a05", "sha256": "b4a49713f0e3d1596587b170deb54d067b46fce2a2602f7dd2c93fe9c460ee4f" }, "downloads": -1, "filename": "psynlp-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "dedcc949f0c29fc50460ca6f8ed92a05", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6847, "upload_time": "2018-04-09T20:33:40", "url": "https://files.pythonhosted.org/packages/c2/b8/83a1f5eabf7c00208d163bfa3061e8d4b2d036c6297cef8a8395dc0b1585/psynlp-1.0.1-py3-none-any.whl" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "2c67e2813e04c21829b5906f789afbe2", "sha256": "c0fa9da26551ad403a5b28e740d14cc322037e096b78963aac34305f0c19b6c1" }, "downloads": -1, "filename": "psynlp-1.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "2c67e2813e04c21829b5906f789afbe2", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 25722, "upload_time": "2018-04-09T20:45:09", "url": "https://files.pythonhosted.org/packages/ec/9b/ebd5ffbcba1f6759cdb0e3631610e8931bb43e4b383956ae6758adcf8eb9/psynlp-1.0.2-py3-none-any.whl" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "1ac9639f5e78536869b1e1d5c0750580", "sha256": "6f40121563dfabebecda59b566829382780984a442a6eabb84960828f7f29934" }, "downloads": -1, "filename": "psynlp-1.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "1ac9639f5e78536869b1e1d5c0750580", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 25803, "upload_time": "2018-04-09T20:49:18", "url": "https://files.pythonhosted.org/packages/ad/ce/d08de8f6d6305fd0af6c355dede71809e3a0ee1d03259d8b693003b2ecd3/psynlp-1.0.3-py3-none-any.whl" } ], "1.0.4": [ { "comment_text": "", "digests": { "md5": "2bd4fc7367347d370f9783c3bef5b38a", "sha256": "e0e0dc37e56b6522ea7906de7ff8f8e5f0e9973f9b0af238454007399408baf5" }, "downloads": -1, "filename": "psynlp-1.0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "2bd4fc7367347d370f9783c3bef5b38a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 25900, "upload_time": "2018-04-10T11:23:11", "url": "https://files.pythonhosted.org/packages/09/74/db51398040bbf70e9609a5bce8dad2c62792cbf5795feb53ebbcef04195b/psynlp-1.0.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1815fbef1e5503afc99522ecd9edd445", "sha256": "bce8a0b2674dc2e094ff797499dfab31aeb2e8611ac3e887227b474b93decae3" }, "downloads": -1, "filename": "psynlp-1.0.4.tar.gz", "has_sig": false, "md5_digest": "1815fbef1e5503afc99522ecd9edd445", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17982, "upload_time": "2018-04-10T11:23:13", "url": "https://files.pythonhosted.org/packages/e7/ea/7e57ce281e3aa3490ac66b67f64269a3bdd654906fe443b43b9829d7923f/psynlp-1.0.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2bd4fc7367347d370f9783c3bef5b38a", "sha256": "e0e0dc37e56b6522ea7906de7ff8f8e5f0e9973f9b0af238454007399408baf5" }, "downloads": -1, "filename": "psynlp-1.0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "2bd4fc7367347d370f9783c3bef5b38a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 25900, "upload_time": "2018-04-10T11:23:11", "url": "https://files.pythonhosted.org/packages/09/74/db51398040bbf70e9609a5bce8dad2c62792cbf5795feb53ebbcef04195b/psynlp-1.0.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1815fbef1e5503afc99522ecd9edd445", "sha256": "bce8a0b2674dc2e094ff797499dfab31aeb2e8611ac3e887227b474b93decae3" }, "downloads": -1, "filename": "psynlp-1.0.4.tar.gz", "has_sig": false, "md5_digest": "1815fbef1e5503afc99522ecd9edd445", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17982, "upload_time": "2018-04-10T11:23:13", "url": "https://files.pythonhosted.org/packages/e7/ea/7e57ce281e3aa3490ac66b67f64269a3bdd654906fe443b43b9829d7923f/psynlp-1.0.4.tar.gz" } ] }