Title: | Natural Language Processing Utilities |
---|---|
Description: | Utilities for Natural Language Processing. |
Authors: | Kurt Hornik [aut, cre] |
Maintainer: | Kurt Hornik <[email protected]> |
License: | GPL-2 |
Version: | 0.0-5.1 |
Built: | 2024-11-05 06:38:42 UTC |
Source: | CRAN |
Generate an annotator which computes document diversity annotations
for English documents using diversity()
from package
qdap.
QDAP_Diversity_Annotator()
QDAP_Diversity_Annotator()
A Annotator
object giving the generated document
diversity annotator.
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)
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)
Generate an annotator which computes document formality annotations
for English documents using formality()
from package
qdap.
QDAP_Formality_Annotator()
QDAP_Formality_Annotator()
A Annotator
object giving the generated document
formality annotator.
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)
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)
Generate an annotator which computes sentence polarity annotations for
English documents using polarity()
from package
qdap.
QDAP_Polarity_Annotator()
QDAP_Polarity_Annotator()
A Annotator
object giving the generated sentence
polarity annotator.
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)
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)
Generate an annotator which computes word stem annotations using
wordStem()
from package SnowballC.
Snowball_Stem_Annotator(language = "porter")
Snowball_Stem_Annotator(language = "porter")
language |
a character string giving the document language.
See the documentation for |
A Annotator
object giving the generated word stem
annotator.
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)
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)