get_play_rdf: Retrieve an RDF for a play

View source: R/play.R

get_play_rdfR Documentation

Retrieve an RDF for a play

Description

get_play_rdf() requests an RDF (Resource Description Framework) data for a play, given play and corpus names. RDF for plays can be useful for extraction data for a play from https://www.wikidata.org/wiki/Wikidata:Main_Page.

Usage

get_play_rdf(play = NULL, corpus = NULL, parse = TRUE, ...)

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

parse

Logical, if TRUE the result is parsed by xml2::read_xml(), otherwise character value is returned. Default value is TRUE.

...

Additional arguments passed to dracor_api.

Value

RDF data parsed by xml2::read_xml().

See Also

get_play_metadata get_play_characters

Examples

get_play_rdf(play = "lessing-emilia-galotti", corpus = "ger")
# If you want RDF without parsing by xml2::read_xml():
get_play_rdf(play = "lessing-emilia-galotti", corpus = "ger", parse = FALSE)

Pozdniakov/rdracor documentation built on April 9, 2024, 1:20 a.m.