Giter Club home page Giter Club logo

leia's Introduction

Análise de Sentimentos em Português

LeIA (Léxico para Inferência Adaptada) é um fork do léxico e ferramenta para análise de sentimentos VADER (Valence Aware Dictionary and sEntiment Reasoner) adaptado para textos em português, com suporte para emojis e foco na análise de sentimentos de textos expressos em mídias sociais - mas funcional para textos de outros domínios.

Modo de uso

A biblioteca preserva a API do VADER, e o texto de entrada não precisa ser pré-processado:

from leia import SentimentIntensityAnalyzer 

s = SentimentIntensityAnalyzer()

# Análise de texto simples
s.polarity_scores('Eu estou feliz')
#{'neg': 0.0, 'neu': 0.328, 'pos': 0.672, 'compound': 0.6249}

# Análise de texto com emoji :)
s.polarity_scores('Eu estou feliz :)')
#{'neg': 0.0, 'neu': 0.22, 'pos': 0.78, 'compound': 0.7964}

# Análise de texto com negação
s.polarity_scores('Eu não estou feliz')
#{'neg': 0.265, 'neu': 0.241, 'pos': 0.494, 'compound': 0.4404}

A saída da análise de sentimentos é um dicionário com os seguintes campos:

  • pos: porcentagem positiva do texto
  • neg: porcentagem negativa do texto
  • neu: porcentagem neutra do texto
  • compound: valor de sentimento geral normalizado, variando de -1 (extremamente negativo) a +1 (extremamente positivo)

O valor compound pode ser utilizado para descrever o sentimento predominante no texto, por meio dos limites de valores:

  • Sentimento positivo: compound >= 0.05
  • Sentimento negativo: compound <= -0.05
  • Sentimento neutro: (compound > -0.05) and (compound < 0.05)

Citação (BibTeX)

Se você utilizar este projeto em sua pesquisa, considere citar o repositório:

@misc{Almeida2018,
  author = {Almeida, Rafael J. A.},
  title = {LeIA - Léxico para Inferência Adaptada},
  year = {2018},
  publisher = {GitHub},
  journal = {GitHub repository},
  howpublished = {\url{https://github.com/rafjaa/LeIA}}
}

O léxico VADER original é descrito no paper:

@inproceedings{gilbert2014vader,
  title={Vader: A parsimonious rule-based model for sentiment analysis of social media text},
  author={Gilbert, CJ Hutto Eric},
  booktitle={Eighth International Conference on Weblogs and Social Media (ICWSM-14). Available at (20/04/16) http://comp. social. gatech. edu/papers/icwsm14. vader. hutto. pdf},
  year={2014}
}

leia's People

Contributors

ocramoi avatar rafjaa avatar ronkiro avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

leia's Issues

Como adicionar novas palavras?

O modelo está tendo dificuldade em classificar algumas frases, contendo certas palavras que obviamente não são neutras, como por exemplo, "péssimo".

Como posso contribuir com o projeto e adicioná-la no espectro negativo do sentimento?

Obrigado!

Import Error

image
I'm running this on Google colab and I'm getting this error. I install LeIA using pip install leia

Error in booster.txt

In the booster.txt file, you have the following line

DECR type

I think it should probably be:

type DECR

Import Error

Olá não estou conseguindo utilizar a biblioteca com o Google Colab, você tem algum exemplo de import ou de código que esteja utilizando o Leia?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.