Beispiel #1
0
 def _add_token_to_cooccurrence_graph(self, G: nx.Graph, corpus: List[List[str]]) -> None:
     for tokens in corpus:
         pairs = self._get_cooccurred_token_pairs(tokens)
         G.add_edge_from(pairs)