colloc_sentmatch: Sentence match retriever

Description Usage Arguments Details Value See Also Examples

View source: R/coll_sentmatch.R

Description

The function extract full sentence-match for a (set of significant) collocate(s) for a given nodeword.

Usage

1
2
3
4
5
6
7
colloc_sentmatch(
  collout,
  colloc = NULL,
  wspan = NULL,
  nodeword = NULL,
  sampled = NULL
)

Arguments

collout

List output of colloc_leipzig.

colloc

Character vector of the collocate(s) whose sentence match(es) to be retrieved.

wspan

Character vector of the window span in which the collocates occur. Default to NULL, which will retrieve the collocate's occurrence in all span.

nodeword

Character vector specifying one of the nodewords if search parameter in colloc_leipzig includes more than one nodeword.

sampled

Integer vector indicating the number of random sample of the sentence match to be retrieve. Default to NULL, which will retrieve all sentence-matches.

Details

\Sexpr[results=rd, stage=render]{lifecycle::badge("experimental")}

Value

Character vector of sentence-match(es).

See Also

colloc_sentmatch_tagged for tagged and data frame version of the output.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
collout <- colloc_leipzig(leipzig_corpus_list = demo_corpus_leipzig,
                     pattern = "mengatakan",
                     window = "r",
                     span = 3,
                     save_interim = FALSE)

colloc_sentmatch(collout,
                 colloc = "bahwa",
                 sampled = 10)

# This will produce message indicating that
# the queried sample number is higher than
# the sentence match for "akan"
colloc_sentmatch(collout,
                 colloc = "akan",
                 sampled = 10)

gederajeg/collogetr documentation built on April 16, 2020, 11:58 a.m.