asent

Asent is a python library for performing efficient and transparent sentiment analysis using spaCy.

https://github.com/kennethenevoldsen/asent

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.8%) to scientific vocabulary

Keywords

interpretability natural-language-processing nlp python3 sentiment-analysis spacy spacy-extensions

Keywords from Contributors

transformers spacy-extension descriptive-statistics dependency-distance readability readability-scores syntactic-analysis huggingface huggingface-transformers language-model
Last synced: 4 months ago · JSON representation ·

Repository

Asent is a python library for performing efficient and transparent sentiment analysis using spaCy.

Basic Info
Statistics
  • Stars: 118
  • Watchers: 3
  • Forks: 16
  • Open Issues: 0
  • Releases: 14
Topics
interpretability natural-language-processing nlp python3 sentiment-analysis spacy spacy-extensions
Created about 4 years ago · Last pushed over 1 year ago
Metadata Files
Readme Changelog Contributing License Code of conduct Citation

README.md

Asent: Fast, flexible and transparent sentiment analysis

PyPI version python version Code style: black github actions pytest github actions docs pip downloads

Asent is a rule-based sentiment analysis library for Python made using SpaCy. It is inspired by Vader, but uses a more modular ruleset, that allows the user to change e.g. the method for finding negations. Furthermore, it includes visualizers to visualize model predictions, making the model easily interpretable.

Installation

Installing Asent is simple using pip:

pip install asent

There is no reason to update from GitHub as the version on pypi should always be the same of on GitHub.

Simple Example

The following shows a simple example of how you can quickly apply sentiment analysis using asent. For more on using asent see the usage guides.

```python import spacy import asent

create spacy pipeline

nlp = spacy.blank('en') nlp.add_pipe('sentencizer')

add the rule-based sentiment model

nlp.addpipe("asenten_v1")

try an example

text = "I am not very happy, but I am also not especially sad" doc = nlp(text)

print polarity of document, scaled to be between -1, and 1

print(doc._.polarity)

neg=0.0 neu=0.631 pos=0.369 compound=0.7526

```

Naturally, a simple score can be quite unsatisfying, thus Asent implements a series of visualizer to interpret the results: ```python

visualize model prediction

asent.visualize(doc, style="prediction") ```

If we want to know why the model comes the result it does we can use the analysis style: ```python

visualize the analysis performed by the model:

asent.visualize(doc[:5], style="analysis") ```

Where the value in the parenthesis (2.7) indicates the human-rating of the word, while the value outside the parenthesis indicates the value accounting for the negation. Asent also accounts for contrastive conjugations (e.g. but), casing, emoji's and punctuations. For more on how the model works check out the [usage guide].

📖 Documentation

| Documentation | | | -------------------------- | ----------------------------------------------------------------------------------------------------------------------- | | 🔧 Installation | Installation instructions for Asent | | 📚 Usage Guides | Guides and instructions on how to use asent and its features. It also gives short introduction to how the models works. | | 📰 News and changelog | New additions, changes and version history. | | 🎛 Documentation | The detailed reference for Asents's API. Including function documentation |

💬 Where to ask questions

| Type | | | ------------------------------ | ---------------------- | | 🚨 FAQ | FAQ | | 🚨 Bug Reports | GitHub Issue Tracker | | 🎁 Feature Requests & Ideas | GitHub Issue Tracker | | 👩‍💻 Usage Questions | GitHub Discussions | | 🗯 General Discussion | GitHub Discussions |

Owner

  • Name: Kenneth Enevoldsen
  • Login: KennethEnevoldsen
  • Kind: user
  • Location: Aarhus
  • Company: Center for Humanities Computing Aarhus

Interdisciplinary PhD Student on representation learning in Clinical NLP and Genetics at Aarhus University and Interacting Minds Centre

