cqp_initialize: Initialize Corpus Query Processor (CQP).

Description Usage Arguments Author(s) Examples

View source: R/cqp.R

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

1
2
3
4
5
6
7
cqp_initialize(registry = Sys.getenv("CORPUS_REGISTRY"))

cqp_is_initialized()

cqp_get_registry()

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

Arguments

registry

the registry directory

Author(s)

Andreas Blaette, Bernard Desgraupes, Sylvain Loiseau

Examples

1
2
3
4
5
6
7
8
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

registry <- if (!check_pkg_registry_files()) use_tmp_registry() else get_pkg_registry()
if (cqp_get_registry() != registry) cqp_reset_registry(registry = registry)
cqp_list_corpora() # get list of corpora

RcppCWB documentation built on Oct. 22, 2018, 5:08 p.m.