quanteda (version 4.0.1)

nsentence: Count the number of sentences

Description

[Deprecated]

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

Usage

nsentence(x)

Value

count(s) of the total sentences per text

Arguments

x

a character or corpus whose sentences will be counted

Examples

Run this code
# 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.")
tokens(txt, what = "sentence") |>
    nsentence()

Run the code above in your browser using DataLab