| Version: | 0.0-5.1 | 
| Title: | Natural Language Processing Utilities | 
| Description: | Utilities for Natural Language Processing. | 
| License: | GPL-2 | 
| Imports: | NLP (≥ 0.1-11.3), SnowballC, qdap, utils | 
| NeedsCompilation: | no | 
| Packaged: | 2023-05-11 07:43:29 UTC; hornik | 
| Author: | Kurt Hornik | 
| Maintainer: | Kurt Hornik <Kurt.Hornik@R-project.org> | 
| Repository: | CRAN | 
| Date/Publication: | 2023-05-11 07:59:52 UTC | 
Document Diversity Annotator
Description
Generate an annotator which computes document diversity annotations
for English documents using diversity() from package
qdap.
Usage
QDAP_Diversity_Annotator()
Value
A Annotator object giving the generated document
diversity annotator.
Examples
require("NLP")
doc <- readRDS(system.file("texts", "stanford.rds", package = "NLP"))
s <- content(doc)
a <- annotation(doc)
diversity_annotator <- QDAP_Diversity_Annotator()
diversity_annotator(s, a)
Document Formality Annotator
Description
Generate an annotator which computes document formality annotations
for English documents using formality() from package
qdap.
Usage
QDAP_Formality_Annotator()
Value
A Annotator object giving the generated document
formality annotator.
Examples
require("NLP")
doc <- readRDS(system.file("texts", "stanford.rds", package = "NLP"))
s <- content(doc)
a <- annotation(doc)
formality_annotator <- QDAP_Formality_Annotator()
formality_annotator(s, a)
Sentence Polarity Annotator
Description
Generate an annotator which computes sentence polarity annotations for
English documents using polarity() from package 
qdap.
Usage
QDAP_Polarity_Annotator()
Value
A Annotator object giving the generated sentence
polarity annotator.
Examples
require("NLP")
doc <- readRDS(system.file("texts", "stanford.rds", package = "NLP"))
s <- content(doc)
a <- annotation(doc)
polarity_annotator <- QDAP_Polarity_Annotator()
polarity_annotator(s, a)
Word Stem Annotator
Description
Generate an annotator which computes word stem annotations using
wordStem() from package SnowballC.
Usage
Snowball_Stem_Annotator(language = "porter")
Arguments
| language | a character string giving the document language.
See the documentation for  | 
Value
A Annotator object giving the generated word stem
annotator.
Examples
require("NLP")
doc <- readRDS(system.file("texts", "stanford.rds", package = "NLP"))
s <- content(doc)
a <- annotation(doc)
stem_annotator <- Snowball_Stem_Annotator()
stem_annotator(s, a)