def get_all_constituents(self): """ Get all named entities of the graph :return: A list of named entities """ return GraphWrapper.get_all_node_by_type( graph=self.graph, node_type=self.syntactic_node_type)
def get_all_words(self): """ Get all named entities of the graph :return: A list of named entities """ return GraphWrapper.get_all_node_by_type(graph=self.graph, node_type=self.word_node_type)
def get_all_coref_entities(self): """ Get all entities of the graph :return: A list of entities """ return GraphWrapper.get_all_node_by_type( graph=self.graph, node_type=self.entity_node_type)
def get_all_sentences(self): """ Get all the sentences of the graph. :return: A list of sentences. """ return GraphWrapper.get_all_node_by_type(graph=self.graph, node_type=self.root_type)
def get_all_named_entity(self): """Returns all named entities of the graph. """ new_entity = GraphWrapper.get_all_node_by_type( graph=self.graph, node_type=self.named_entity_node_type) return new_entity
def get_gold_mention_by_span(self, span): return [ gm for gm in GraphWrapper.get_all_node_by_type( graph=self.graph, node_type=self.gold_mention_node_type) if gm[SPAN] == span ]