From 48a436a98d8563011f8d8d88fa34d9d027276e4a Mon Sep 17 00:00:00 2001 From: Kenneth Benoit Date: Mon, 2 Jul 2018 21:11:24 +0100 Subject: [PATCH] Update DESCRIPTION, add NEWS, rebuild README --- DESCRIPTION | 4 ++-- NEWS.md | 10 ++++++++++ README.md | 47 ++++++++++++++++++++++++++++------------------- 3 files changed, 40 insertions(+), 21 deletions(-) create mode 100644 NEWS.md diff --git a/DESCRIPTION b/DESCRIPTION index dab5b66..ff25ad6 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -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 = "kbenoit@lse.ac.uk", role = c("aut", "cre", "cph")), person("Stefan", "Müller", email = "mullers@tcd.ie", role = "aut")) @@ -11,7 +11,7 @@ License: MIT + file LICENSE Depends: R (>= 3.1.0) Imports: - quanteda (>= 0.99), + quanteda (>= 1.2), stringi Suggests: covr, diff --git a/NEWS.md b/NEWS.md new file mode 100644 index 0000000..37a08b8 --- /dev/null +++ b/NEWS.md @@ -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()`. + + + + + diff --git a/README.md b/README.md index 0a00225..0ebc0c3 100644 --- a/README.md +++ b/README.md @@ -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") @@ -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 @@ -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.