Displaying 1 result from an estimated 1 matches for "freq_dist".
Did you mean:
free_list
2011 Jun 09
2
Coercing Output from mget() into Proper Data Frame
...in the first column and the frequency
in the second column.
Any help would be very much appreciated.
Regards,
Na'im
library(Rstem)
# make a data frame of stems and their frequencies
stem_freq_list <- function(freqFile) {
stem_dict <- new.env(parent=emptyenv(), hash=TRUE)
freq_dist <- read.csv(freqFile,header=TRUE)
words <- as.character(freq_dist[,1])
freqs <- as.numeric(freq_dist[,2])
stems <- wordStem(words, language="english")
uniq_stems <- c()
# make a hash table of stems and their frequencies
for (i in 1:length(word...