Set / Get / Remove legal labels of attributeDefinition of emuDB

Description

Set / Get / Remove legal labels of a specific attributeDefinition of a emuDB. The legal labels are a character vector of strings that specifies the labels that are legal (i.e. allowed / valid) for the given attribute. As the EMU-webApp won't allow the annotator to enter any labels that are not specified in this array, this is a simple way of assuring that a level has a consistent label set. For more information on the structural elements of an emuDB see vignette(emuDB). Note that defining legal labels for an attributeDefinition does not imply that the existing labels are checked for being 'legal' in the emuDB.

Usage

1
2
3
4
5
set_legalLabels(emuDBhandle, levelName, attributeDefinitionName, legalLabels)

get_legalLabels(emuDBhandle, levelName, attributeDefinitionName)

remove_legalLabels(emuDBhandle, levelName, attributeDefinitionName)

Arguments

emuDBhandle

emuDB handle as returned by load_emuDB

levelName

name of level

attributeDefinitionName

name of attributeDefinition (can be and often is the level name)

legalLabels

character vector of labels

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
## Not run: 

##################################
# prerequisite: loaded ae emuDB 
# (see ?load_emuDB for more information)

legalPhoneticLabels = c("V", "m", "N", "s", "t", "H", "@:", "f", "r", 
                        "E", "n", "z", "S", "i:", "w", "@", "k", "I", "d", 
                        "db", "j", "u:", "dH", "l", "ai", "O", "D", "o:", "v")

# set legal labels of the 
# default "Phonetic" attributeDefinition of
# the "Phonetic" level of ae emuDB
set_legalLabels(emuDBhandle = ae, 
                levelName = "Phonetic",
                attributeDefinitionName = "Phonetic",
                legalLabels = legalPhoneticLabels)

# get legal labels of the 
# default "Phonetic" attributeDefinition of
# the "Phonetic" level of ae emuDB
get_legalLabels(emuDBhandle = ae, 
                levelName = "Phonetic", 
                attributeDefinitionName = "Phonetic")
                

# remove legal labels of the 
# default "Phonetic" attributeDefinition of
# the "Phonetic" level of ae emuDB
remove_legalLabels(emuDBhandle = ae, 
                   levelName = "Phonetic", 
                   attributeDefinitionName = "Phonetic")
                

## End(Not run)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.