https://github.com/dcavar/nltk-json-nlp

NLTK wrapper to JSON-NLP.

https://github.com/dcavar/nltk-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

json natural-language-processing nltk

Keywords from Contributors

spacy polyglot anaphora-resolution xrenner flair
Last synced: 4 months ago · JSON representation

Repository

NLTK wrapper to JSON-NLP.

Basic Info
Statistics
  • Stars: 5
  • Watchers: 4
  • Forks: 1
  • Open Issues: 0
  • Releases: 0
Topics
json natural-language-processing nltk
Created almost 7 years ago · Last pushed over 6 years ago
Metadata Files
Readme License

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

GitHub Events

Total
Last Year

Committers

Last synced: 10 months ago

All Time
  • Total Commits: 15
  • Total Committers: 5
  • Avg Commits per committer: 3.0
  • Development Distribution Score (DDS): 0.6
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email 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
Committer Domains (Top 20 + Academic)
iu.edu: 2 me.com: 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

  • Versions: 3
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 18 Last month
Rankings
Dependent packages count: 9.8%
Stargazers count: 21.6%
Dependent repos count: 21.8%
Forks count: 22.7%
Average: 24.6%
Downloads: 47.2%
Maintainers (1)
Last synced: 5 months ago

Dependencies

setup.py pypi
  • nltk >=3.4
  • pyjsonnlp >=0.2.9