Description Usage Arguments Details Value See Also Examples
View source: R/coll_sentmatch_tagged.R
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:
a tibble/data frame output format (similar to the colloc_df
, which is one of the outputs of colloc_leipzig
)
tagging for the collocates (with "<c>...</c>" tag
) and the nodes ("<n>...</n>"
) in the sentence matches
a column called "coll_pattern"
containing the collocate-node pattern extracted via regular expression on the basis of the tagging.
1 | colloc_sentmatch_tagged(collout, colloc = NULL)
|
collout |
List output of |
colloc |
Character vector of the collocate(s) whose sentence match(es) to be retrieved. |
A data frame with the following variables/columns:
corpus_names
- corpus file name
sent_id
- sentence number of the collocate matches
w
- the collocate whose full sentence match with the node is retrieved via the function
span
- the window-span of the collocate in relation to the node word
node
- the node word
sent_match_tagged
- tagged sentence matches for the collocate of interest with the node
coll_pattern
- extracted collocate-node pattern from the sentence matches
colloc_sentmatch
for untagged and character-vector version of the output, colloc_leipzig
for collocate retrieval.
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")]
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.