cwb: Utilities to install Corpus Workbench.

cwb_installR Documentation

Utilities to install Corpus Workbench.

Description

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.

Usage

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()

Arguments

url_cwb

URL for downloading the CWB.

md5

The md5 checksum of the compressed file to be downloaded.

cwb_dir

The directory where the CWB shall be installed.

verbose

A logical value, whether to output messages.

bindir

The directory with CWB binaries.

Details

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.

Value

The path of the CWB binaries or NULL if downloading and installing the CWB has failed.


cwbtools documentation built on Nov. 27, 2023, 5:11 p.m.