textnets icon indicating copy to clipboard operation
textnets copied to clipboard

How do I get the term frequency and the number of co-occurrences of two terms?

Open clark874 opened this issue 2 years ago • 1 comments

Hi John, another question for you:)

In my study, I tried to use one-mode graphs of terms to demonstrate that some terms are more important than others. I processed the graphml file exported by textnets through networkx. I can get the degree of the node and the value of the weight of the edge. According to the documentation, the latter is obtained by tf-idf calculation and is a floating point value.

My question is: Is there a way to get the term frequency of a term in all the documents and the absolute value of the number of co-occurrences of two terms in all the corpus? Both values should be an integer, is it possible to add these value as a COUNT attribute to the node and edge attributes?

Thanks again for your work!

clark874 avatar Jul 19 '22 13:07 clark874

The answer isn't as straightforward as it should be. I'll try to add something like you suggested in the next release. Thanks!

jboynyc avatar Aug 18 '22 14:08 jboynyc