All Projects β†’ SamEdwardes β†’ spaCyTextBlob

SamEdwardes / spaCyTextBlob

Licence: MIT License
A TextBlob sentiment analysis pipeline component for spaCy.

Programming Languages

python
139335 projects - #7 most used programming language
Jupyter Notebook
11667 projects

Projects that are alternatives of or similar to spaCyTextBlob

spacy-server
🦜 Containerized HTTP API for industrial-strength NLP via spaCy and sense2vec
Stars: ✭ 58 (+93.33%)
Mutual labels:  spacy
ml-datasets
🌊 Machine learning dataset loaders for testing and example scripts
Stars: ✭ 40 (+33.33%)
Mutual labels:  spacy
spacy-fastlang
Language detection using Spacy and Fasttext
Stars: ✭ 34 (+13.33%)
Mutual labels:  spacy
agile
🌌 Global State and Logic Library for JavaScript/Typescript applications
Stars: ✭ 90 (+200%)
Mutual labels:  spacy
DaCy
DaCy: The State of the Art Danish NLP pipeline using SpaCy
Stars: ✭ 66 (+120%)
Mutual labels:  spacy
converse
Conversational text Analysis using various NLP techniques
Stars: ✭ 147 (+390%)
Mutual labels:  spacy
deplacy
CUI-based Tree Visualizer for Universal Dependencies and Immediate Catena Analysis
Stars: ✭ 97 (+223.33%)
Mutual labels:  spacy
presidio-research
This package features data-science related tasks for developing new recognizers for Presidio. It is used for the evaluation of the entire system, as well as for evaluating specific PII recognizers or PII detection models.
Stars: ✭ 62 (+106.67%)
Mutual labels:  spacy
pynsett
A programmable relation extraction tool
Stars: ✭ 25 (-16.67%)
Mutual labels:  spacy
TRUNAJOD2.0
An easy-to-use library to extract indices from texts.
Stars: ✭ 18 (-40%)
Mutual labels:  spacy
bert-tensorflow-pytorch-spacy-conversion
Instructions for how to convert a BERT Tensorflow model to work with HuggingFace's pytorch-transformers, and spaCy. This walk-through uses DeepPavlov's RuBERT as example.
Stars: ✭ 26 (-13.33%)
Mutual labels:  spacy
spacy hunspell
✏️ Hunspell extension for spaCy 2.0.
Stars: ✭ 94 (+213.33%)
Mutual labels:  spacy
nlpbuddy
A text analysis application for performing common NLP tasks through a web dashboard interface and an API
Stars: ✭ 115 (+283.33%)
Mutual labels:  spacy
airy
πŸ’¬ Open source conversational platform to power conversations with an open source Live Chat, Messengers like Facebook Messenger, WhatsApp and more - πŸ’Ž UI from Inbox to dashboards - πŸ€– Integrations to Conversational AI / NLP tools and standard enterprise software - ⚑ APIs, WebSocket, Webhook - πŸ”§ Create any conversational experience
Stars: ✭ 299 (+896.67%)
Mutual labels:  spacy
turing
✨ 🧬 Turing AI - Semantic Navigation, Chatbot using Search Engine and Many NLP Vendors.
Stars: ✭ 30 (+0%)
Mutual labels:  spacy
alter-nlu
Natural language understanding library for chatbots with intent recognition and entity extraction.
Stars: ✭ 45 (+50%)
Mutual labels:  spacy
hello-nlp
A natural language search microservice
Stars: ✭ 85 (+183.33%)
Mutual labels:  spacy
EpiTator
EpiTator annotates epidemiological information in text documents. It is the natural language processing framework that powers GRITS and EIDR Connect.
Stars: ✭ 38 (+26.67%)
Mutual labels:  spacy
spacy-universal-sentence-encoder
Google USE (Universal Sentence Encoder) for spaCy
Stars: ✭ 102 (+240%)
Mutual labels:  spacy
contextualSpellCheck
βœ”οΈContextual word checker for better suggestions
Stars: ✭ 274 (+813.33%)
Mutual labels:  spacy

spacytextblob

PyPI version pytest PyPI - Downloads Netlify Status

A TextBlob sentiment analysis pipeline component for spaCy.

Install

Install spacytextblob from PyPi.

pip install spacytextblob

TextBlob requires additional data to be downloaded before getting started.

python -m textblob.download_corpora

spaCy also requires that you download a model to get started.

python -m spacy download en_core_web_sm

Quick Start

spacytextblob allows you to access all of the attributes created of the textblob.TextBlob class but within the spaCy framework. The code below will demonstrate how to use spacytextblob on a simple string.

import spacy
from spacytextblob.spacytextblob import SpacyTextBlob

nlp = spacy.load('en_core_web_sm')
text = "I had a really horrible day. It was the worst day ever! But every now and then I have a really good day that makes me happy."
nlp.add_pipe("spacytextblob")
doc = nlp(text)

print(doc._.blob.polarity)
# -0.125

print(doc._.blob.subjectivity)
# 0.9

print(doc._.blob.sentiment_assessments.assessments)
# [(['really', 'horrible'], -1.0, 1.0, None), (['worst', '!'], -1.0, 1.0, None), (['really', 'good'], 0.7, 0.6000000000000001, None), (['happy'], 0.8, 1.0, None)]

In comparison, here is how the same code would look using TextBlob:

from textblob import TextBlob

text = "I had a really horrible day. It was the worst day ever! But every now and then I have a really good day that makes me happy."
blob = TextBlob(text)

print(blob.sentiment_assessments.polarity)
# -0.125

print(blob.sentiment_assessments.subjectivity)
# 0.9

print(blob.sentiment_assessments.assessments)
# [(['really', 'horrible'], -1.0, 1.0, None), (['worst', '!'], -1.0, 1.0, None), (['really', 'good'], 0.7, 0.6000000000000001, None), (['happy'], 0.8, 1.0, None)]

Quick Reference

spacytextblob performs sentiment analysis using the TextBlob library. Adding spacytextblob to a spaCy nlp pipeline creates a new extension attribute for the Doc, Span, and Token classes from spaCy.

  • Doc._.blob
  • Span._.blob
  • Token._.blob

The ._.blob attribute contains all of the methods and attributes that belong to the textblob.TextBlob class Some of the common methods and attributes include:

  • ._.blob.polarity: a float within the range [-1.0, 1.0].
  • ._.blob.subjectivity: a float within the range [0.0, 1.0] where 0.0 is very objective and 1.0 is very subjective.
  • ._.blob.sentiment_assessments.assessments: a list of polarity and subjectivity scores for the assessed tokens.

See the textblob docs for the complete listing of all attributes and methods that are available in ._.blob.

Reference and Attribution

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].