示例#1
0
 def __init__(self, lst_news, window_size=5):
     """Inits Graph
     Args:
         lst_news: list of string. list of news articles.
         windown_size: int. Size of the sliding window
     """
     # call the ___init__ of the parent class
     Graph.__init__(self, lst_news, window_size)
     self.edges = self.__clean_edges(self.edges) 
     self.edge_weights = self.__clean_weights(self.edge_weights)
示例#2
0
    def __init__(self, lst_news, window_size=5):
        """Inits Graph
        Args:
            lst_news: list of string. list of news articles.
            windown_size: int. Size of the sliding window
        """
        # call the ___init__ of the parent class
        Graph.__init__(self, lst_news, window_size)

        # excluding all contextual words, and new entities
        self.nodes = self.__clean_nodes(self.nodes)
        self.edges = self.__clean_edges(self.edges)
        self.edge_weights = self.__clean_weights(self.edge_weights)