POS_tag_documents: POS tag documents

Description Usage Arguments Value Examples

Description

Annotates documents (provided as a character vector with one entry per document) with pars-of-speech (POS) tags using the openNLP POS tagger

Usage

1
POS_tag_documents(documents, memory = "-Xmx512M")

Arguments

documents

A vector of strings (one per document).

memory

The default amount of memory (512MB) assigned to the NLP package to POS tag documents is often not enough for large documents, which can lead to a "java.lang.OutOfMemoryError". The memory argument defaults to "-Xmx512M" (512MB) in this package, and can be increased if necessary to accommodate very large documents.

Value

A list object.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
# make sure quanteda is installed
requireNamespace("quanteda", quietly = TRUE)
# load some example data:
documents <- quanteda::data_corpus_inaugural

# run tagger
tagged_documents <- POS_tag_documents(documents)

## End(Not run)

phrasemachine documentation built on May 2, 2019, 8:23 a.m.