Learn R Programming

qdap (version 0.2.5)

end_mark: Sentence End marks

Description

Grab the sentence end marks for a transcript. This can be useful to categorize based on sentence type.

Usage

end_mark(text.var)

Arguments

text.var
The text variable.

Value

  • Returns a character vector of qdap end marks for each sentence. End marks include:
  • "."Declarative sentence.
  • "?"Question sentence.
  • "!"Exclamatory sentence.
  • "|"Incomplete sentence.
  • "*."Imperative-declarative sentence.
  • "*?"Imperative-question sentence (unlikely to occur)
  • "*!"Imperative-exclamatory sentence.
  • "*|"Imperative-incomplete sentence.
  • "no.em"No end mark.
  • "blank"Empty cell/NA.

Examples

Run this code
end_mark(DATA$state)
end_mark(mraja1spl$dialogue)
ques <- mraja1spl[end_mark(mraja1spl$dialogue) == "?", ] #grab questions
htruncdf(ques)
non.ques <- mraja1spl[end_mark(mraja1spl$dialogue) != "?", ] #non questions
htruncdf(non.ques, 20)
ques.per <- mraja1spl[end_mark(mraja1spl$dialogue) %in% c(".", "?"), ] #grab ? and .
htruncdf(ques.per, 20)

Run the code above in your browser using DataLab