| labels | R Documentation |
Extract the labels and relations in a webanno file to an easy, machine readable format ready for machine learning projects.
labels(
data,
label,
relations = NULL,
show_type = FALSE,
show_tag = FALSE,
show_ID = FALSE,
handle_multiple = "duplicate"
)
data |
character or WebAnnoTSV. The contents of a WebAnno TSV v3.3 file
as created by |
label |
character. The main label. The relations must go FROM this term. |
relations |
character. The set of relations you'd like to extract. |
show_type |
logical. Add a column with the type of relation of the related terms. |
show_tag |
logical. Add a column with the tags of the related terms. |
show_ID |
logical. Add a column with the positional ID of the related terms. |
handle_multiple |
character. If there are multiple |
A list of dataframes, organized with columns for the corresponding line in the text, label and relations (if relations != NULL)
example = arete_data("annotations")[[1]]
labels(data = example, label = "Species", relations = "OCCURS")
labels(data = example,
label = c("TraitVal"), relations = c("meas_Sex"))
labels(data = example,
label = c("TraitVal"), relations = c("meas_trait", "meas_Sex", "meas_Unit"))
labels(data = example,
label = c("TraitVal"), relations = c("meas_trait", "meas_Sex", "meas_Unit"),
handle_multiple = "merge")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.