{ "info": { "author": "Damir Cavar, Oren Baldinger, Maanvitha Gongalla, Anurag Kumar, Murali Kammili, Boli Fang", "author_email": "damir@cavar.me", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# NLTK-JSON-NLP\n\n(C) 2019 by [Damir Cavar], [Oren Baldinger], Maanvitha Gongalla, Anurag Kumar, Murali Kammili, Boli Fang\n\nBrought to you by the [NLP-Lab.org]!\n\n\n## Introduction\n\n[NLTK] wrapper to [JSON-NLP]. [NLTK] has a wide variety of capabilities, but for our purposes\nwe are limiting it to [WordNet], [VerbNet], and [FrameNet]. Other packages such as [spaCy] and \n[Flair] are more accurately able to annotate things like part of speech tags and dependency \nparses. See below for instruction on how to unify outputs from multiple packages.\n\n## Microservice\n\nThe [JSON-NLP] repository provides a Microservice class, with a pre-built implementation of [Flask]. To run it, execute:\n\n python nltkjsonnlp/server.py\n\nSince `server.py` extends the [Flask] app, a WSGI file would contain:\n\n from nltkjsonnlp.server import app as application\n\n## Pipeline\n\n[JSON-NLP] provides a simple `Pipeline` interface that we implement as `NltkPipeline`:\n\n pipeline = nltkjsonnlp.NltkPipeline()\n print(pipeline.process(text='I am a sentence.'))\n\n## Unification\n\nTo make the best use of this pipeline, it is best to unify it with a more accurate and complete\npipeline such as [spaCy-NLP-Json]:\n\n class UnifiedPipeline(pyjsonnlp.pipeline.Pipeline):\n def __init__(self):\n super(UnifiedPipeline, self).__init__()\n self.spacy = spacynlpjson.SpacyPipeline()\n self.nltk = nltkjsonnlp.NltkPipeline()\n\n def process(self, text='', coreferences=True, constituents=False, dependencies=True, expressions=True,\n **kwargs) -> OrderedDict:\n # start with a spacy parse\n spacy_json = self.spacy.process(text, spacy_model='en_core_web_md', constituents=False,\n coreferences=coreferences, dependencies=dependencies, expressions=False)\n # the get an nltk parse\n nltk_json = self.nltk.process(text)\n\n # unify the parses\n return pyjsonnlp.unification.unifier.add_annotation_to_a_from_b(a=spacy_json, \n b=nltk_json, annotation='tokens')\n\n\n\n[Damir Cavar]: http://damir.cavar.me/ \"Damir Cavar\"\n[Oren Baldinger]: https://oren.baldinger.me/ \"Oren Baldinger\"\n[NLP-Lab.org]: http://nlp-lab.org/ \"NLP-Lab.org\"\n[JSON-NLP]: https://github.com/dcavar/JSON-NLP \"JSON-NLP\"\n[Flair]: https://github.com/zalandoresearch/flair \"Flair\"\n[spaCy]: https://spacy.io/ \"spaCy\"\n[NLTK]: http://nltk.org/ \"Natural Language Processing Toolkit\"\n[Polyglot]: https://github.com/aboSamoor/polyglot \"Polyglot\" \n[Xrenner]: https://github.com/amir-zeldes/xrenner \"Xrenner\"\n[CONLL-U]: https://universaldependencies.org/format.html \"CONLL-U\"\n[spaCy-NLP-Json]: https://github.com/dcavar/spaCy-JSON-NLP \"spaCy-JSON-NLP\"\n[WordNet]: https://wordnet.princeton.edu/ \"Wordnet\"\n[FrameNet]: https://framenet.icsi.berkeley.edu/fndrupal/ \"FrameNet\"\n[VerbNet]: https://verbs.colorado.edu/~mpalmer/projects/verbnet.html \"VerbNet\"\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/dcavar/NLTK-JSON-NLP", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "nltkjsonnlp", "package_url": "https://pypi.org/project/nltkjsonnlp/", "platform": "", "project_url": "https://pypi.org/project/nltkjsonnlp/", "project_urls": { "Homepage": "https://github.com/dcavar/NLTK-JSON-NLP" }, "release_url": "https://pypi.org/project/nltkjsonnlp/0.0.5/", "requires_dist": [ "nltk (>=3.4)", "pyjsonnlp (>=0.2.9)" ], "requires_python": "", "summary": "The Python NLTK JSON-NLP package", "version": "0.0.5" }, "last_serial": 5316967, "releases": { "0.0.2": [ { "comment_text": "", "digests": { "md5": "2526cb30f528bb5736b6ed06266ef407", "sha256": "8436e64c842934d9ebe18d89e0b572e775d1254cfb203fbaf107515f4e26f6ed" }, "downloads": -1, "filename": "nltkjsonnlp-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "2526cb30f528bb5736b6ed06266ef407", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 14591, "upload_time": "2019-04-23T19:12:22", "url": "https://files.pythonhosted.org/packages/97/0b/c1557eb53c432238feda43878fccf18cf8b5ec435ebfb9825e31d45ba6eb/nltkjsonnlp-0.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c065de574101f60d9afc5d471b7ad687", "sha256": "8cba1205d537bbb94f0bfa5ddd98d3864e3b61507627eee1e876e310cc58eb86" }, "downloads": -1, "filename": "nltkjsonnlp-0.0.2.tar.gz", "has_sig": false, "md5_digest": "c065de574101f60d9afc5d471b7ad687", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9279, "upload_time": "2019-04-23T19:12:24", "url": "https://files.pythonhosted.org/packages/4f/6e/7dd3303e9a7c4c5a524f9043af46cfd6b97c49ce52d992e696191541feab/nltkjsonnlp-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "2fa84afff32e9cb7bdec0d683d2bb8ef", "sha256": "21644c1e8725f165826435ad6448e71a282a223e65734a36c462866c942ad6fe" }, "downloads": -1, "filename": "nltkjsonnlp-0.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "2fa84afff32e9cb7bdec0d683d2bb8ef", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 14638, "upload_time": "2019-04-29T17:26:27", "url": "https://files.pythonhosted.org/packages/3a/d7/73c3702264a57a3b36597e2853baa06851e1a6ee784f3eab136af0b609bc/nltkjsonnlp-0.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "30a3a0d0168e1143920e87c66ef4abb3", "sha256": "ad60ce737e5c6d59ec1e55748b0a1cbcab22ea8e614c38a982c00b04783bfecc" }, "downloads": -1, "filename": "nltkjsonnlp-0.0.3.tar.gz", "has_sig": false, "md5_digest": "30a3a0d0168e1143920e87c66ef4abb3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9331, "upload_time": "2019-04-29T17:26:31", "url": "https://files.pythonhosted.org/packages/4d/84/61d71f15fc1d6570ccf768a856e284e8768464414e7fbec01240493cdc3c/nltkjsonnlp-0.0.3.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "dc9f3771116f44d8e8ee62c2dbfe2c6d", "sha256": "0774dae370e7cd8f86721eaa2d62fef50805d48097478ff885c463a8bdc9712d" }, "downloads": -1, "filename": "nltkjsonnlp-0.0.5-py3-none-any.whl", "has_sig": false, "md5_digest": "dc9f3771116f44d8e8ee62c2dbfe2c6d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 14656, "upload_time": "2019-05-25T17:44:32", "url": "https://files.pythonhosted.org/packages/e8/2b/524674f0dd723091d8dac66db1a4e70114ef83b4bad4577a7f535b51abf9/nltkjsonnlp-0.0.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "bf1e7bd566b29a0c82c04ede2079852f", "sha256": "a8888bea4ae17184b19ffa76da2ffdc0a4fa813b96cbebba93f8f50bbf71f672" }, "downloads": -1, "filename": "nltkjsonnlp-0.0.5.tar.gz", "has_sig": false, "md5_digest": "bf1e7bd566b29a0c82c04ede2079852f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9358, "upload_time": "2019-05-25T17:44:33", "url": "https://files.pythonhosted.org/packages/7a/65/4a17dcba62d2f68d264314f0c85414feab81332f017fc8de5067e7d2131e/nltkjsonnlp-0.0.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "dc9f3771116f44d8e8ee62c2dbfe2c6d", "sha256": "0774dae370e7cd8f86721eaa2d62fef50805d48097478ff885c463a8bdc9712d" }, "downloads": -1, "filename": "nltkjsonnlp-0.0.5-py3-none-any.whl", "has_sig": false, "md5_digest": "dc9f3771116f44d8e8ee62c2dbfe2c6d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 14656, "upload_time": "2019-05-25T17:44:32", "url": "https://files.pythonhosted.org/packages/e8/2b/524674f0dd723091d8dac66db1a4e70114ef83b4bad4577a7f535b51abf9/nltkjsonnlp-0.0.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "bf1e7bd566b29a0c82c04ede2079852f", "sha256": "a8888bea4ae17184b19ffa76da2ffdc0a4fa813b96cbebba93f8f50bbf71f672" }, "downloads": -1, "filename": "nltkjsonnlp-0.0.5.tar.gz", "has_sig": false, "md5_digest": "bf1e7bd566b29a0c82c04ede2079852f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9358, "upload_time": "2019-05-25T17:44:33", "url": "https://files.pythonhosted.org/packages/7a/65/4a17dcba62d2f68d264314f0c85414feab81332f017fc8de5067e7d2131e/nltkjsonnlp-0.0.5.tar.gz" } ] }