{"id":15454740,"url":"https://github.com/dcavar/spacy-json-nlp","last_synced_at":"2025-04-21T08:47:41.631Z","repository":{"id":57469579,"uuid":"177871759","full_name":"dcavar/spaCy-JSON-NLP","owner":"dcavar","description":"spaCy wrapper for JSON-NLP.","archived":false,"fork":false,"pushed_at":"2019-08-11T22:26:08.000Z","size":51,"stargazers_count":12,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-20T02:00:06.354Z","etag":null,"topics":["json","natural-language-processing","nlp","spacy"],"latest_commit_sha":null,"homepage":"https://nlp-lab.org/spacyjsonnlp/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dcavar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-03-26T21:31:24.000Z","updated_at":"2023-05-04T14:38:07.000Z","dependencies_parsed_at":"2022-09-19T09:50:13.206Z","dependency_job_id":null,"html_url":"https://github.com/dcavar/spaCy-JSON-NLP","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcavar%2FspaCy-JSON-NLP","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcavar%2FspaCy-JSON-NLP/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcavar%2FspaCy-JSON-NLP/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcavar%2FspaCy-JSON-NLP/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dcavar","download_url":"https://codeload.github.com/dcavar/spaCy-JSON-NLP/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250027474,"owners_count":21363151,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["json","natural-language-processing","nlp","spacy"],"created_at":"2024-10-01T22:05:14.511Z","updated_at":"2025-04-21T08:47:41.615Z","avatar_url":"https://github.com/dcavar.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# spaCy to JSON-NLP\n\n(C) 2019 by [Damir Cavar], [Oren Baldinger], Maanvitha Gongalla, Anurag Kumar, Murali Kammili\n\nBrought to you by the [NLP-Lab.org]!\n\n\nThis only works with spaCy 2.1.0!\n\nI had the same issue. I downgraded Spacy from 2.1.4 to 2.1.0 and numpy to 1.14.5 to resolve.\n\n\n## Introduction\n\nCurrently this module requires Python 3.6+.\n\nThis module provides a [spaCy] v2.1 wrapper for [JSON-NLP]. It takes the [spaCy] output and generates a [JSON-NLP] output. It also provides a Microservice wrapper that allows you to launch the [spaCy] module as a persistent RESTful service using [Flask] or other WSGI-based server.\n\nSince this microservice is built on [spaCy], you will need to have its models download, for example:\n\n    python -m spacy download en\n    python -m spacy download en_core_web_md\n\n## Additional Pipeline Modules\n\n[spaCy] allows for the addition of additional models as pipeline modules. We provide such integrations for coreference and phrase structure trees.\n\n### Anaphora and Coreference Resolution\n\nWe provide [HuggingFace] coreference resolution, a fast system tightly integrated into [spaCy]. Note that the first time the parser is run, it will download the coreference models if they are not already present. These models only work for English.\n\n### Phrase Structure Trees (Constituency Parse)\n\nWe provide the CPU version of the [benepar] parser, a highly accurate phrase structure parser. Bear in mind it is a Tensorflow module, as such it has a notable start-up time, and relatively high memory requirements (4GB+).\n\nIf you have a GPU available, you can install the GPU version of the module with:\n\n    pip install --upgrade benepar[gpu] \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 spacyjsonnlp/server.py\n \nSince `server.py` extends the [Flask] app, a WSGI file would contain:\n\n    from spacyjsonnlp.server import app as application\n    \nTo disable a pipeline component (such as phrase structure parsing), add\n\n    application.constituents = False\n    \nThe full list of properties that can be disabled or enabled are\n- constituents\n- dependencies\n- coreference\n- expressions\n\nThe microservice exposes the following URIs:\n- /constituents\n- /dependencies\n- /coreference\n- /expressions\n- /token_list\n\nThese URIs are shortcuts to disable the other components of the parse. In all cases, `tokenList` will be included in the `JSON-NLP` output. An example url is:\n\n    http://localhost:5000/dependencies?text=I am a sentence\n\nText is provided to the microservice with the `text` parameter, via either `GET` or `POST`. If you pass `url` as a parameter, the microservice will scrape that url and process the text of the website.\n\nThe [spaCy] language model to use for parsing can be selected with the `spacy_model` parameter.\n\nHere is an example `GET` call:\n\n    http://localhost:5000?spacy_model=en\u0026constituents=0\u0026text=I am a sentence.\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[Flask]: http://flask.pocoo.org/ \"Flask\"\n[HuggingFace]: https://github.com/huggingface/neuralcoref/ \"Hugging Face\"\n[benepar]: https://github.com/nikitakit/self-attentive-parser \"Berkeley Neural Parser\"\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdcavar%2Fspacy-json-nlp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdcavar%2Fspacy-json-nlp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdcavar%2Fspacy-json-nlp/lists"}