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

Flair wrapper for JSON-NLP.

https://github.com/dcavar/flair-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 (13.9%) to scientific vocabulary

Keywords

flair json natural-language-processing nlp

Keywords from Contributors

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

Repository

Flair wrapper for JSON-NLP.

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

README.md

Flair JSON-NLP Wrapper

(C) 2019-2020 by Damir Cavar

Contributors to previous versions: Oren Baldinger, Maanvitha Gongalla, Anurag Kumar, Murali Kammili

Brought to you by the NLP-Lab.org!

Introduction

Flair v 4.5 wrapper for JSON-NLP. Flair provides state-of-the-art embeddings, and tagging capabilities, in particular, POS-tagging, NER, shallow syntax chunking, and semantic frame detection.

FlairPipeline

We provide a FlairPipeline class, with the following parameters for ease of use:

  • lang: defaults to en. Different languages support different models, see the Flair Docs for details.
  • use_ontonotes: defaults to False. Whether or not to use 4-class (True) or 12-class (False) NER tagging.
  • fast: defaults to True. Whether or not to use the smaller, faster, but slightly less accurate versions of the models.
  • use_embeddings: defaults to ''. Passing default will map to glove,multi-forward,multi-backward, the recommended stacked-embedding configuration.
  • char_embeddings: defaults to False. Whether or not to include character-level embeddings.
  • bpe_size: defaults to 0. If you want to include Byte-Pair Encodings, set this value to 50, 100, 200, or 300. See more at Flair Embeddings Docs.
  • pos: defaults to True. Whether or not to include language-specific part-of-speech tags.
  • sentinment: defaults to True. Whether or not to include sentiment analysis, if it is available for the given language.

Tagging and Embedding models are downloaded automatically the first time they are called. This may take a while depending on your internet connection.

Microservice

The JSON-NLP repository provides a Microservice class, with a pre-built implementation of Flask. To run it, execute:

python flairjsonnlp/server.py

Since server.py extends the Flask app, a WSGI file would contain:

from flairjsonnlp.server import app as application

The microservice exposes the following URIs: - /expressions - /token_list

These 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:

http://localhost:5000/expressions?text=I am a sentence

Text 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.

The additional Flair parameters can be passed as parameters as well.

Here is an example GET call:

http://localhost:5000?lang=de&constituents=0&text=Ich bin ein Berliner.

Owner

  • Name: Damir Cavar
  • Login: dcavar
  • Kind: user
  • Location: Bloomington, IN
  • Company: Indiana University

GitHub Events

Total
Last Year

Committers

Last synced: 5 months ago

All Time
  • Total Commits: 22
  • Total Committers: 5
  • Avg Commits per committer: 4.4
  • Development Distribution Score (DDS): 0.773
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 5
Oren Baldinger o****g@i****u 5
maanvithag m****l@i****u 5
anurag_kumar a****5@g****m 5
blf11139 b****9@g****m 2
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 12 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 1
  • Total versions: 6
  • Total maintainers: 1
pypi.org: flairjsonnlp

The Python Flair JSON-NLP package

  • Versions: 6
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 12 Last month
Rankings
Dependent packages count: 10.1%
Stargazers count: 16.1%
Average: 18.9%
Forks count: 19.2%
Dependent repos count: 21.6%
Downloads: 27.8%
Maintainers (1)
Last synced: 5 months ago

Dependencies

setup.py pypi
  • flair >=0.4.1
  • pyjsonnlp >=0.2.6