I would like to understand the practical differences of following cases:
- Use function
fcm(objectname # generate feature co-occurrence matrix
to calculate the absolute frequenies. Finally plot with functiontextplot_network()
. - I read tutorials like tidytextmining or a tutorial written by Andreas Niekler and Gregor Wiedemann who use igraph or widyr package. I want to plot correlated word pairs. Inspirated by tidytextmining tutorial which use the phi coefficient I will plot this correlation according the lambda coefficient.
I don't know how to plot the correlated word pairs with package quanteda.
My idea is (maybe is not an efficient way) to compute
textstat_collocations()
and transform it to a tibble object and plot it with the functions of the widyr package.
My open questions are:
How can I split column collocation into two separate columns like item1 item2 and
add select column lambda and save it and assign to a tibble object?
> head(sotu_collocations,1)
collocation count count_nested length lambda z
1 smart city 229 0 2 9.846542 51.78172
Like this? Remove the
select()
command if you prefer to keep all of the columns.