Skip to content
Back to formatted view

Raw Message

Message-ID: <638186530.2330677.1429734369554.JavaMail.yahoo@mail.yahoo.com>
Date: 2015-04-22T20:26:09Z
From: Mike
Subject: Why is findAssocs() not working?

findAssocs() is not working, as is seen below. "Lucid" and "dreaming" occur together quite often in the book. 

The corpus is a single document, the text version of a book.? Does this function require at least two documents?? If so, if I split the book in half will I get the correlations regarding the book as a whole, or in regards to how the two halves compare to each other?
> docs <- tm_map(docs, stemDocument)
> dtm <- DocumentTermMatrix(docs)
> freq <- colSums(as.matrix(dtm))
> ord <- order(freq)
> freq[tail(ord)]
one experi   will   can lucid dream
287   312   363   452   1018   2413
> freq[head(ord)]
abbey abdomin   abdu abraham absent   abus
1       1       1       1       1       1
> findAssocs(dtm, "dream", corlimit=0.6)
$dream
numeric(0)
> findAssocs(dtm, "dream", corlimit=0.1)
$dream
numeric(0)
> findAssocs(dtm, "lucid", corlimit=0.01)
$lucid
numeric(0)
> findAssocs(dtm, "lucid", corlimit=0.6)
$lucid
numeric(0)
> 
 

	[[alternative HTML version deleted]]