nlp_architect.models.cross_doc_coref.system package

Submodules

nlp_architect.models.cross_doc_coref.system.cdc_utils module

nlp_architect.models.cross_doc_coref.system.cdc_utils.extract_vocab(mentions: List[nlp_architect.common.cdc.mention_data.MentionData], filter_stop_words: bool) → List[str][source]

Extract Head, Lemma and mention string from all mentions to create a list of string vocabulary :param mentions: :param filter_stop_words:

Returns:

nlp_architect.models.cross_doc_coref.system.cdc_utils.load_mentions_vocab(mentions, filter_stop_words=False)[source]
nlp_architect.models.cross_doc_coref.system.cdc_utils.load_mentions_vocab_from_files(mentions_files, filter_stop_words=False)[source]
nlp_architect.models.cross_doc_coref.system.cdc_utils.write_clusters_to_file(clusters: nlp_architect.common.cdc.cluster.Clusters, topic_id: str, file_obj) → None[source]
Write the clusters to a text file (for experiments or evaluation using
coreference scorer (v8.01))
Parameters:
  • clusters – the cluster to write
  • topic_id
  • file_obj – file object
nlp_architect.models.cross_doc_coref.system.cdc_utils.write_entity_coref_scorer_results(topics_list: List[nlp_architect.common.cdc.topics.Topic], output_file: str) → None[source]
nlp_architect.models.cross_doc_coref.system.cdc_utils.write_event_coref_scorer_results(topics_list: List[nlp_architect.common.cdc.topics.Topic], output_file: str) → None[source]
nlp_architect.models.cross_doc_coref.system.cdc_utils.write_topics(topics_list: List[nlp_architect.common.cdc.topics.Topic], output) → None[source]

nlp_architect.models.cross_doc_coref.system.sieves_container_init module

class nlp_architect.models.cross_doc_coref.system.sieves_container_init.SievesContainerInitialization(event_coref_config: nlp_architect.models.cross_doc_coref.sieves_config.EventSievesConfiguration, entity_coref_config: nlp_architect.models.cross_doc_coref.sieves_config.EntitySievesConfiguration, sieves_model_list: List[nlp_architect.data.cdc_resources.relations.relation_extraction.RelationExtraction])[source]

Bases: object

get_module_from_relation(relation_type)[source]

Module contents