search_bnc: Search the British National Corpus (BNC)

Description Usage Arguments Value Examples

View source: R/search_bnc.R

Description

Retrieve keyword-in-context results from the BNC.

Usage

1
2
search_bnc(search_terms, section = "spok", max_type = 10,
  max_per_term = 100, max_total_result = 1000)

Arguments

search_terms

The search term or terms, as a vector of strings.

section

The section of the BNC to search in, from among "all" for all sections, "spok" for the spoken section (the default), "fict" for fiction, "mag" for magazine, "news" for newspaper, "non-acad" for non-academic, "acad" for academic, and "misc" for miscellaneous.

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 web interface). 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
3
search_bnc("cheers")
search_bnc("cheers", section = "spok")
search_bnc(c("cheers", "bye"), section = "spok", max_per_term = 500)

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