documents: Document

Description Usage Arguments Value See Also Examples

Description

The basic unit of text analysis is a document. The textanalysis package allows one to work with documents stored in a variety of formats.

Usage

1
2
3
4
5
6
7

Arguments

path

The path to the file.

text

The text as a character string, or tokens, or ngrams as a list.

...

Other positonal arguments.

Value

An object of class document.

See Also

directory_corpus to read a dicrectory of files as corpus, and to_documents to parse a vector or data.frame to documents.

Examples

1
2
3
4
5
6
7
8
## Not run: 
init_textanalysis()

doc <- "This is a document."
string_document(doc)
ngram_document(doc, 2L)

## End(Not run)

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