tei_to_df {rdracor} | R Documentation |
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)
Arguments
tei |
A TEI object stored as an object of class |
play |
Character, name of a play (you can find all play names in
|
corpus |
Character, name of the corpus (you can find all corpus names in
|
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.
Functions
-
get_text_df()
: Retrieves all stage directions of a play, given play and corpus names.
See Also
Examples
get_text_df(play = "lessing-emilia-galotti", corpus = "ger")
emilia_tei <- get_text_tei(play = "lessing-emilia-galotti", corpus = "ger")
tei_to_df(emilia_tei)