print_kwic: Print a concordance in KWIC format.

Description Usage Arguments Details Value Examples

Description

Print a concordance in KWIC format.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
print_kwic(x, 
           min_c_left = NA,
           max_c_left = NA,
           min_c_match = NA,
           max_c_match = NA,
           min_c_right = NA,
           max_c_right = NA,
           from = 1,
           n = 30,
           drop_tags = TRUE)

Arguments

x

a dataset

min_c_left

minimum size, expressed in number of characters, of the left co-text in the KWIC display.

max_c_left

maximum size, expressed in number of characters, of the left co-text in the KWIC display.

min_c_match

minimum size, expressed in number of characters, of the match in the KWIC display.

max_c_match

maximum size, expressed in number of characters, of the match in the KWIC display.

min_c_right

minimum size, expressed in number of characters, of the right co-text in the KWIC display.

max_c_right

maximum size, expressed in number of characters, of the right co-text in the KWIC display.

from

index of first item in x that is to be displayed.

n

number of consecutive items in x that are to be displayed.

drop_tags

boolean: hide tags in data?

Details

This procedure assumes that x is either an object of the class conc or any other data frame that contains textual data in three columns named left, match, and right.

Value

Invisibly returns x.

Examples

1
2
(conc_data <- conc_re('\\w+', 'A very small corpus.', as_text = TRUE))
print_kwic(conc_data)

wai-wong-reimagine/mclm documentation built on May 16, 2019, 9:12 p.m.