Citation (citation.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Enevoldsen"
  given-names: "Kenneth"
  orcid: "https://orcid.org/0000-0001-8733-0966"
title: "Asent: Fast, flexible and transparent sentiment analysis"
version: 0.4.0
# doi: 10.5281/zenodo.6675315
date-released: 2022-7-06
url: "https://github.com/KennethEnevoldsen/asent"

GitHub Events

Total
  • Issues event: 2
  • Watch event: 3
  • Issue comment event: 2
  • Fork event: 1
Last Year
  • Issues event: 2
  • Watch event: 3
  • Issue comment event: 2
  • Fork event: 1

Committers

Last synced: 7 months ago

All Time
  • Total Commits: 386
  • Total Committers: 9
  • Avg Commits per committer: 42.889
  • Development Distribution Score (DDS): 0.575
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
KennethEnevoldsen k****n@g****m 164
Kenneth Enevoldsen k****n@g****m 122
pre-commit-ci[bot] 6****] 58
dependabot[bot] 4****] 21
github-actions g****s@g****m 15
Martin Bernstorff m****f@g****m 3
Tom Aarsen C****v@g****m 1
Emil Stenström e****l@e****e 1
Andreas Louca a****s@l****v 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 23
  • Total pull requests: 129
  • Average time to close issues: 5 months
  • Average time to close pull requests: 1 day
  • Total issue authors: 10
  • Total pull request authors: 5
  • Average comments per issue: 2.0
  • Average comments per pull request: 0.76
  • Merged pull requests: 82
  • Bot issues: 0
  • Bot pull requests: 116
Past Year
  • Issues: 1
  • Pull requests: 0
  • Average time to close issues: about 1 hour
  • Average time to close pull requests: N/A
  • Issue authors: 1
  • Pull request authors: 0
  • Average comments per issue: 2.0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • KennethEnevoldsen (11)
  • tomaarsen (3)
  • sabatale (1)
  • aholovenko (1)
  • krumeto (1)
  • tsmdt (1)
  • HLasse (1)
  • S-Hahemi222 (1)
  • mirfan899 (1)
  • mutigaj1 (1)
Pull Request Authors
  • pre-commit-ci[bot] (68)
  • dependabot[bot] (54)
  • KennethEnevoldsen (11)
  • tomaarsen (1)
  • alouca (1)
Top Labels
Issue Labels
enhancement (12) Stale (5) bug (4) documentation (2) more information needed (1) question (1)
Pull Request Labels
dependencies (55) github_actions (20) python (14) Stale (8) closed-by-stalebot (1)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 2,841 last-month
  • Total dependent packages: 1
  • Total dependent repositories: 3
  • Total versions: 34
  • Total maintainers: 1
pypi.org: asent

A python package for flexible and transparent sentiment analysis.

  • Homepage: https://github.com/KennethEnevoldsen/asent
  • Documentation: https://asent.readthedocs.io/
  • License: MIT License Copyright (c) 2021 Kenneth Enevoldsen Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  • Latest release: 0.8.3
    published about 2 years ago
  • Versions: 34
  • Dependent Packages: 1
  • Dependent Repositories: 3
  • Downloads: 2,841 Last month
Rankings
Dependent packages count: 4.8%
Downloads: 5.8%
Stargazers count: 6.9%
Average: 7.2%
Dependent repos count: 8.9%
Forks count: 9.6%
Maintainers (1)
Last synced: 4 months ago

Dependencies

.github/workflows/check_for_rej.yml actions
  • actions/checkout v2 composite
.github/workflows/cruft.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
  • peter-evans/create-pull-request v4 composite
.github/workflows/dependabot_automerge.yml actions
  • hmarr/auto-approve-action v3.1.0 composite
.github/workflows/documentation.yml actions
  • actions/checkout v3 composite
  • ad-m/github-push-action v0.6.0 composite
  • sphinx-notes/pages 2.1 composite
.github/workflows/pre-commit.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
  • mshick/add-pr-comment v2 composite
.github/workflows/release.yml actions
  • actions/checkout v3 composite
  • pypa/gh-action-pypi-publish release/v1 composite
  • python-semantic-release/python-semantic-release v8.0.4 composite
  • python-semantic-release/upload-to-gh-release main composite
.github/workflows/stalebot.yml actions
  • actions/stale v6 composite
.github/workflows/static_type_checks.yml actions
  • actions/cache v3.2.6 composite
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
  • mshick/add-pr-comment v2 composite
  • peter-evans/find-comment v2 composite
.github/workflows/tests.yml actions
  • EnricoMi/publish-unit-test-result-action v2 composite
  • MishaKav/pytest-coverage-comment main composite
  • actions/cache v3.2.6 composite
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
docs/tutorials/requirements.txt pypi
pyproject.toml pypi
tests/requirements.txt pypi