cqp_initialize: Initialize Corpus Query Processor (CQP).

View source: R/cqp.R

cqp_initializeR Documentation

Initialize Corpus Query Processor (CQP).

Description

CQP needs to know where to look for CWB indexed corpora. To initialize CQP, call cqp_initialize. To reset the registry, use the function cqp_reset_registry. To get the registry used by CQP, use cqp_get_registry. To get the initialization status, use cqp_is_initialized

Usage

cqp_initialize(registry = Sys.getenv("CORPUS_REGISTRY"))

cqp_is_initialized()

cqp_verbosity(silent, verbose)

cqp_get_registry()

cqp_reset_registry(registry = Sys.getenv("CORPUS_REGISTRY"))

cqp_load_corpus(corpus, registry)

Arguments

registry

the registry directory

silent

A single logical value, whether to be silent and suppress CQP messages (TRUE), or not (FALSE).

verbose

A single logical value, whether to show verbose parser output (TRUE) or not (FALSE).

corpus

ID of a CWB corpus (length-one character).

Details

cqp_load_corpus will return a logical value - TRUE if corpus has been loaded successfully, FALSE if not.

Author(s)

Andreas Blaette, Bernard Desgraupes, Sylvain Loiseau

Examples

cqp_is_initialized() # check initialization status
if (!cqp_is_initialized()) cqp_initialize()
cqp_is_initialized() # check initialization status (TRUE now?)
cqp_get_registry() # get registry dir used by CQP
cqp_list_corpora() # get list of corpora

RcppCWB documentation built on Sept. 24, 2024, 1:08 a.m.