{"id":18754000,"url":"https://github.com/dcavar/flair-json-nlp","last_synced_at":"2025-04-13T00:31:58.374Z","repository":{"id":57429923,"uuid":"177869818","full_name":"dcavar/Flair-JSON-NLP","owner":"dcavar","description":"Flair wrapper for JSON-NLP.","archived":false,"fork":false,"pushed_at":"2020-05-18T17:43:41.000Z","size":31,"stargazers_count":11,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-11T15:58:24.026Z","etag":null,"topics":["flair","json","natural-language-processing","nlp"],"latest_commit_sha":null,"homepage":"https://nlp-lab.org/flairjsonnlp/","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:15:36.000Z","updated_at":"2024-03-21T17:48:09.000Z","dependencies_parsed_at":"2022-08-26T04:43:00.851Z","dependency_job_id":null,"html_url":"https://github.com/dcavar/Flair-JSON-NLP","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcavar%2FFlair-JSON-NLP","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcavar%2FFlair-JSON-NLP/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcavar%2FFlair-JSON-NLP/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcavar%2FFlair-JSON-NLP/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dcavar","download_url":"https://codeload.github.com/dcavar/Flair-JSON-NLP/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248650590,"owners_count":21139670,"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":["flair","json","natural-language-processing","nlp"],"created_at":"2024-11-07T17:27:45.847Z","updated_at":"2025-04-13T00:31:58.074Z","avatar_url":"https://github.com/dcavar.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Flair JSON-NLP Wrapper\n\n(C) 2019-2020 by [Damir Cavar]\n\nContributors to previous versions: [Oren Baldinger], [Maanvitha Gongalla], Anurag Kumar, Murali Kammili\n\nBrought to you by the [NLP-Lab.org]!\n\n\n## Introduction\n\n[Flair] v 4.5 wrapper for [JSON-NLP]. [Flair] provides state-of-the-art embeddings, and tagging capabilities,\nin particular, POS-tagging, NER, shallow syntax chunking, and semantic frame detection.\n\n\n## FlairPipeline\n\nWe provide a `FlairPipeline` class, with the following parameters for ease of use:\n\n- `lang`: defaults to `en`. Different languages support different models, see the [Flair Docs] for details.\n- `use_ontonotes`: defaults to `False`. Whether or not to use 4-class (True) or 12-class (False) NER tagging.\n- `fast`: defaults to `True`. Whether or not to use the smaller, faster, but slightly less accurate versions of the models.\n- `use_embeddings`: defaults to ''. Passing `default` will map to `glove,multi-forward,multi-backward`, the recommended stacked-embedding configuration.\n- `char_embeddings`: defaults to `False`. Whether or not to include character-level embeddings.\n- `bpe_size`: defaults to 0. If you want to include [Byte-Pair Encodings](https://nlp.h-its.org/bpemb/), set this value to 50, 100, 200, or 300. See more at [Flair Embeddings Docs](https://github.com/zalandoresearch/flair/blob/master/resources/docs/TUTORIAL_3_WORD_EMBEDDING.md).\n- `pos`: defaults to `True`. Whether or not to include language-specific part-of-speech tags.\n- `sentinment`: defaults to `True`. Whether or not to include sentiment analysis, if it is available for the given language.\n\nTagging and Embedding models are downloaded automatically the first time they are called.\nThis may take a while depending on your internet connection.\n\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 flairjsonnlp/server.py\n \nSince `server.py` extends the [Flask] app, a WSGI file would contain:\n\n    from flairjsonnlp.server import app as application\n\nThe microservice exposes the following URIs:\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/expressions?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 additional [Flair] parameters can be passed as parameters as well.\n\nHere is an example `GET` call:\n\n    http://localhost:5000?lang=de\u0026constituents=0\u0026text=Ich bin ein Berliner.\n\n\n\n[Damir Cavar]: http://damir.cavar.me/ \"Damir Cavar\"\n[Oren Baldinger]: https://oren.baldinger.me/ \"Oren Baldinger\"\n[Maanvitha Gongalla]: https://maanvithag.github.io/MaanvithaGongalla/ \"Maanvitha Gongalla\"\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[Flair Docs]: https://github.com/zalandoresearch/flair/tree/master/resources/docs \"Flair Docs\"\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdcavar%2Fflair-json-nlp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdcavar%2Fflair-json-nlp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdcavar%2Fflair-json-nlp/lists"}