fst_cn_nodes {finnsurveytext} | R Documentation |
Concept Network - Get TextRank nodes
Description
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.
Usage
fst_cn_nodes(data, edges, pos_filter = NULL)
Arguments
data |
A dataframe of text in CoNLL-U format, with optional additional columns. |
edges |
Output of 'fst_cn_edges()', dataframe of co-occurrences between two words. |
pos_filter |
List of UPOS tags for inclusion, default is 'NULL' to include all UPOS tags. |
Value
A dataframe containing relevant lemmas and their associated pagerank.
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"))
fst_cn_nodes(cb, edges, 'NOUN, VERB, ADJ, ADV')
[Package finnsurveytext version 2.1.1 Index]