Skip to content

Commit

Permalink
Update DESCRIPTION, add NEWS, rebuild README
Browse files Browse the repository at this point in the history
  • Loading branch information
kbenoit committed Jul 2, 2018
1 parent 27dbf6a commit 48a436a
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 21 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: quanteda.dictionaries
Type: Package
Title: Text Analysis Dictionaries
Version: 0.1.0
Version: 0.2
Authors@R: c( person("Kenneth", "Benoit", email = "[email protected]", role =
c("aut", "cre", "cph")),
person("Stefan", "Müller", email = "[email protected]", role = "aut"))
Expand All @@ -11,7 +11,7 @@ License: MIT + file LICENSE
Depends:
R (>= 3.1.0)
Imports:
quanteda (>= 0.99),
quanteda (>= 1.2),
stringi
Suggests:
covr,
Expand Down
10 changes: 10 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# quanteda.dictionaries 0.2

* Added a `NEWS.md` file to track changes to the package.
* Fixed bug #14: word count failing when dictionaries are used.
* Fixed bug #16: `liwcalike(x, ...)` not passing arguments to `tokens()`.





47 changes: 28 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,33 @@
quanteda.dictionaries
================

[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/quanteda.dictionaries)](https://cran.r-project.org/package=quanteda.dictionaries)
[![Travis-CI Build Status](https://travis-ci.org/kbenoit/quanteda.dictionaries.svg?branch=master)](https://travis-ci.org/kbenoit/quanteda.dictionaries)
[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/kbenoit/quanteda.dictionaries?branch=master&svg=true)](https://ci.appveyor.com/project/kbenoit/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)
[![CRAN\_Status\_Badge](http://www.r-pkg.org/badges/version/quanteda.dictionaries)](https://cran.r-project.org/package=quanteda.dictionaries)
[![Travis-CI Build
Status](https://travis-ci.org/kbenoit/quanteda.dictionaries.svg?branch=master)](https://travis-ci.org/kbenoit/quanteda.dictionaries)
[![AppVeyor Build
Status](https://ci.appveyor.com/api/projects/status/github/kbenoit/quanteda.dictionaries?branch=master&svg=true)](https://ci.appveyor.com/project/kbenoit/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)

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.).
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
----------
## Installing

``` r
# the devtools package needs to be installed for this to work
devtools::install_github("kbenoit/quanteda.dictionaries")
```

Demonstration
-------------
## Demonstration

With the `liwcalike()` function from the **quanteda.dictionaries** package, you can easily analyze text corpora using exising or custom dictionaries. Here we show how to apply the Lexicoder Sentiment Dictionary (Young and Soroka 2012) to a corpus consting of 2000 movie reviews (from the **quanteda.corpora** package).
With the `liwcalike()` function from the **quanteda.dictionaries**
package, you can easily analyze text corpora using exising or custom
dictionaries. Here we show how to apply the Lexicoder Sentiment
Dictionary (Young and Soroka 2012) to a corpus consting of 2000 movie
reviews (from the **quanteda.corpora** package).

``` r
library("quanteda.dictionaries")
Expand All @@ -31,12 +39,12 @@ head(output_lsd)
```

## docname Segment WC WPS Sixltr Dic anger anticipation
## 1 neg_cv000_29416 1 847 78.88889 12.75 19.36 0.71 2.95
## 2 neg_cv001_19502 2 278 240.00000 15.11 24.46 3.24 3.24
## 3 neg_cv002_17424 3 559 162.66667 13.42 21.29 1.07 2.86
## 4 neg_cv003_12683 4 594 239.50000 16.50 22.73 1.35 3.03
## 5 neg_cv004_12641 5 872 366.50000 12.50 19.38 1.26 1.49
## 6 neg_cv005_29357 6 753 671.00000 17.26 27.49 3.32 1.59
## 1 neg_cv000_29416 1 847 78.88889 13.11 19.36 0.71 2.95
## 2 neg_cv001_19502 2 278 240.00000 10.79 24.46 3.24 3.24
## 3 neg_cv002_17424 3 559 162.66667 16.46 21.29 1.07 2.86
## 4 neg_cv003_12683 4 594 239.50000 16.67 22.73 1.35 3.03
## 5 neg_cv004_12641 5 872 366.50000 19.04 19.38 1.26 1.49
## 6 neg_cv005_29357 6 753 671.00000 18.33 27.49 3.32 1.59
## disgust fear joy negative positive sadness surprise trust AllPunc
## 1 0.83 1.42 2.36 2.24 4.01 1.42 1.30 2.13 18.06
## 2 2.16 1.80 1.44 4.32 2.88 1.44 1.08 2.88 18.35
Expand All @@ -52,7 +60,8 @@ head(output_lsd)
## 5 4.24 6.19 0.69 0.23 0.11 0.00 1.95 2.18 1.72 0 13.65
## 6 4.65 3.98 0.13 0.00 0.00 0.00 0.53 0.93 0.40 0 9.69

Code of Conduct
---------------
## Code of Conduct

Please note that this project is released with a [Contributor Code of Conduct](CONDUCT.md). By participating in this project you agree to abide by its terms.
Please note that this project is released with a [Contributor Code of
Conduct](CONDUCT.md). By participating in this project you agree to
abide by its terms.

0 comments on commit 48a436a

Please sign in to comment.