ml_lexicon_spanish_nlp

A lexicon to perform sentiment analysis in spanish with R

https://github.com/fbietti/ml_lexicon_spanish_nlp

Science Score: 67.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
    Found 2 DOI reference(s) in README
  • Academic publication links
    Links to: sciencedirect.com
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (7.7%) to scientific vocabulary
Last synced: 6 months ago · JSON representation ·

Repository

A lexicon to perform sentiment analysis in spanish with R

Basic Info
  • Host: GitHub
  • Owner: fbietti
  • Language: R
  • Default Branch: main
  • Size: 6.61 MB
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created about 2 years ago · Last pushed about 1 year ago
Metadata Files
Readme Citation

README.md

MLlexiconspanish_NLP

In the context of my research, I became interested in sentiment analysis. While in English, we have plenty of dictionaries for conducting analyses, unfortunately, in Spanish, it is more challenging to find usable resources in R. One day, I came across an article by Fermín L. Cruz, José A. Troyano, Beatriz Pontes, and F. Javier Ortega in which they propose a lexicon.

This small program will allow you to import their dictionary into R and use it. I also provide a small example of using the dictionary with a dataset of tweets that I downloaded when we had access to Twitter data.

You can find the file with the lexicon here: http://www.lsi.us.es/~fermin/index.php?title=Datasets

Reference for the lexicon: Fermín L. Cruz, José A. Troyano, Beatriz Pontes, and F. Javier Ortega. 'Building layered, multilingual sentiment lexicons at synset and lemma levels,' Expert Systems with Applications, Volume 41, Issue 13, 2014, Pages 5984-5994, https://doi.org/10.1016/j.eswa.2014.04.005. (https://www.sciencedirect.com/science/article/pii/S0957417414001997)

File: ML_lexicon

This file contains commands to transform the .xml file into a dictionary usable in R. It is divided into 5 steps. In the end, you will find an object 'sentimentsdicoesp.' You can use this object with the tokens_lookup function from the quanteda package.

File: exemple

In the file example.R, you will find an example of using the dictionary for the analysis of a corpus of tweets downloaded in 2022 during the attack against Cristina Kirchner in Buenos Aires.

Owner

  • Login: fbietti
  • Kind: user

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
  - family-names: Bietti
    given-names: Federico
    orcid: https://orcid.org/0000-0002-3912-3951
title: "NLP Sentiment Analysis Spanish Lexicon"
version: 
identifiers:
  - type: 
    value: 
date-released: 2023-12-21 

GitHub Events

Total
  • Push event: 1
Last Year
  • Push event: 1