Speech_Python-class: Python Class for a Speech

Description Methods

Description

Python Class for a Speech

Methods

findText(..., .ev = XRPython::RPython(), .get = NA)

Python Method: findText(text, tokens =, ignoreCase =) Searches in the Speech object for occurences of the specified text and returns a list of the lines in which that text appears. Argument ‘tokens’ controls whether the search is in the tokens field, in which case ‘text’ must match a token exactly. Otherwise the search is in the speech text for a matching substring. If ‘ignoreCase’ is true, the text argument is converted to lower case. Tokens are always lower-cased and the speech text will be converted to lower as needed.

getText(..., .ev = XRPython::RPython(), .get = NA)

Python Method: getText() Returns the text of the speech, as an object that will be an R character vector when converted.

tokenize(..., .ev = XRPython::RPython(), .get = NA)

Python Method: tokenize() Returns the set of tokens in the speech as a single string, with "$" separating lines.


johnmchambers/shakespeare documentation built on May 19, 2019, 5:16 p.m.