colloc_sentmatch_tagged: Sentence match retriever with tagged collocations

Description Usage Arguments Details Value See Also Examples

View source: R/coll_sentmatch_tagged.R

Description

This is an expanded function for colloc_sentmatch to retrieve sentence matches in which a given collocate is found. The extended features in colloc_sentmatch_tagged (but not available in colloc_sentmatch) are:

  1. a tibble/data frame output format (similar to the colloc_df, which is one of the outputs of colloc_leipzig)

  2. tagging for the collocates (with "<c>...</c>" tag) and the nodes ("<n>...</n>") in the sentence matches

  3. a column called "coll_pattern" containing the collocate-node pattern extracted via regular expression on the basis of the tagging.

Usage

1
colloc_sentmatch_tagged(collout, colloc = NULL)

Arguments

collout

List output of colloc_leipzig.

colloc

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

Details

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

Value

A data frame with the following variables/columns:

See Also

colloc_sentmatch for untagged and character-vector version of the output, colloc_leipzig for collocate retrieval.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
# retrieve the collocate of "sudah" 'already'
collout <- colloc_leipzig(leipzig_corpus_list = demo_corpus_leipzig,
                          pattern = "sudah",
                          window = "b",
                          span = 2,
                          save_interim = FALSE)

# retrieve and tag the sentence match for "sudah" with its collocate "ada" 'exist'
df_sentmatch <- colloc_sentmatch_tagged(collout, colloc = "ada")

# check the tagging in the sentence match
df_sentmatch$sent_match_tagged

# check the extracted collocation pattern and the window span
df_sentmatch[, c("span", "coll_pattern")]

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