qdap (Quantitative Discourse Analysis Package) is an R package designed to assist in quantitative discourse analysis. The package stands as a bridge between qualitative transcripts of dialogue and statistical analysis & visualization.
Questions tagged [qdap]
110 questions
24
votes
3 answers
Convert written number to number in R
Does anybody know a function to convert a text representation of a number into an actual number, e.g. 'twenty thousand three hundred and five' into 20305. I have written numbers in dataframe rows and want to convert them to numbers.
In package qdap,…

Henk
- 3,634
- 5
- 28
- 54
15
votes
7 answers
R break corpus into sentences
I have a number of PDF documents, which I have read into a corpus with library tm. How can one break the corpus into sentences?
It can be done by reading the file with readLines followed by sentSplit from package qdap [*]. That function requires a…

Henk
- 3,634
- 5
- 28
- 54
13
votes
4 answers
More efficient means of creating a corpus and DTM with 4M rows
My file has over 4M rows and I need a more efficient way of converting my data to a corpus and document term matrix such that I can pass it to a bayesian classifier.
Consider the following code:
library(tm)
GetCorpus <-function(textVector)
{
…

user1477388
- 20,790
- 32
- 144
- 264
10
votes
1 answer
R package ( qdapTools) version not getting detected correctly in Azure ML
I'm trying to install qdap package in Azure ML. Rest of the dependent packages get installed without any issues. When it comes to qdapTools, I get this error , though the version that I try to install is 1.3.1 ( Verified this from the Decription…

Indi
- 1,401
- 13
- 30
8
votes
2 answers
R: Group Similar Addresses Together
I have a 400,000 row file with manually entered addresses which need to be geocoded. There's a lot of different variations of the same addresses in the file, so it seems wasteful to be using API calls for the same address multiple times.
To cut down…

rsylatian
- 429
- 2
- 14
7
votes
1 answer
How to avoid class name conflict with a package "loaded via a namespace (and not attached)" (qdap & openssl)
Using the qdap::polarity() function can sometimes run into the error:
Error in derive_pubkey(key) :
RAW() can only be applied to a 'raw', not a 'list'
I'm fairly certain this is due qdap's key class conflicting with the openssl package's key…

Adam Spannbauer
- 2,707
- 1
- 17
- 27
6
votes
1 answer
Sentimental Analysis of review comments using qdap is slow
Am using qdap package to determine the sentiment of each review comment of a particular application. I read the review comments from a CSV file and pass it to the polarity function of qdap. Everything works fine and I get the polarity for all the…

VenuSathya20
- 63
- 7
5
votes
1 answer
qdap check_spelling Error in checkForRemoteErrors(val) : one node produced an error: arguments imply differing number of rows
I have been running into the error
Error in checkForRemoteErrors(val) :
one node produced an error: arguments imply differing number of rows: 3, 0
when trying to use check_spelling in the qdap package. The provided numbers 3 and 0 relate to the…

CallumH
- 751
- 1
- 7
- 22
5
votes
2 answers
Extract and count common word-pairs from character vector
How can someone find frequent pairs of adjacent words in a character vector? Using the crude data set, for example, some common pairs are "crude oil", "oil market", and "million barrels".
The code for the small example below tries to identify…

lawyeR
- 7,488
- 5
- 33
- 63
5
votes
2 answers
Estimating document polarity using R's qdap package without sentSplit
I'd like to apply qdap's polarity function to a vector of documents, each of which could contain multiple sentences, and obtain the corresponding polarity for each document. For example:
library(qdap)
polarity(DATA$state)$all$polarity
# Results:
…

Max Ghenis
- 14,783
- 16
- 84
- 132
4
votes
1 answer
R error trying to load qdap package
So I am trying to run the
library(ggplot2)
library(qdap)
but this error keeps coming up:
Unable to find any JVMs matching version "(null)".
No Java runtime present, try --request to install.
Error: package or namespace load failed for ‘qdap’:
…

chocolatekeyboard
- 73
- 2
- 10
4
votes
1 answer
Have qdap amplifiers apply to negated words
R 3.4.3, using qdap::polarity(), I'm wondering if there is a way to have an amplifier apply to a negated word instead of the actual word itself. In the example below, "love" is the positive word, "didn't" is the negation word, and "definitely" is…

JimmyT
- 1,099
- 4
- 10
- 15
4
votes
1 answer
qdap package: bug in converting zero digits to "zero" words
Before (as a rookie) I go submitting this as an R package bug, let me run it by y'all. I think all of the following are good:
replace_number("123 0 boogie")
[1] "one hundred twenty three boogie"
replace_number("1;1 foo")
[1] "one;one…

David Kaufman
- 989
- 1
- 7
- 20
3
votes
1 answer
Replacing year with English words in R
I need to pre-process a speech transcript for forced-alignment. However, I am having difficulty with replacing year with text representation. For example, 1984 needs to be replaced with "nineteen eighty four". I tried the replace_number function of…

Ninjadog
- 77
- 10
3
votes
1 answer
How to chain together multiple qdap transformations for text mining / sentiment (polarity) analysis in R
I have a data.frame that has week numbers, week, and text reviews, text. I would like to treat the week variable as my grouping variable and run some basic text analysis on it (e.g. qdap::polarity). Some of the review text have multiple sentences;…

JasonAizkalns
- 20,243
- 8
- 57
- 116