search_cde: Search the Corpus del Español (CDE)

Description Usage Arguments Value Examples

View source: R/search_cde.R

Description

Retrieve keyword-in-context results from the Corpus del Español.

Usage

1
2
search_cde(search_terms, section = "oral", max_type = 10,
  max_per_term = 100, max_total_result = 1000)

Arguments

search_terms

The search term or terms, as a vector of strings. Documentation about part-of-speech and wildcard tags is available on the CDE.

section

The section or sections of the CDE to search in, specified by a one-hundred-year period or periods, for example, section = "1900s" or section = c("1900s", "1800s"). Specific genres of the 1900s can be specified with "oral" for the oral section, "fict" for fiction, "news" for news, and "acad" for academic. Additionally, a combination of genres and/or one hundred year periods can be specified, for example, section = c("1200s", "1500s", "1800s") or section = c("news", "acad"). To search in all centuries, use section = "all".

max_type

An integer specifying the maximum number of unique word types to return for each search string (results shown in the upper right portion of the CDE). For example, searching for nouns with the search string "[n*]" could potentially return tens of thousands of unique types, but the user may only be interested in the 100 most frequent ones.

max_per_term

An integer specifying the maximum number of keyword-in-context (KWIC) results to return for each search string.

max_total_result

An integer specifying the maximum number of total results to return. If only one search term is given in search_terms, this argument should be equal to or greater than the integer specified in max_per_term.

Value

A data frame.

Examples

1
2
search_coca("mujer")
search_coca(c("[mujer]", "[hombre]"), section = c("oral", "acad"))

ekbrown/byucorpora documentation built on Oct. 24, 2019, 9:27 p.m.