Quantcast
Channel: Data Science, Analytics and Big Data discussions - Latest topics
Viewing all articles
Browse latest Browse all 4448

Exporting modified corpus with R

$
0
0

@azza00 wrote:

I wonder that this function take as input a set of text file tokenize each one and save it with thesame name… but it resave the same reading files with no modification

path <- ("C:/test/")
corp <- Corpus(DirSource(path), 
                 readerControl=list(reader=readPlain, 
                                    language='en_CA',
                                    load=TRUE));
crop <-lapply(corp, function(x) tokenize_ngrams(x, n = 6, n_min = 1))
writeCorpus(corp)

Posts: 3

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 4448

Trending Articles