Learn R Programming

rdracor (version 1.0.4)

get_text_tei: Retrieve a text for a play in 'TEI'

Description

get_text_tei() requests a text for a play in 'TEI' format, given play and corpus names. 'TEI' is an XML vocabulary, which makes it easy to extract structural information fischer2019programmablerdracor.

Usage

get_text_tei(play = NULL, corpus = NULL, ...)

Value

TEI data parsed by

xml2::read_xml().

Arguments

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).

...

Additional arguments passed to dracor_api.

References

See Also

get_text_df get_text_chr_spoken tei_to_df

Examples

Run this code
get_text_tei(play = "lessing-emilia-galotti", corpus = "ger")
# If you want a text in TEI without parsing by xml2::read_xml():
get_text_tei(play = "lessing-emilia-galotti", corpus = "ger", parse = FALSE)

Run the code above in your browser using DataLab