Some steps for encoding corpora can be performed by calling CWB utilities from the command line, which requires an installation of the CWB, either as part of the CWB package, or using the default installation location of the CWB.
cwb_install(
url_cwb = cwb_get_url(),
md5 = attr(url_cwb, "md5"),
cwb_dir = fs::path(fs::path_temp(), "cwb"),
verbose = TRUE
)cwb_get_url()
cwb_get_bindir(bindir = Sys.getenv("CWB_BINDIR"))
cwb_is_installed()
URL for downloading the CWB.
The md5 checksum of the compressed file to be downloaded.
The directory where the CWB shall be installed.
A logical
value, whether to output messages.
The directory with CWB binaries.
The path of the CWB binaries or NULL
if downloading and installing
the CWB has failed.
cwb_get_url
will return the URL for downloading the
appropriate binary (Linux / macOS) of the Corpus Workbench, or the source
tarball (Linux). The md5 checksum of the file to be downloaded is part of
the return value as "md5" attribute.
cwb_get_bindir
will return the directory where the cwb
utility programs reside. If cwb_install()
has been used to install
the CWB, the function returns the directory within the cwbtools
package. Alternatively, a check for a local installation is performed.
cwb_is_installed
will check whether the CWB is installed.