nltk_text: As text

Description Usage Arguments Examples

View source: R/text.R

Description

As NLTK text object.

Usage

1

Arguments

text

Text to convert.

Examples

1
2
3
4
5
6
7
## Not run: 
files <- gutenberg_files(to_r = TRUE)
words <- gutenberg_words(sample(files, 1)) # get random text
text <- nltk_text(words) # convert
text$concordance("surprize")

## End(Not run)

news-r/nltk documentation built on Nov. 4, 2019, 9:40 p.m.