quanteda (version 1.5.2)

nsentence: Count the number of sentences

Description

Return the count of sentences in a corpus or character object.

Usage

nsentence(x, ...)

Arguments

x

a character or corpus whose sentences will be counted

...

additional arguments passed to tokens

Value

count(s) of the total sentences per text

Examples

Run this code
# NOT RUN {
# simple example
txt <- c(text1 = "This is a sentence: second part of first sentence.",
         text2 = "A word. Repeated repeated.",
         text3 = "Mr. Jones has a PhD from the LSE.  Second sentence.")
nsentence(txt)
# }

Run the code above in your browser using DataLab