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: 25 days 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 (about 2 years ago)
- Last Synced: 2024-11-28T17:28:09.293Z (3 months ago)
- Language: HTML
- Size: 5.8 MB
- Stars: 71
- 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)
```[](https://CRAN.R-project.org/package=quanteda.dictionaries)
[](https://codecov.io/github/kbenoit/quanteda.dictionaries?branch=master)
[](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.