https://github.com/dcavar/nltk-json-nlp
NLTK wrapper to JSON-NLP.
Science Score: 10.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
○codemeta.json file
-
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
✓Committers with academic emails
2 of 5 committers (40.0%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (6.8%) to scientific vocabulary
Keywords
Keywords from Contributors
Repository
NLTK wrapper to JSON-NLP.
Basic Info
- Host: GitHub
- Owner: dcavar
- License: apache-2.0
- Language: Python
- Default Branch: master
- Homepage: https://nlp-lab.org/nltkjsonnlp/
- Size: 45.9 KB
Statistics
- Stars: 5
- Watchers: 4
- Forks: 1
- Open Issues: 0
- Releases: 0
Topics
Metadata Files
README.md
NLTK-JSON-NLP
(C) 2019 by Damir Cavar, Oren Baldinger, Maanvitha Gongalla, Anurag Kumar, Murali Kammili, Boli Fang
Brought to you by the NLP-Lab.org!
Introduction
NLTK wrapper to JSON-NLP. NLTK has a wide variety of capabilities, but for our purposes we are limiting it to WordNet, VerbNet, and FrameNet. Other packages such as spaCy and Flair are more accurately able to annotate things like part of speech tags and dependency parses. See below for instruction on how to unify outputs from multiple packages.
Microservice
The JSON-NLP repository provides a Microservice class, with a pre-built implementation of [Flask]. To run it, execute:
python nltkjsonnlp/server.py
Since server.py extends the [Flask] app, a WSGI file would contain:
from nltkjsonnlp.server import app as application
Pipeline
JSON-NLP provides a simple Pipeline interface that we implement as NltkPipeline:
pipeline = nltkjsonnlp.NltkPipeline()
print(pipeline.process(text='I am a sentence.'))
Unification
To make the best use of this pipeline, it is best to unify it with a more accurate and complete pipeline such as spaCy-NLP-Json:
class UnifiedPipeline(pyjsonnlp.pipeline.Pipeline):
def __init__(self):
super(UnifiedPipeline, self).__init__()
self.spacy = spacynlpjson.SpacyPipeline()
self.nltk = nltkjsonnlp.NltkPipeline()
def process(self, text='', coreferences=True, constituents=False, dependencies=True, expressions=True,
**kwargs) -> OrderedDict:
# start with a spacy parse
spacy_json = self.spacy.process(text, spacy_model='en_core_web_md', constituents=False,
coreferences=coreferences, dependencies=dependencies, expressions=False)
# the get an nltk parse
nltk_json = self.nltk.process(text)
# unify the parses
return pyjsonnlp.unification.unifier.add_annotation_to_a_from_b(a=spacy_json,
b=nltk_json, annotation='tokens')
Owner
- Name: Damir Cavar
- Login: dcavar
- Kind: user
- Location: Bloomington, IN
- Company: Indiana University
- Website: http://damir.cavar.me/
- Repositories: 29
- Profile: https://github.com/dcavar
GitHub Events
Total
Last Year
Committers
Last synced: 10 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Damir Cavar | d****r@m****m | 6 |
| anuragkumar95 | a****6@i****u | 3 |
| Oren Baldinger | o****g@i****u | 3 |
| anurag_kumar | a****5@g****m | 2 |
| blf11139 | b****9@g****m | 1 |
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 0
- Total pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Total issue authors: 0
- Total pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 18 last-month
- Total dependent packages: 0
- Total dependent repositories: 1
- Total versions: 3
- Total maintainers: 1
pypi.org: nltkjsonnlp
The Python NLTK JSON-NLP package
- Homepage: https://github.com/dcavar/NLTK-JSON-NLP
- Documentation: https://nltkjsonnlp.readthedocs.io/
- License: Apache Software License
-
Latest release: 0.0.5
published over 6 years ago
Rankings
Maintainers (1)
Dependencies
- nltk >=3.4
- pyjsonnlp >=0.2.9