Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kbenoit/quanteda.dictionaries
Dictionaries for text analysis
https://github.com/kbenoit/quanteda.dictionaries
Last synced: about 1 month ago
JSON representation
Dictionaries for text analysis
- Host: GitHub
- URL: https://github.com/kbenoit/quanteda.dictionaries
- Owner: kbenoit
- License: other
- Created: 2017-06-12T22:06:20.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-01-31T13:21:44.000Z (almost 2 years ago)
- Last Synced: 2024-08-03T06:02:28.345Z (3 months ago)
- Language: HTML
- Size: 5.8 MB
- Stars: 70
- Watchers: 9
- Forks: 13
- Open Issues: 16
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE
Awesome Lists containing this project
README
---
title: "quanteda.dictionaries"
output: github_document
---```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```[![CRAN status](https://www.r-pkg.org/badges/version/quanteda.dictionaries)](https://CRAN.R-project.org/package=quanteda.dictionaries)
[![Coverage Status](https://img.shields.io/codecov/c/github/kbenoit/quanteda.dictionaries/master.svg)](https://codecov.io/github/kbenoit/quanteda.dictionaries?branch=master)
[![R-CMD-check](https://github.com/kbenoit/quanteda.dictionaries/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/kbenoit/quanteda.dictionaries/actions/workflows/R-CMD-check.yaml)An R package consisting of dictionaries for text analysis and associated utilities. Designed to be used with [**quanteda**](http://quanteda.io) but can be used more generally with any text analytic package (e.g. **tidytext**, **tm**, etc.).
## Installing
```{r eval = FALSE}
# the devtools package needs to be installed for this to work
devtools::install_github("kbenoit/quanteda.dictionaries")
```## Demonstration
With the `liwcalike()` function from the **quanteda.dictionaries** package, you can easily analyse text corpora using existing or custom dictionaries. Here we show how to apply the Moral Foundations Dictionary to the US Presidential Inaugural speech corpus distributed with [**quanteda**](https://github.com/quanteda/quanteda).
```{r, warning=FALSE, message=FALSE}
library("quanteda")
library("quanteda.dictionaries")output_lsd <- liwcalike(data_corpus_inaugural, dictionary = data_dictionary_MFD)
head(output_lsd)
```
## More dictionariesMore dictionaries are supplied with the [**quanteda.sentiment**](https://github.com/quanteda/quanteda.sentiment) package.
## Code of Conduct
Please note that this project is released with a [Contributor Code of Conduct](https://github.com/kbenoit/quanteda.dictionaries/blob/master/CONDUCT.md). By participating in this project you agree to abide by its terms.