Description Usage Arguments Details Value Examples
A utility function to reset the environment variable CORPUS_REGISTRY. That may be necessary if you want use a CWB corpus that is not stored in the usual place. In particular, resetting the environment variable is required if you want to use a corpus delivered in a R package,
1 2 3 4 5 6 7 | resetRegistry(registryDir = NULL)
readRegistry(corpus)
parseRegistry(corpus)
parseInfoFile(corpus)
|
registryDir |
path to the registry directory to be used |
corpus |
the CWB name of the corpus |
Resetting the CORPUS_REGISTRY environment variable is achieved by unloading and reloading the C library 'rcqp' that is the backend for the rcqp package. It may not be the most artful way to do things, but it works.
To get the path to a package that contains a CWB corpus, use
system.file
.
the registry directory used before resetting CORPUS_REGISTRY
1 2 3 4 5 6 7 8 | ## Not run:
sampleCorpusPkgDir <- system.file(package="polmineR.sampleCorpus")
sampleCorpusRegistryDir <- file.path(sampleCorpusPkgDir, "extdata", "cwb", "registry")
oldRegistryDir <- resetRegistry(sampleCorpusRegistryDir)
sampleCorpusPartition <- partition("PLPRBTTXT", def=list(text_id=".*"), method="grep", verbose=F)
resetRegistry(oldRegistryDir)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.