The class includes methods to read, modify and write a registry file. Several operations could be accomplished with the 'cwb-regedit' tool, the functions defined here ensure that manipulating the registry is possible without a full installation of the CWB.
name of the CWB corpus
a new value to set
a filename
name of a package
directory of the registry (defaults to CORPUS_Registry environment variable)
registryDirregistry directory
encodingcorpus encoding
txtregistry as character vector
pAttributesp-attributes
propertiescorpus properties
idcorpus id
homehome directory
namecorpus name
infopath to info file
addPAttribute(pAttribute)Add an p-attribute.
addSAttribute(sAttribute)Add an s-attribute.
adjustHome()Reset the home directory. This will usually be necessary after installing a data package.
dropSAttribute(sAttribute)Drop a s-attribute.
getEncoding()Get the encoding.
getHome()Get the home directory of a corpus.
getId()Get the id of a corpus.
getInfo()Get path to the info file.
getName()Get the name of a corpus.
getPAttributes()Get the pAttributes.
getProperties()Get corpus properties.
getSAttributes()Get the sAttributes.
initialize(corpus = NULL, registry = Sys.getenv("CORPUS_REGISTRY"),
package = NULL, filename = NULL)Initialize a new RegistryFile object.
parse()Parse the registry file.
read()Read file from disc, as character vector in field 'txt'.
setHome(new)Set the home directory to a new location.
setId(new)Set the id of a corpus
setProperty(property, value)Set a corpus property.
write(filename = NULL)Write registry file to disk.
An appendix to the 'Corpus Encoding Tutorial' (http://cwb.sourceforge.net/files/CWB_Encoding_Tutorial.pdf) includes an explanation of the registry file format.