{ "info": { "author": "Quill.org", "author_email": "max@quill.org", "bugtrack_url": null, "classifiers": [], "description": "# QPorcupine\n\nA library from Quill.org to provide feedback on common grammar errors. Errors detected include spelling errors, fragments, and subject-verb agreement errors.\n\n\n**Note:** This library is currently unstable; please be aware\nthat updates could include breaking changes.\n\n\n## Usage\n\nAs a module:\n```py\nfrom qporcupine import check\n\nfeedback = check('Until she leapt into the air and kissed him.')\nprint(feedback.human_readable)\n```\n\nExpected output:\n```\nThis looks like a subordinating conjunction fragment.\nTry removing the subordinating conjunction or adding a main clause.\n```\n\n## Installation\n\n#### 1. Install languagetool\n\nqporcupine relies on LanguageTool to function. LanguageTool is an open-source\ngrammar and spell-checker written in Java. In order to maximize performance, we\nwill run a languagetool server that qporcupine will be able to connect to.\n\nChange to the opt directory. If you don't have one, create one with `$ sudo mkdir /opt`.\n```bash\n$ cd /opt\n```\n\nDownload and unzip languagetool.\n```bash\n$ sudo curl -O \"https://languagetool.org/download/LanguageTool-4.1.zip\"\n$ sudo unzip LanguageTool-4.1.zip\n$ sudo rm LanguageTool-4.1.zip\n```\n\nAdd the follwing lines to your .bash_profile or system equivalent. Do not\ninclude a trailing slash for the LT_URI.\n```bash\nalias ltserver='nohup java -cp /opt/LanguageTool-4.1/languagetool-server.jar org.languagetool.server.HTTPServer --port 8081 /dev/null 2>&1 &'\nexport LT_URI=http://localhost:8081\n```\n\nStart the server\n```bash\n$ ltserver\n```\n\nLanguageTool is now running on port 8081. To test that it works try hitting\nhttp://localhost:8081/v2/check?language=en-US&text=my+text in your browser.\n\n\n#### 2. Download the AllenNLP Constituency Parser\n\nqporcupine uses the [AllenNLP](https://allennlp.org/) library, a suite of open-source\nnatural-language processing tools developed by the Allen Institute for Artificial\nIntelligence. Specifically, qporcupine uses the [constituency parse](http://demo.allennlp.org/constituency-parsing)\nmodel from AllenNLP.\n\nWe store the AllenNLP model in `/var/lib/allennlp`. To configure this folder and download the model for use, run:\n\n```bash\n$ sudo mkdir /var/lib/allennlp\n$ cd /var/lib/allennlp && { sudo curl -O https://s3-us-west-2.amazonaws.com/allennlp/models/elmo-constituency-parser-2018.03.14.tar.gz; cd -;}\n```\n\n#### 3. Install Pattern for Python 3\n\nOne of qporcupine's dependencies is a development branch of the [Pattern.en](https://www.clips.uantwerpen.be/pattern) library, which is not available through PyPi. Consequently, qporcupine must be directly installed from its Github repo. This can be done with the command\n\n```bash\n$ pip install git+git://github.com/clips/pattern.git@53245196139c6ef26dc9c34873dda8a16f236d23#egg=Pattern\n```\n\nIn some cases, there may be conflicts between this installation of the Pattern library and existing installations of Pattern on your local machine. If so, we suggest uninstalling Pattern and attempting to install qporcupine again. You may also need the `--no-cache-dir` flag for `pip install`.\n\n#### 4. Install qporcupine\n\n```bash\npip install qporcupine\n```\n\n#### 5. Configure Spacy Language Model\n\nqporcupine uses the `en_core_web_lg` Spacy model by default. To configure this model, you may have to download the `en_core_web_lg` model from Spacy by running:\n\n```bash\npython -m spacy download en_core_web_lg\n```\n\nIf you wish to download and configure another model, do so with\n\n```bash\npython -m spacy download \n```\n\nand set\n\n```bash\nexport QUILL_SPACY_MODEL=\n```\n\n## Tests\n\nQPorcupine uses `nose` to run tests. To run tests from the root directory of qporcupine:\n\n```bash\n$ pip install nose\n$ nosetests\n```\n\n### Version Support\n\nPlease note that QPorcupine does not currently support Python 3.7. We suggest using Python 3.6.x .\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/empirical-org/Quill-NLP-Tools-and-Datasets", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "qporcupine", "package_url": "https://pypi.org/project/qporcupine/", "platform": "", "project_url": "https://pypi.org/project/qporcupine/", "project_urls": { "Homepage": "https://github.com/empirical-org/Quill-NLP-Tools-and-Datasets" }, "release_url": "https://pypi.org/project/qporcupine/0.0.4/", "requires_dist": [ "allennlp (==0.5.1)", "flask (==0.12.2)", "gunicorn (==19.7.1)", "nltk (==3.2.5)", "numpy (==1.14.2)", "pandas (==0.19.2)", "pathlib (==1.0.1)", "requests (==2.18.4)", "spacy (==2.0.12)", "sqlalchemy (==1.2.6)", "tensorflow (==1.5.1)", "textacy (==0.6.2)", "tflearn (==0.3.2)" ], "requires_python": "", "summary": "Grammar error detection and feedback", "version": "0.0.4" }, "last_serial": 4216800, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "33fffd29e82626cdee9b2ee4a98eea66", "sha256": "a17d9c7d17180a311e9147f33b7e84034e9c7b92f8c671d42afed1b805f5376d" }, "downloads": -1, "filename": "qporcupine-0.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "33fffd29e82626cdee9b2ee4a98eea66", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 15253331, "upload_time": "2018-08-28T18:01:40", "url": "https://files.pythonhosted.org/packages/13/67/d7cc6b41b61a8480be53b203d033b7804951c07834d362f564f09ea4fe16/qporcupine-0.0.1-py2.py3-none-any.whl" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "4b598c32e2f1ae7022969111b01b2c4c", "sha256": "f6d9a2708305600fb51105d2083195f7811d3b44ff197b265625d359ed3ec087" }, "downloads": -1, "filename": "qporcupine-0.0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "4b598c32e2f1ae7022969111b01b2c4c", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 15253341, "upload_time": "2018-08-28T18:41:10", "url": "https://files.pythonhosted.org/packages/f8/bf/e11f5adf0ac3ddcc47797862d9cf9f65dbb436bdd615152c4858ff442469/qporcupine-0.0.2-py2.py3-none-any.whl" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "708d36af30558b48173a4f8bfe59782f", "sha256": "6b9a758d8d5319ca2d61ba8231cbc35e73355ea2d8a8593f369a6490e7f7e739" }, "downloads": -1, "filename": "qporcupine-0.0.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "708d36af30558b48173a4f8bfe59782f", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 15253424, "upload_time": "2018-08-28T20:30:51", "url": "https://files.pythonhosted.org/packages/38/9f/60cd608ae38ee302ac32e20954856c67894f13eb8d117ecab81789747e78/qporcupine-0.0.3-py2.py3-none-any.whl" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "7c62948c3efbc05d100a7ead2b7cd94c", "sha256": "629f5ae91a201035c2262da0370a5f6cf359a86f3fd7244662a9896c3448e5bb" }, "downloads": -1, "filename": "qporcupine-0.0.4-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "7c62948c3efbc05d100a7ead2b7cd94c", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 15253121, "upload_time": "2018-08-28T21:45:46", "url": "https://files.pythonhosted.org/packages/ce/d7/8668dbf6d6c569adbf646f08bcd2583cb84daf276c09bfab1d537c4678eb/qporcupine-0.0.4-py2.py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "7c62948c3efbc05d100a7ead2b7cd94c", "sha256": "629f5ae91a201035c2262da0370a5f6cf359a86f3fd7244662a9896c3448e5bb" }, "downloads": -1, "filename": "qporcupine-0.0.4-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "7c62948c3efbc05d100a7ead2b7cd94c", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 15253121, "upload_time": "2018-08-28T21:45:46", "url": "https://files.pythonhosted.org/packages/ce/d7/8668dbf6d6c569adbf646f08bcd2583cb84daf276c09bfab1d537c4678eb/qporcupine-0.0.4-py2.py3-none-any.whl" } ] }