textnets
textnets copied to clipboard
How do I get the term frequency and the number of co-occurrences of two terms?
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!
The answer isn't as straightforward as it should be. I'll try to add something like you suggested in the next release. Thanks!