call_scan: CWB-Scan interface for R

View source: R/cwb_scan_interface.R

call_scanR Documentation

CWB-Scan interface for R

Description

A convenience wrapper for scripting with cwb-scan. Creates data with cwb-scan-corpus. scan_import() additionally imports the entire directory with fread as data.table using fread() and rbindlist().

Usage

call_scan(dir_path = tempdir(), ...)

import_from_dir(dir_path, col_names)

scan_import(dir_path, parameters, col_names = names(parameters))

Arguments

dir_path

Name of directory to save results in

col_names

column names for the parameters. by default read from the names of the list provided in parameters

parameters

list of character vectors with corpora, p_attributes and s_attributes

Examples

## Not run: 
params <- list(
  corpus = c("BASE", "BROWN", "FROWN"),
  p_attr = c("word", "lemma"),
  s_attr = c("text_id")
)

full <- scan_import("data/", params)
full <- import_from_dir("data/", names(params))
call_scan("data/", params)

## End(Not run)

alex-raw/cwbwrapr documentation built on Oct. 23, 2022, 9:08 p.m.