This function takes a string of terms (separated by commas) or a single term and, using `textrank_keywords()` from `textrank` package, filters data based on `pos_filter` ranks words which are the filtered for those connected to search terms.
Examples
con <- "kiusata, lyöminen"
cb <- fst_child
edges <- fst_cn_edges(cb, con, pos_filter = c("NOUN", "VERB", "ADJ", "ADV"))
edges2 <- fst_cn_edges(cb, con, pos_filter = 'NOUN, VERB, ADJ, ADV')
fst_cn_nodes(cb, edges, c("NOUN", "VERB", "ADJ", "ADV"))
#> lemma pagerank
#> 1 lyöminen 0.03726201
#> 2 töniminen 0.01468423
#> 3 potkiminen 0.01594663
fst_cn_nodes(cb, edges, 'NOUN, VERB, ADJ, ADV')
#> lemma pagerank
#> 1 lyöminen 0.03726201
#> 2 töniminen 0.01468423
#> 3 potkiminen 0.01594663