View source: R/03_concept_network.R
fst_cn_edges | R Documentation |
This function takes a string of terms (separated by commas) or a single term and, using 'fst_cn_search()' find words connected to these searched terms. Then, a dataframe is returned of 'edges' between two words which are connected together in an frequently-occurring n-gram containing a concept term.
fst_cn_edges(
data,
concepts,
threshold = NULL,
norm = "number_words",
pos_filter = NULL
)
data |
A dataframe of text in CoNLL-U format, with optional additional columns. |
concepts |
List of terms to search for, separated by commas. |
threshold |
A minimum number of occurrences threshold for 'edge' between searched term and other word, default is 'NULL'. Note, the threshold is applied before normalisation. |
norm |
The method for normalising the data. Valid settings are '"number_words"' (the number of words in the responses), '"number_resp"' (the number of responses), or 'NULL' (raw count returned, default, also used when weights are applied). |
pos_filter |
List of UPOS tags for inclusion, default is 'NULL' to include all UPOS tags. |
Dataframe of co-occurrences between two connected words.
con <- "kiusata, lyöminen"
fst_cn_edges(fst_child, con, pos_filter = c("NOUN", "VERB", "ADJ", "ADV"))
fst_cn_edges(fst_child, con, pos_filter = 'VERB, NOUN')
fst_cn_edges(fst_child, "lyöminen", threshold = 2, norm = "number_resp")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.