sentDetect {openNLP} | R Documentation |
Detect sentences.
sentDetect(s, language = "en", model = NULL)
s |
A character vector where the sentences should be detected. |
language |
A character vector giving s 's language. This
argument is only used if model is NULL for selecting a
default model. At the moment only en (English) and es
(Spanish) are supported. |
model |
A model. |
If model
is NULL
then a default model for detection of
English or Spanish sentences from the openNLPmodels is loaded.
A character vector resulting from sentence detection in s
.
Ingo Feinerer
OpenNLP. http://opennlp.sourceforge.net/
s <- "This is a sentence. This another---but with dash-like structures, and some commas. Maybe another with question marks? Sure!" sentDetect(s, language = "en") s <- "¿Como se llama usted? El castellano es la lengua española oficial del Estado." sentDetect(s, language = "es")