nlp_architect.common.cdc package
Submodules
nlp_architect.common.cdc.cluster module
-
class
nlp_architect.common.cdc.cluster.Cluster(coref_chain: int = -1)[source] Bases:
object
-
class
nlp_architect.common.cdc.cluster.Clusters(topic_id: str, mentions: List[nlp_architect.common.cdc.mention_data.MentionData] = None)[source] Bases:
object-
cluster_coref_chain= 1000
-
nlp_architect.common.cdc.mention_data module
-
class
nlp_architect.common.cdc.mention_data.MentionData(topic_id: str, doc_id: str, sent_id: int, tokens_numbers: List[int], tokens_str: str, mention_context: List[str], mention_head: str, mention_head_lemma: str, coref_chain: str, mention_type: str = 'NA', is_continuous: bool = True, is_singleton: bool = False, score: float = -1.0, predicted_coref_chain: str = None, mention_pos: str = None, mention_ner: str = None, mention_index: int = -1)[source] Bases:
nlp_architect.common.cdc.mention_data.MentionDataLight-
static
read_json_mention_data_line(mention_line: str)[source] Parameters: mention_line – a Json representation of a single mention Returns: MentionData object
-
static
nlp_architect.common.cdc.topics module
-
class
nlp_architect.common.cdc.topics.Topics[source] Bases:
object-
create_from_file(mentions_file_path: str, keep_order: bool = False) → None[source] Parameters: - keep_order – whether to keep original mentions order or not (default = False)
- mentions_file_path – this topic mentions json file
-