text8corpus: Line Sentence

Description Usage Arguments Examples

View source: R/corpora.R

Description

Iterate over sentences from .txt file.

Usage

1
text8corpus(file, max_sentence_length = 10000L)

Arguments

file

Path to .txt file.

max_sentence_length

Maximum length of sentence to scan.

Examples

1
2
3
4
file <- datapath('testcorpus.txt') # example file
readLines(file) # what it looks like

(sentences <- text8corpus(file))

news-r/gensimr documentation built on Jan. 9, 2021, 5:55 a.m.