tei_to_df: Retrieve a text for a play as a data frame
Description
The function get_text_df() returns you a data frame with text of
the selected play. tei_to_df() allows to convert an existing 'TEI'
object to a data frame.
Usage
tei_to_df(tei)
get_text_df(play, corpus)
Value
Text of a play as a data frame in
tidy text format.
Each row represent one token. The text tokenised by lines, notes and stage
directions (<p>, <l>, <stage> or <note>).
Column text contains text of the line, other columns contain metadata
for the line.
Arguments
tei
A TEI object stored as an object of class xml_document.
You can use this function if you have already downloaded TEI using
get_text_tei.
play
Character, name of a play (you can find all play names in
"playName" column within an object returned by
get_dracor). Character vector (longer than 1) is not
supported.
corpus
Character, name of the corpus (you can find all corpus names in
name column within an object returned by
get_dracor_meta).
Functions
get_text_df(): Retrieves all stage directions of a play,
given play and corpus names.