diff --git a/querent/callback/event_callback_dispatcher.py b/querent/callback/event_callback_dispatcher.py index b22992f4..663cb38c 100644 --- a/querent/callback/event_callback_dispatcher.py +++ b/querent/callback/event_callback_dispatcher.py @@ -32,7 +32,7 @@ async def dispatch_event(self, event_type: EventType, event_data: EventState): event_data (Any): Data associated with the event. """ for callback in self.callbacks[event_type]: - callback.handle_event(event_type, event_data) + await callback.handle_event(event_type, event_data) def register_webhook(self, event_type: EventType, webhook: str): """ diff --git a/querent/collectors/drive/google_drive_collector.py b/querent/collectors/drive/google_drive_collector.py index bb414d4d..a6cd4e72 100644 --- a/querent/collectors/drive/google_drive_collector.py +++ b/querent/collectors/drive/google_drive_collector.py @@ -134,7 +134,6 @@ async def walk_files(self, root: Path) -> AsyncGenerator[Path, None]: item_split = set(str(item).split("/")) item_split.remove("") if item_split.intersection(self.items_to_ignore): - print(item_split, "\n\n", self.items_to_ignore) continue if item.is_file(): yield item diff --git a/querent/common/types/querent_event.py b/querent/common/types/querent_event.py index 9b41954c..91210311 100644 --- a/querent/common/types/querent_event.py +++ b/querent/common/types/querent_event.py @@ -1,34 +1,12 @@ -from typing import Any, Literal +from typing import Any class EventType: - """ - Custom type for representing event types in the querent system. - - Attributes: - TOKEN_PROCESSED (Literal["token_processed"]): Event type for token processing completion. - CHAT_COMPLETED (Literal["chat_completed"]): Event type for chat completion. - """ - - ContextualTriples = "ContextualTriples" - RdfContextualTriples = "RdfContextualTriples" - RdfSemanticTriples = "RdfSemanticTriples" - ContextualEmbeddings = "ContextualEmbeddings" Graph = "Graph" Vector = "Vector" class EventState: - """ - Custom type for base class implementors to tie into the event system. - EventState has a event_type, a timestamp, and a payload. - - Attributes: - event_type (EventType): The type of event. - timestamp (float): The timestamp of the event. - payload (Any): The payload of the event. - """ - def __init__(self, event_type: EventType, timestamp: float, payload: Any, file: str): self.event_type = event_type self.timestamp = timestamp diff --git a/querent/config/core/bert_llm_config.py b/querent/config/core/bert_llm_config.py index 4ff28a43..e9899bc0 100644 --- a/querent/config/core/bert_llm_config.py +++ b/querent/config/core/bert_llm_config.py @@ -19,7 +19,7 @@ class BERTLLMConfig(BaseModel): sample_entities: List[str] = Field(default_factory=list, description="List of sample entities") fixed_entities: List[str] = Field(default_factory=list, description="List of fixed entities") - fixed_relationships: List[Dict[str, Any]] = Field(default_factory=list, description="List of fixed relationships represented as dictionaries") - sample_relationships: List[Dict[str, Any]] = Field(default_factory=list, description="List of sample relationships represented as dictionaries") + fixed_relationships: List[str] = Field(default_factory=list, description="List of fixed relationships") + sample_relationships: List[str] = Field(default_factory=list, description="List of sample relationships") user_context: Dict[str, Any] = Field(default_factory=dict, description="User-specific context information") diff --git a/querent/core/base_engine.py b/querent/core/base_engine.py index f4eb3f5f..95e32d66 100644 --- a/querent/core/base_engine.py +++ b/querent/core/base_engine.py @@ -127,18 +127,6 @@ async def process_images(self, data: IngestedImages): """ raise NotImplementedError - @abstractmethod - async def process_images(self, data: IngestedImages): - """ - Process images asynchronously. - Args: - data (IngestedImages): The input data to process. - Returns: - EventState: The state of the event is set with the event type and the timestamp - of the event and set using `self.set_state(event_state)`. - """ - raise NotImplementedError - @abstractmethod def validate(self) -> bool: """ diff --git a/querent/core/transformers/bert_llm.py b/querent/core/transformers/bert_llm.py index aaad9967..51e97431 100644 --- a/querent/core/transformers/bert_llm.py +++ b/querent/core/transformers/bert_llm.py @@ -1,4 +1,5 @@ from transformers import AutoTokenizer +from querent.kg.ner_helperfunctions.fixed_predicate import FixedPredicateExtractor from querent.common.types.ingested_images import IngestedImages from querent.config.core.relation_config import RelationshipExtractorConfig from querent.core.transformers.relationship_extraction_llm import RelationExtractor @@ -25,44 +26,6 @@ from querent.config.core.bert_llm_config import BERTLLMConfig from querent.kg.rel_helperfunctions.triple_to_json import TripleToJsonConverter - - - -""" - BERT-based Named Entity Recognition (NER) and Linking Language Model (LLM) for extracting entities and relationships from text. - - Inherits from: - BaseEngine: Base class for processing engines. - - Attributes: - graph_config (GraphConfig): Configuration for the graph. - logger (Logger): Logger instance for logging errors and information. - file_buffer (FileBuffer): Buffer for storing files. - ner_tokenizer (AutoTokenizer): Tokenizer for the NER model. - ner_model (Model): Pre-trained NER model. - ner_llm_instance (NER_LLM): Instance of the NER_LLM class. - attn_scores_instance (EntityAttentionExtractor): Instance for extracting attention scores. - entity_embedding_extractor (EntityEmbeddingExtractor, optional): Instance for extracting entity embeddings. - triple_filter_instance (EntityTripleFilter - - Methods: - validate() -> bool: - Validates if the NER model and tokenizer are initialized. - - process_messages(data: IngestedMessages): - Processes the ingested messages. - - process_code(data: IngestedCode): - Processes the ingested code. - - validate_ingested_tokens(data: IngestedTokens) -> bool: - Validates the ingested tokens. - - process_tokens(data: IngestedTokens): - Processes the ingested tokens, extracts entities, and builds the knowledge graph. - """ - - class BERTLLM(BaseEngine): def __init__( self, @@ -88,13 +51,25 @@ def __init__( self.triple_filter = TripleFilter(**self.filter_params) self.sample_entities = config.sample_entities self.fixed_entities = config.fixed_entities + if self.fixed_entities and not self.sample_entities: + raise ValueError("If specific entities are provided, their types should also be provided.") + if self.fixed_entities and self.sample_entities: + self.entity_context_extractor = FixedEntityExtractor(fixed_entities=self.fixed_entities, entity_types=self.sample_entities) + elif self.sample_entities: + self.entity_context_extractor = FixedEntityExtractor(entity_types=self.sample_entities) + else: + self.entity_context_extractor = None self.fixed_relationships = config.fixed_relationships self.sample_relationships = config.sample_relationships - self.user_context = config.user_context - if config.fixed_entities: - self.entity_context_extractor = FixedEntityExtractor(config.fixed_entities) + if self.fixed_relationships and not self.sample_relationships: + raise ValueError("If specific predicates are provided, their types should also be provided.") + if self.fixed_relationships and self.sample_relationships: + self.predicate_context_extractor = FixedPredicateExtractor(fixed_predicates=self.fixed_relationships, predicate_types=self.sample_relationships) + elif self.sample_relationships: + self.predicate_context_extractor = FixedPredicateExtractor(predicate_types=self.sample_relationships) else: - self.entity_context_extractor = None + self.predicate_context_extractor = None + self.user_context = config.user_context def validate(self) -> bool: @@ -143,36 +118,40 @@ async def process_tokens(self, data: IngestedTokens): file, content = self.file_buffer.add_chunk( data.get_file_path(), data.data ) + print("--------------------------------", content) if content: - if self.entity_context_extractor: + if self.fixed_entities: content = self.entity_context_extractor.find_entity_sentences(content) + print("--------------------------------", content) + if self.fixed_relationships: + content = self.predicate_context_extractor.find_predicate_sentences(content) + print("--------------------------------", content) tokens = self.ner_llm_instance._tokenize_and_chunk(content) + print("tokens: ", tokens) for tokenized_sentence, original_sentence, sentence_idx in tokens: - ( - entities, - entity_pairs, - ) = self.ner_llm_instance.extract_entities_from_sentence( - original_sentence, sentence_idx, [s[1] for s in tokens] - ) - doc_entity_pairs.append( - self.ner_llm_instance.transform_entity_pairs(entity_pairs) - ) + (entities, entity_pairs,) = self.ner_llm_instance.extract_entities_from_sentence(original_sentence, sentence_idx, [s[1] for s in tokens],False, ['']) + print("entity pairs", entity_pairs) + if entity_pairs: + doc_entity_pairs.append(self.ner_llm_instance.transform_entity_pairs(entity_pairs)) number_sentences = number_sentences + 1 - - - else: if not BERTLLM.validate_ingested_tokens(data): self.set_termination_event() + print("doc entities-----------------------", doc_entity_pairs) + if self.sample_entities: + doc_entity_pairs = self.entity_context_extractor.process_entity_types(doc_entities=doc_entity_pairs) + print("doc entities---------------------", doc_entity_pairs) if doc_entity_pairs: pairs_withattn = self.attn_scores_instance.extract_and_append_attention_weights(doc_entity_pairs) + print("-----------",pairs_withattn) if self.count_entity_pairs(pairs_withattn)>1: self.entity_embedding_extractor = EntityEmbeddingExtractor(self.ner_model, self.ner_tokenizer, self.count_entity_pairs(pairs_withattn), number_sentences=number_sentences) else : self.entity_embedding_extractor = EntityEmbeddingExtractor(self.ner_model, self.ner_tokenizer, 2, number_sentences=number_sentences) pairs_withemb = self.entity_embedding_extractor.extract_and_append_entity_embeddings(pairs_withattn) + print("-----------",pairs_withemb) pairs_with_predicates = process_data(pairs_withemb, file) - if self.enable_filtering == True: + if self.enable_filtering == True and not self.entity_context_extractor: cluster_output = self.triple_filter.cluster_triples(pairs_with_predicates) clustered_triples = cluster_output['filtered_triples'] cluster_labels = cluster_output['cluster_labels'] @@ -189,8 +168,12 @@ async def process_tokens(self, data: IngestedTokens): semantic_extractor = RelationExtractor(mock_config) relationships = semantic_extractor.process_tokens(filtered_triples) embedding_triples = semantic_extractor.generate_embeddings(relationships) + print("-------------------------------- embedding triples: {}".format(embedding_triples)) + if self.sample_relationships: + embedding_triples = self.predicate_context_extractor.process_predicate_types(embedding_triples) for triple in embedding_triples: graph_json = TripleToJsonConverter.convert_graphjson(triple) + print("-------------------------------- Graph : {}".format(graph_json)) if graph_json: current_state = EventState(EventType.Graph,1.0, graph_json, file) await self.set_state(new_state=current_state) diff --git a/querent/core/transformers/relationship_extraction_llm.py b/querent/core/transformers/relationship_extraction_llm.py index 282f3349..e53d0346 100644 --- a/querent/core/transformers/relationship_extraction_llm.py +++ b/querent/core/transformers/relationship_extraction_llm.py @@ -209,6 +209,7 @@ def extract_relationships(self, triples): sub_task_list_llm = self.bsmbranch.create_sub_tasks(llm = self.qa_system.llm, template=self.config.get_template("default"), tasks=all_tasks,model_type=self.qa_system.rel_model_type) for task in sub_task_list_llm: answer_relation = self.qa_system.ask_question(prompt=task[2], top_docs=documents, llm_chain=task[0]) + print("answersssssss", answer_relation) try: updated_triple= self.create_semantic_triple(answer_relation, predicate_str) updated_triples.append(updated_triple) diff --git a/querent/kg/ner_helperfunctions/fixed_entities.py b/querent/kg/ner_helperfunctions/fixed_entities.py index 406426fa..9e98547d 100644 --- a/querent/kg/ner_helperfunctions/fixed_entities.py +++ b/querent/kg/ner_helperfunctions/fixed_entities.py @@ -1,65 +1,131 @@ import spacy import re from typing import List -""" - A class for extracting sentences from a text that contain specified fixed entities. - - This class utilizes regular expressions and spaCy's NLP capabilities to identify and - extract sentences from a given text which include any of the user-specified entities. - It is useful in scenarios where focus is required on specific entities within large - volumes of text. - - Attributes: - nlp (spacy.Language): An instance of spaCy's language model. - fixed_entities (List[str]): A list of entities (as strings) to search for in the text. - entity_patterns (List[re.Pattern]): Compiled regex patterns for the fixed entities, - enabling case-insensitive searching. - - Methods: - find_entity_sentences(text: str) -> str: - Identifies and returns sentences from the provided text that contain any of the - fixed entities. - - measure_reduction(original_text: str, reduced_text: str) -> float: - Calculates the percentage reduction in text length after extracting relevant sentences. - - """ class FixedEntityExtractor: - def __init__(self, fixed_entities: List[str], model="en_core_web_lg"): + def __init__(self, fixed_entities: List[str] = None, entity_types: List[str] = None, model="en_core_web_lg"): self.nlp = spacy.load(model) + self.entity_types = entity_types self.fixed_entities = fixed_entities - self.entity_pattern = self.create_combined_pattern(fixed_entities) + + if fixed_entities: + self.entity_pattern = self.create_combined_pattern(fixed_entities) + self.lemmatized_entities = set(self.lemmatize_entities(fixed_entities)) + def create_combined_pattern(self, entities): combined_pattern = '|'.join(map(re.escape, entities)) return re.compile(r'\b(?:' + combined_pattern + r')\b', re.IGNORECASE) + def lemmatize_entities(self, entities): + return [self.nlp(entity)[0].lemma_ for entity in entities] + def find_entity_sentences(self, text: str, chunk_size=1000) -> str: doc = self.nlp(text) - relevant_sentences = set() + + relevant_sentences = [] + added_sentences = set() prev_sentence = None + for j, sentence in enumerate(doc.sents): + if self.is_entity_present(sentence): + print("--------------------------------", sentence) + self.add_contextual_sentences(list(doc.sents), j, prev_sentence, relevant_sentences, added_sentences) - for i in range(0, len(doc), chunk_size): - chunk = doc[i:i+chunk_size] - sentences = list(chunk.sents) + prev_sentence = sentence - for j, sentence in enumerate(sentences): - sentence_text = sentence.text - if self.entity_pattern.search(sentence_text): - # Add the previous, current, and next sentences - if prev_sentence: - relevant_sentences.add(prev_sentence.text) - relevant_sentences.add(sentence_text) - if j < len(sentences) - 1: # Check if there is a next sentence - relevant_sentences.add(sentences[j + 1].text) + return ' '.join(relevant_sentences) - prev_sentence = sentence + def is_entity_present(self, sentence): + sentence_text = sentence.text + sentence_lemmas = {token.lemma_ for token in sentence} + return self.fixed_entities and (self.entity_pattern.search(sentence_text) or sentence_lemmas.intersection(self.lemmatized_entities)) - return ' '.join(sorted(relevant_sentences)) + def add_contextual_sentences(self, sentences, current_index, prev_sentence, relevant_sentences, added_sentences): + if prev_sentence and prev_sentence.text not in added_sentences: + relevant_sentences.append(prev_sentence.text) + added_sentences.add(prev_sentence.text) + + current_sentence = sentences[current_index] + if current_sentence.text not in added_sentences: + relevant_sentences.append(current_sentence.text) + added_sentences.add(current_sentence.text) + + if current_index < len(sentences) - 1: + next_sentence = sentences[current_index + 1] + if next_sentence.text not in added_sentences: + relevant_sentences.append(next_sentence.text) + added_sentences.add(next_sentence.text) def measure_reduction(self, original_text: str, reduced_text: str) -> float: original_length = len(original_text) reduced_length = len(reduced_text) reduction_percentage = ((original_length - reduced_length) / original_length) * 100 return reduction_percentage + + def process_entity_types(self, doc_entities): + filtered_entities = [] + for entity_group in doc_entities: + for entity_data in entity_group: + entity1, sentence, entity2, entity_info = entity_data + entity1_labels = entity_info['entity1_label'].split(', ') + entity2_labels = entity_info['entity2_label'].split(', ') + entity1_nn_chunk = entity_info['entity1_nn_chunk'] + entity2_nn_chunk = entity_info['entity2_nn_chunk'] + + if self.fixed_entities: + entity1_match = any(entity in entity1_nn_chunk for entity in self.fixed_entities) and any(label in self.entity_types for label in entity1_labels) + entity2_match = any(entity in entity2_nn_chunk for entity in self.fixed_entities) and any(label in self.entity_types for label in entity2_labels) + else: + entity1_match = any(label in self.entity_types for label in entity1_labels) + entity2_match = any(label in self.entity_types for label in entity2_labels) + + if entity1_match or entity2_match: + filtered_entities.append(entity_data) + + return [filtered_entities] + + + +def main(): + # Sample text for testing + text = """In this study, we present evidence of a Paleocene–Eocene Thermal Maximum (PETM) +record within a 543-m-thick (1780 ft) deep-marine section in the Gulf of Mexico (GoM) +using organic carbon stable isotopes and biostratigraphic constraints. We suggest that +climate and tectonic perturbations in the upstream North American catchments can induce +a substantial response in the downstream sectors of the Gulf Coastal Plain and ultimately +in the GoM. This relationship is illustrated in the deep-water basin by (1) a high accom- +modation and deposition of a shale interval when coarse-grained terrigenous material +was trapped upstream at the onset of the PETM, and (2) a considerable increase in sedi- +ment supply during the PETM, which is archived as a particularly thick sedimentary +section in the deep-sea fans of the GoM basin. The Paleocene–Eocene Thermal Maximum (PETM) (ca. 56 Ma) was a rapid global warming event characterized by the rise of temperatures to5–9 °C (Kennett and Stott, 1991), which caused substantial environmental changes around the globe.""" # Insert your text here + + + # Scenario 1: Extract sentences with specific entities + specific_entities = ['globe'] + + + # Scenario 2: Extract sentences based on entity types + entity_types = ['PERSON'] # ORG for organizations + extractor_types = FixedEntityExtractor(entity_types=entity_types) + print("\nEntity Types Extraction:") + print(extractor_types.find_entity_sentences(text)) + + # Scenario 2: Extract sentences based on entity types + entity_types = ['ORG'] # ORG for organizations + extractor_types = FixedEntityExtractor(entity_types=entity_types) + print("\nEntity Types Extraction:") + print(extractor_types.find_entity_sentences(text)) + + # Scenario 3: Both specific entities and types provided + extractor_both = FixedEntityExtractor(fixed_entities=specific_entities, entity_types=entity_types) + print("\nBoth Entities and Types Extraction:") + print(extractor_both.find_entity_sentences(text)) + + extractor = FixedEntityExtractor(entity_types=['B-GeoTime']) + doc_entities = [[('eocene', 'In this study, we present evidence of a Paleocene–Eocene Thermal Maximum (PETM) record within a 543-m-thick (1780 ft) deep-marine section in the Gulf of Mexico (GoM) using organic carbon stable isotopes and biostratigraphic constraints. We suggest that climate and tectonic perturbations in the upstream North American catchments can induce a substantial response in the downstream sectors of the Gulf Coastal Plain and ultimately in the GoM.', 'ft', {'entity1_score': 1.0, 'entity2_score': 0.69, 'entity1_label': 'B-GeoMeth, B-GeoTime', 'entity2_label': 'B-GeoMeth', 'entity1_nn_chunk': 'a Paleocene–Eocene Thermal Maximum (PETM) record', 'entity2_nn_chunk': 'a 543-m-thick (1780 ft) deep-marine section'}), ('eocene', 'In this study, we present evidence of a Paleocene–Eocene Thermal Maximum (PETM) record within a 543-m-thick (1780 ft) deep-marine section in the Gulf of Mexico (GoM) using organic carbon stable isotopes and biostratigraphic constraints. We suggest that climate and tectonic perturbations in the upstream North American catchments can induce a substantial response in the downstream sectors of the Gulf Coastal Plain and ultimately in the GoM.', 'mexico', {'entity1_score': 1.0, 'entity2_score': 0.92, 'entity1_label': 'B-GeoMeth, B-GeoTime', 'entity2_label': 'B-GeoLoc', 'entity1_nn_chunk': 'a Paleocene–Eocene Thermal Maximum (PETM) record', 'entity2_nn_chunk': 'Mexico'}), ('eocene', 'In this study, we present evidence of a Paleocene–Eocene Thermal Maximum (PETM) record within a 543-m-thick (1780 ft) deep-marine section in the Gulf of Mexico (GoM) using organic carbon stable isotopes and biostratigraphic constraints. We suggest that climate and tectonic perturbations in the upstream North American catchments can induce a substantial response in the downstream sectors of the Gulf Coastal Plain and ultimately in the GoM.', 'organic', {'entity1_score': 1.0, 'entity2_score': 0.98, 'entity1_label': 'B-GeoMeth, B-GeoTime', 'entity2_label': 'B-GeoMeth, B-GeoPetro', 'entity1_nn_chunk': 'a Paleocene–Eocene Thermal Maximum (PETM) record', 'entity2_nn_chunk': 'organic carbon stable isotopes'}), ('ft', 'In this study, we present evidence of a Paleocene–Eocene Thermal Maximum (PETM) record within a 543-m-thick (1780 ft) deep-marine section in the Gulf of Mexico (GoM) using organic carbon stable isotopes and biostratigraphic constraints. We suggest that climate and tectonic perturbations in the upstream North American catchments can induce a substantial response in the downstream sectors of the Gulf Coastal Plain and ultimately in the GoM.', 'mexico', {'entity1_score': 0.69, 'entity2_score': 0.92, 'entity1_label': 'B-GeoMeth', 'entity2_label': 'B-GeoLoc', 'entity1_nn_chunk': 'a 543-m-thick (1780 ft) deep-marine section', 'entity2_nn_chunk': 'Mexico'}), ('ft', 'In this study, we present evidence of a Paleocene–Eocene Thermal Maximum (PETM) record within a 543-m-thick (1780 ft) deep-marine section in the Gulf of Mexico (GoM) using organic carbon stable isotopes and biostratigraphic constraints. We suggest that climate and tectonic perturbations in the upstream North American catchments can induce a substantial response in the downstream sectors of the Gulf Coastal Plain and ultimately in the GoM.', 'organic', {'entity1_score': 0.69, 'entity2_score': 0.98, 'entity1_label': 'B-GeoMeth', 'entity2_label': 'B-GeoMeth, B-GeoPetro', 'entity1_nn_chunk': 'a 543-m-thick (1780 ft) deep-marine section', 'entity2_nn_chunk': 'organic carbon stable isotopes'}), ('mexico', 'In this study, we present evidence of a Paleocene–Eocene Thermal Maximum (PETM) record within a 543-m-thick (1780 ft) deep-marine section in the Gulf of Mexico (GoM) using organic carbon stable isotopes and biostratigraphic constraints. We suggest that climate and tectonic perturbations in the upstream North American catchments can induce a substantial response in the downstream sectors of the Gulf Coastal Plain and ultimately in the GoM.', 'organic', {'entity1_score': 0.92, 'entity2_score': 0.98, 'entity1_label': 'B-GeoLoc', 'entity2_label': 'B-GeoMeth, B-GeoPetro', 'entity1_nn_chunk': 'Mexico', 'entity2_nn_chunk': 'organic carbon stable isotopes'})], [('tectonic', 'In this study, we present evidence of a Paleocene–Eocene Thermal Maximum (PETM) record within a 543-m-thick (1780 ft) deep-marine section in the Gulf of Mexico (GoM) using organic carbon stable isotopes and biostratigraphic constraints. We suggest that climate and tectonic perturbations in the upstream North American catchments can induce a substantial response in the downstream sectors of the Gulf Coastal Plain and ultimately in the GoM. This relationship is illustrated in the deep-water basin by (1) a high accom- modation and deposition of a shale interval when coarse-grained terrigenous material was trapped upstream at the onset of the PETM, and (2) a considerable increase in sedi- ment supply during the PETM, which is archived as a particularly thick sedimentary section in the deep-sea fans of the GoM basin.', 'upstream', {'entity1_score': 1.0, 'entity2_score': 1.0, 'entity1_label': 'B-GeoPetro', 'entity2_label': 'B-GeoMeth', 'entity1_nn_chunk': 'tectonic perturbations', 'entity2_nn_chunk': 'the upstream North American catchments'}), ('tectonic', 'In this study, we present evidence of a Paleocene–Eocene Thermal Maximum (PETM) record within a 543-m-thick (1780 ft) deep-marine section in the Gulf of Mexico (GoM) using organic carbon stable isotopes and biostratigraphic constraints. We suggest that climate and tectonic perturbations in the upstream North American catchments can induce a substantial response in the downstream sectors of the Gulf Coastal Plain and ultimately in the GoM. This relationship is illustrated in the deep-water basin by (1) a high accom- modation and deposition of a shale interval when coarse-grained terrigenous material was trapped upstream at the onset of the PETM, and (2) a considerable increase in sedi- ment supply during the PETM, which is archived as a particularly thick sedimentary section in the deep-sea fans of the GoM basin.', 'downstream', {'entity1_score': 1.0, 'entity2_score': 1.0, 'entity1_label': 'B-GeoPetro', 'entity2_label': 'B-GeoPetro', 'entity1_nn_chunk': 'tectonic perturbations', 'entity2_nn_chunk': 'the downstream sectors'}), ('tectonic', 'In this study, we present evidence of a Paleocene–Eocene Thermal Maximum (PETM) record within a 543-m-thick (1780 ft) deep-marine section in the Gulf of Mexico (GoM) using organic carbon stable isotopes and biostratigraphic constraints. We suggest that climate and tectonic perturbations in the upstream North American catchments can induce a substantial response in the downstream sectors of the Gulf Coastal Plain and ultimately in the GoM. This relationship is illustrated in the deep-water basin by (1) a high accom- modation and deposition of a shale interval when coarse-grained terrigenous material was trapped upstream at the onset of the PETM, and (2) a considerable increase in sedi- ment supply during the PETM, which is archived as a particularly thick sedimentary section in the deep-sea fans of the GoM basin.', 'coastal', {'entity1_score': 1.0, 'entity2_score': 0.98, 'entity1_label': 'B-GeoPetro', 'entity2_label': 'B-GeoPetro', 'entity1_nn_chunk': 'tectonic perturbations', 'entity2_nn_chunk': 'the Gulf Coastal Plain'}), ('upstream', 'In this study, we present evidence of a Paleocene–Eocene Thermal Maximum (PETM) record within a 543-m-thick (1780 ft) deep-marine section in the Gulf of Mexico (GoM) using organic carbon stable isotopes and biostratigraphic constraints. We suggest that climate and tectonic perturbations in the upstream North American catchments can induce a substantial response in the downstream sectors of the Gulf Coastal Plain and ultimately in the GoM. This relationship is illustrated in the deep-water basin by (1) a high accom- modation and deposition of a shale interval when coarse-grained terrigenous material was trapped upstream at the onset of the PETM, and (2) a considerable increase in sedi- ment supply during the PETM, which is archived as a particularly thick sedimentary section in the deep-sea fans of the GoM basin.', 'downstream', {'entity1_score': 1.0, 'entity2_score': 1.0, 'entity1_label': 'B-GeoMeth', 'entity2_label': 'B-GeoPetro', 'entity1_nn_chunk': 'the upstream North American catchments', 'entity2_nn_chunk': 'the downstream sectors'}), ('upstream', 'In this study, we present evidence of a Paleocene–Eocene Thermal Maximum (PETM) record within a 543-m-thick (1780 ft) deep-marine section in the Gulf of Mexico (GoM) using organic carbon stable isotopes and biostratigraphic constraints. We suggest that climate and tectonic perturbations in the upstream North American catchments can induce a substantial response in the downstream sectors of the Gulf Coastal Plain and ultimately in the GoM. This relationship is illustrated in the deep-water basin by (1) a high accom- modation and deposition of a shale interval when coarse-grained terrigenous material was trapped upstream at the onset of the PETM, and (2) a considerable increase in sedi- ment supply during the PETM, which is archived as a particularly thick sedimentary section in the deep-sea fans of the GoM basin.', 'coastal', {'entity1_score': 1.0, 'entity2_score': 0.98, 'entity1_label': 'B-GeoMeth', 'entity2_label': 'B-GeoPetro', 'entity1_nn_chunk': 'the upstream North American catchments', 'entity2_nn_chunk': 'the Gulf Coastal Plain'}), ('downstream', 'In this study, we present evidence of a Paleocene–Eocene Thermal Maximum (PETM) record within a 543-m-thick (1780 ft) deep-marine section in the Gulf of Mexico (GoM) using organic carbon stable isotopes and biostratigraphic constraints. We suggest that climate and tectonic perturbations in the upstream North American catchments can induce a substantial response in the downstream sectors of the Gulf Coastal Plain and ultimately in the GoM. This relationship is illustrated in the deep-water basin by (1) a high accom- modation and deposition of a shale interval when coarse-grained terrigenous material was trapped upstream at the onset of the PETM, and (2) a considerable increase in sedi- ment supply during the PETM, which is archived as a particularly thick sedimentary section in the deep-sea fans of the GoM basin.', 'coastal', {'entity1_score': 1.0, 'entity2_score': 0.98, 'entity1_label': 'B-GeoPetro', 'entity2_label': 'B-GeoPetro', 'entity1_nn_chunk': 'the downstream sectors', 'entity2_nn_chunk': 'the Gulf Coastal Plain'})], [('basin', 'We suggest that climate and tectonic perturbations in the upstream North American catchments can induce a substantial response in the downstream sectors of the Gulf Coastal Plain and ultimately in the GoM. This relationship is illustrated in the deep-water basin by (1) a high accom- modation and deposition of a shale interval when coarse-grained terrigenous material was trapped upstream at the onset of the PETM, and (2) a considerable increase in sedi- ment supply during the PETM, which is archived as a particularly thick sedimentary section in the deep-sea fans of the GoM basin. The Paleocene–Eocene Thermal Maximum (PETM) (ca.', 'deposition', {'entity1_score': 1.0, 'entity2_score': 1.0, 'entity1_label': 'B-GeoPetro', 'entity2_label': 'B-GeoPetro', 'entity1_nn_chunk': 'the GoM basin', 'entity2_nn_chunk': 'deposition'}), ('basin', 'We suggest that climate and tectonic perturbations in the upstream North American catchments can induce a substantial response in the downstream sectors of the Gulf Coastal Plain and ultimately in the GoM. This relationship is illustrated in the deep-water basin by (1) a high accom- modation and deposition of a shale interval when coarse-grained terrigenous material was trapped upstream at the onset of the PETM, and (2) a considerable increase in sedi- ment supply during the PETM, which is archived as a particularly thick sedimentary section in the deep-sea fans of the GoM basin. The Paleocene–Eocene Thermal Maximum (PETM) (ca.', 'shale', {'entity1_score': 1.0, 'entity2_score': 1.0, 'entity1_label': 'B-GeoPetro', 'entity2_label': 'B-GeoPetro', 'entity1_nn_chunk': 'the GoM basin', 'entity2_nn_chunk': 'a shale interval'}), ('basin', 'We suggest that climate and tectonic perturbations in the upstream North American catchments can induce a substantial response in the downstream sectors of the Gulf Coastal Plain and ultimately in the GoM. This relationship is illustrated in the deep-water basin by (1) a high accom- modation and deposition of a shale interval when coarse-grained terrigenous material was trapped upstream at the onset of the PETM, and (2) a considerable increase in sedi- ment supply during the PETM, which is archived as a particularly thick sedimentary section in the deep-sea fans of the GoM basin. The Paleocene–Eocene Thermal Maximum (PETM) (ca.', 'coarse', {'entity1_score': 1.0, 'entity2_score': 1.0, 'entity1_label': 'B-GeoPetro', 'entity2_label': 'B-GeoPetro', 'entity1_nn_chunk': 'the GoM basin', 'entity2_nn_chunk': 'coarse-grained terrigenous material'}), ('basin', 'We suggest that climate and tectonic perturbations in the upstream North American catchments can induce a substantial response in the downstream sectors of the Gulf Coastal Plain and ultimately in the GoM. This relationship is illustrated in the deep-water basin by (1) a high accom- modation and deposition of a shale interval when coarse-grained terrigenous material was trapped upstream at the onset of the PETM, and (2) a considerable increase in sedi- ment supply during the PETM, which is archived as a particularly thick sedimentary section in the deep-sea fans of the GoM basin. The Paleocene–Eocene Thermal Maximum (PETM) (ca.', 'upstream', {'entity1_score': 1.0, 'entity2_score': 1.0, 'entity1_label': 'B-GeoPetro', 'entity2_label': 'B-GeoMeth', 'entity1_nn_chunk': 'the GoM basin', 'entity2_nn_chunk': 'upstream'}), ('deposition', 'We suggest that climate and tectonic perturbations in the upstream North American catchments can induce a substantial response in the downstream sectors of the Gulf Coastal Plain and ultimately in the GoM. This relationship is illustrated in the deep-water basin by (1) a high accom- modation and deposition of a shale interval when coarse-grained terrigenous material was trapped upstream at the onset of the PETM, and (2) a considerable increase in sedi- ment supply during the PETM, which is archived as a particularly thick sedimentary section in the deep-sea fans of the GoM basin. The Paleocene–Eocene Thermal Maximum (PETM) (ca.', 'shale', {'entity1_score': 1.0, 'entity2_score': 1.0, 'entity1_label': 'B-GeoPetro', 'entity2_label': 'B-GeoPetro', 'entity1_nn_chunk': 'deposition', 'entity2_nn_chunk': 'a shale interval'}), ('deposition', 'We suggest that climate and tectonic perturbations in the upstream North American catchments can induce a substantial response in the downstream sectors of the Gulf Coastal Plain and ultimately in the GoM. This relationship is illustrated in the deep-water basin by (1) a high accom- modation and deposition of a shale interval when coarse-grained terrigenous material was trapped upstream at the onset of the PETM, and (2) a considerable increase in sedi- ment supply during the PETM, which is archived as a particularly thick sedimentary section in the deep-sea fans of the GoM basin. The Paleocene–Eocene Thermal Maximum (PETM) (ca.', 'coarse', {'entity1_score': 1.0, 'entity2_score': 1.0, 'entity1_label': 'B-GeoPetro', 'entity2_label': 'B-GeoPetro', 'entity1_nn_chunk': 'deposition', 'entity2_nn_chunk': 'coarse-grained terrigenous material'}), ('deposition', 'We suggest that climate and tectonic perturbations in the upstream North American catchments can induce a substantial response in the downstream sectors of the Gulf Coastal Plain and ultimately in the GoM. This relationship is illustrated in the deep-water basin by (1) a high accom- modation and deposition of a shale interval when coarse-grained terrigenous material was trapped upstream at the onset of the PETM, and (2) a considerable increase in sedi- ment supply during the PETM, which is archived as a particularly thick sedimentary section in the deep-sea fans of the GoM basin. The Paleocene–Eocene Thermal Maximum (PETM) (ca.', 'upstream', {'entity1_score': 1.0, 'entity2_score': 1.0, 'entity1_label': 'B-GeoPetro', 'entity2_label': 'B-GeoMeth', 'entity1_nn_chunk': 'deposition', 'entity2_nn_chunk': 'upstream'}), ('shale', 'We suggest that climate and tectonic perturbations in the upstream North American catchments can induce a substantial response in the downstream sectors of the Gulf Coastal Plain and ultimately in the GoM. This relationship is illustrated in the deep-water basin by (1) a high accom- modation and deposition of a shale interval when coarse-grained terrigenous material was trapped upstream at the onset of the PETM, and (2) a considerable increase in sedi- ment supply during the PETM, which is archived as a particularly thick sedimentary section in the deep-sea fans of the GoM basin. The Paleocene–Eocene Thermal Maximum (PETM) (ca.', 'coarse', {'entity1_score': 1.0, 'entity2_score': 1.0, 'entity1_label': 'B-GeoPetro', 'entity2_label': 'B-GeoPetro', 'entity1_nn_chunk': 'a shale interval', 'entity2_nn_chunk': 'coarse-grained terrigenous material'}), ('shale', 'We suggest that climate and tectonic perturbations in the upstream North American catchments can induce a substantial response in the downstream sectors of the Gulf Coastal Plain and ultimately in the GoM. This relationship is illustrated in the deep-water basin by (1) a high accom- modation and deposition of a shale interval when coarse-grained terrigenous material was trapped upstream at the onset of the PETM, and (2) a considerable increase in sedi- ment supply during the PETM, which is archived as a particularly thick sedimentary section in the deep-sea fans of the GoM basin. The Paleocene–Eocene Thermal Maximum (PETM) (ca.', 'upstream', {'entity1_score': 1.0, 'entity2_score': 1.0, 'entity1_label': 'B-GeoPetro', 'entity2_label': 'B-GeoMeth', 'entity1_nn_chunk': 'a shale interval', 'entity2_nn_chunk': 'upstream'}), ('coarse', 'We suggest that climate and tectonic perturbations in the upstream North American catchments can induce a substantial response in the downstream sectors of the Gulf Coastal Plain and ultimately in the GoM. This relationship is illustrated in the deep-water basin by (1) a high accom- modation and deposition of a shale interval when coarse-grained terrigenous material was trapped upstream at the onset of the PETM, and (2) a considerable increase in sedi- ment supply during the PETM, which is archived as a particularly thick sedimentary section in the deep-sea fans of the GoM basin. The Paleocene–Eocene Thermal Maximum (PETM) (ca.', 'upstream', {'entity1_score': 1.0, 'entity2_score': 1.0, 'entity1_label': 'B-GeoPetro', 'entity2_label': 'B-GeoMeth', 'entity1_nn_chunk': 'coarse-grained terrigenous material', 'entity2_nn_chunk': 'upstream'}), ('upstream', 'We suggest that climate and tectonic perturbations in the upstream North American catchments can induce a substantial response in the downstream sectors of the Gulf Coastal Plain and ultimately in the GoM. This relationship is illustrated in the deep-water basin by (1) a high accom- modation and deposition of a shale interval when coarse-grained terrigenous material was trapped upstream at the onset of the PETM, and (2) a considerable increase in sedi- ment supply during the PETM, which is archived as a particularly thick sedimentary section in the deep-sea fans of the GoM basin. The Paleocene–Eocene Thermal Maximum (PETM) (ca.', 'sedimentary', {'entity1_score': 1.0, 'entity2_score': 1.0, 'entity1_label': 'B-GeoMeth', 'entity2_label': 'B-GeoPetro', 'entity1_nn_chunk': 'upstream', 'entity2_nn_chunk': 'a particularly thick sedimentary section'}), ('sedimentary', 'We suggest that climate and tectonic perturbations in the upstream North American catchments can induce a substantial response in the downstream sectors of the Gulf Coastal Plain and ultimately in the GoM. This relationship is illustrated in the deep-water basin by (1) a high accom- modation and deposition of a shale interval when coarse-grained terrigenous material was trapped upstream at the onset of the PETM, and (2) a considerable increase in sedi- ment supply during the PETM, which is archived as a particularly thick sedimentary section in the deep-sea fans of the GoM basin. The Paleocene–Eocene Thermal Maximum (PETM) (ca.', 'sea', {'entity1_score': 1.0, 'entity2_score': 0.87, 'entity1_label': 'B-GeoPetro', 'entity2_label': 'B-GeoPetro, I-GeoPetro', 'entity1_nn_chunk': 'a particularly thick sedimentary section', 'entity2_nn_chunk': 'the deep-sea fans'})], [('paleocene', 'This relationship is illustrated in the deep-water basin by (1) a high accom- modation and deposition of a shale interval when coarse-grained terrigenous material was trapped upstream at the onset of the PETM, and (2) a considerable increase in sedi- ment supply during the PETM, which is archived as a particularly thick sedimentary section in the deep-sea fans of the GoM basin. The Paleocene–Eocene Thermal Maximum (PETM) (ca. 56 Ma) was a rapid global warming event characterized by the rise of temperatures to5–9 °C (Kennett and Stott, 1991), which caused substantial environmental changes around the globe.', 'eocene', {'entity1_score': 0.66, 'entity2_score': 1.0, 'entity1_label': 'B-GeoTime', 'entity2_label': 'B-GeoMeth, B-GeoTime', 'entity1_nn_chunk': 'The Paleocene', 'entity2_nn_chunk': 'Eocene Thermal Maximum'}), ('paleocene', 'This relationship is illustrated in the deep-water basin by (1) a high accom- modation and deposition of a shale interval when coarse-grained terrigenous material was trapped upstream at the onset of the PETM, and (2) a considerable increase in sedi- ment supply during the PETM, which is archived as a particularly thick sedimentary section in the deep-sea fans of the GoM basin. The Paleocene–Eocene Thermal Maximum (PETM) (ca. 56 Ma) was a rapid global warming event characterized by the rise of temperatures to5–9 °C (Kennett and Stott, 1991), which caused substantial environmental changes around the globe.', 'pet', {'entity1_score': 0.66, 'entity2_score': 0.64, 'entity1_label': 'B-GeoTime', 'entity2_label': 'B-GeoPetro', 'entity1_nn_chunk': 'The Paleocene', 'entity2_nn_chunk': '(PETM'}), ('eocene', 'This relationship is illustrated in the deep-water basin by (1) a high accom- modation and deposition of a shale interval when coarse-grained terrigenous material was trapped upstream at the onset of the PETM, and (2) a considerable increase in sedi- ment supply during the PETM, which is archived as a particularly thick sedimentary section in the deep-sea fans of the GoM basin. The Paleocene–Eocene Thermal Maximum (PETM) (ca. 56 Ma) was a rapid global warming event characterized by the rise of temperatures to5–9 °C (Kennett and Stott, 1991), which caused substantial environmental changes around the globe.', 'pet', {'entity1_score': 1.0, 'entity2_score': 0.64, 'entity1_label': 'B-GeoMeth, B-GeoTime', 'entity2_label': 'B-GeoPetro', 'entity1_nn_chunk': 'Eocene Thermal Maximum', 'entity2_nn_chunk': '(PETM'})], [('global', 'The Paleocene–Eocene Thermal Maximum (PETM) (ca. 56 Ma) was a rapid global warming event characterized by the rise of temperatures to5–9 °C (Kennett and Stott, 1991), which caused substantial environmental changes around the globe.', 'temperatures', {'entity1_score': 0.99, 'entity2_score': 0.91, 'entity1_label': 'B-GeoPetro, I-GeoPetro', 'entity2_label': 'B-GeoMeth', 'entity1_nn_chunk': 'a rapid global warming event', 'entity2_nn_chunk': 'temperatures'}), ('global', 'The Paleocene–Eocene Thermal Maximum (PETM) (ca. 56 Ma) was a rapid global warming event characterized by the rise of temperatures to5–9 °C (Kennett and Stott, 1991), which caused substantial environmental changes around the globe.', 'kenn', {'entity1_score': 0.99, 'entity2_score': 0.97, 'entity1_label': 'B-GeoPetro, I-GeoPetro', 'entity2_label': 'B-GeoPetro', 'entity1_nn_chunk': 'a rapid global warming event', 'entity2_nn_chunk': 'Kennett'}), ('temperatures', 'The Paleocene–Eocene Thermal Maximum (PETM) (ca. 56 Ma) was a rapid global warming event characterized by the rise of temperatures to5–9 °C (Kennett and Stott, 1991), which caused substantial environmental changes around the globe.', 'kenn', {'entity1_score': 0.91, 'entity2_score': 0.97, 'entity1_label': 'B-GeoMeth', 'entity2_label': 'B-GeoPetro', 'entity1_nn_chunk': 'temperatures', 'entity2_nn_chunk': 'Kennett'})]] + # user_entity_type = 'B-GeoTime' # Example user-specified entity type + filtered_data = extractor.process_entity_types(doc_entities) + print(filtered_data) + +if __name__ == "__main__": + main() diff --git a/querent/kg/ner_helperfunctions/fixed_predicate.py b/querent/kg/ner_helperfunctions/fixed_predicate.py new file mode 100644 index 00000000..49083704 --- /dev/null +++ b/querent/kg/ner_helperfunctions/fixed_predicate.py @@ -0,0 +1,141 @@ +import spacy +import re +from typing import List +from nltk.corpus import wordnet as wn +from nltk.tokenize import PunktSentenceTokenizer +import json + +class FixedPredicateExtractor: + def __init__(self, fixed_predicates: List[str] = None, predicate_types: List[str] = None, model="en_core_web_lg"): + self.nlp = spacy.load(model) + self.sentence_tokenizer = PunktSentenceTokenizer() + self.predicate_types = predicate_types + self.fixed_predicates = fixed_predicates + + if fixed_predicates: + extended_predicates = self.extend_with_synonyms(fixed_predicates) + self.predicate_pattern = self.create_combined_pattern(extended_predicates) + self.lemmatized_predicates = set(self.lemmatize_predicates(extended_predicates)) + + def get_wordnet_synonyms(self, word): + synonyms = set() + for synset in wn.synsets(word): + for lemma in synset.lemmas(): + synonym = lemma.name().replace('_', ' ') + synonyms.add(synonym) + + return list(synonyms) + + def extend_with_synonyms(self, predicates): + all_predicates = set(predicates) + for predicate in predicates: + synonyms = self.get_wordnet_synonyms(predicate) + print(synonyms) + all_predicates.update(synonyms) + + return list(all_predicates) + + def create_combined_pattern(self, predicates): + combined_pattern = '|'.join(map(re.escape, predicates)) + return re.compile(r'\b(?:' + combined_pattern + r')\b', re.IGNORECASE) + + def lemmatize_predicates(self, predicates): + return [self.nlp(predicate)[0].lemma_ for predicate in predicates] + + def find_predicate_sentences(self, text: str) -> str: + doc = self.nlp(text) + relevant_sentences = [] + added_sentences = set() + + prev_sentence = None + + for j, sentence in enumerate(doc.sents): + if self.is_predicate_present(sentence): + self.add_contextual_sentences(j, list(doc.sents), prev_sentence, relevant_sentences, added_sentences) + + prev_sentence = sentence + + return ' '.join(relevant_sentences) + + def add_contextual_sentences(self, j, sentences, prev_sentence, relevant_sentences, added_sentences): + if prev_sentence and prev_sentence.text not in added_sentences: + relevant_sentences.append(prev_sentence.text) + added_sentences.add(prev_sentence.text) + + current_sentence = sentences[j] + if current_sentence.text not in added_sentences: + relevant_sentences.append(current_sentence.text) + added_sentences.add(current_sentence.text) + + if j < len(sentences) - 1: + next_sentence = sentences[j + 1] + if next_sentence.text not in added_sentences: + relevant_sentences.append(next_sentence.text) + added_sentences.add(next_sentence.text) + + def is_predicate_present(self, sentence): + sentence_text = sentence.text + sentence_lemmas = {token.lemma_ for token in sentence} + return self.fixed_predicates and (self.predicate_pattern.search(sentence_text) or sentence_lemmas.intersection(self.lemmatized_predicates)) + + def process_predicate_types(self, doc_predicates): + filtered_predicates = [] + added_tuples = set() # Set to track added tuples + + for predicate_data in doc_predicates: + predicate_phrase, json_data, object_phrase = predicate_data + + # Convert tuple to a string for easy comparison + tuple_str = str(predicate_data) + + # Skip this tuple if it has already been added + if tuple_str in added_tuples: + continue + + # Parse the JSON string to extract predicate type + predicate_info = json.loads(json_data) + predicate_type = predicate_info.get("predicate_type", "").lower() + + # Flexible matching of predicate types + for user_defined_type in self.predicate_types: + if user_defined_type.lower() in predicate_type: + filtered_predicates.append(predicate_data) + added_tuples.add(tuple_str) # Add to set to track it has been added + break + + return filtered_predicates + + +def main(): + text = """In this study, we present evidence of a Paleocene–Eocene Thermal Maximum (PETM) +record within a 543-m-thick (1780 ft) deep-marine section in the Gulf of Mexico (GoM) +using organic carbon stable isotopes and biostratigraphic constraints. We suggest that +climate and tectonic perturbations in the upstream North American catchments can induce +a substantial response in the downstream sectors of the Gulf Coastal Plain and ultimately +in the GoM. This relationship is illustrated in the deep-water basin by (1) a high accom- +modation and deposition of a shale interval when coarse-grained terrigenous material +was trapped upstream at the onset of the PETM, and (2) a considerable increase in sedi- +ment supply during the PETM, which is archived as a particularly thick sedimentary +section in the deep-sea fans of the GoM basin. The Paleocene–Eocene Thermal Maximum (PETM) (ca. 56 Ma) was a rapid global warming event characterized by the rise of temperatures to5–9 °C (Kennett and Stott, 1991), which caused substantial environmental changes around the globe.""" # Insert your text here + + # Initialize the extractor with different predicates and types + extractor = FixedPredicateExtractor( + fixed_predicates=["constraint"], + predicate_types=["location", "locatedin"] + ) + + # Scenario 1: Extract sentences with fixed predicates + print("---- Scenario 1: Fixed Predicates ----") + sentences = extractor.find_predicate_sentences(text) + print(sentences) + print("---------------------------------------") + + + + + sample_text = [('Paleocene–Eocene Thermal Maximum (PETM) record', '{"context": "In this study, we present evidence of a Paleocene\\u2013Eocene Thermal Maximum (PETM) record within a 543-m-thick (1780 ft) deep-marine section in the Gulf of Mexico (GoM) using organic carbon stable isotopes and biostratigraphic constraints. We suggest that climate and tectonic perturbations in the upstream North American catchments can induce a substantial response in the downstream sectors of the Gulf Coastal Plain and ultimately in the GoM.", "context_embeddings": [-0.0012271085288375616, 0.013425009325146675, 0.030366241931915283, -0.019079506397247314, -0.014303878881037235, -0.010693298652768135, -0.15427561104297638, -0.00650711078196764, -0.017623882740736008, -0.02028549648821354, -0.024592051282525063, -0.08374392241239548, 0.0009469542419537902, 0.041213423013687134, 0.03390967845916748, 0.014956949278712273, -0.02523980848491192, 0.017663903534412384, 0.08013967424631119, 0.021113678812980652, 0.01349718403071165, 0.10254321247339249, -0.0230905469506979, 0.02219785749912262, -0.03851298987865448, -0.06848952174186707, -0.066293865442276, 0.01727285049855709, -0.003443583380430937, 0.052778661251068115, -0.0012023882009088993, 0.046956826001405716, 0.038306206464767456, -0.026521041989326477, 0.05880318954586983, -0.04189427196979523, -0.06203264370560646, -0.01675843819975853, -0.042914196848869324, 0.0678146556019783, -0.039008978754282, -0.05203939229249954, 0.08894723653793335, 0.041889846324920654, -0.06711404025554657, -0.005139053799211979, 0.04637252539396286, -0.018018178641796112, -0.040550459176301956, 0.001791472896002233, 0.04215759038925171, 0.0013910226989537477, -0.07891755551099777, 0.045675814151763916, -0.053060226142406464, -0.025435620918869972, 0.0002864995039999485, -0.03658481687307358, -0.06780476868152618, -0.026491524651646614, 0.08902446925640106, 0.008203689008951187, -0.09294832497835159, -0.024831213057041168, 0.02485021948814392, 0.05568614602088928, 0.08549235016107559, -0.007939847186207771, -0.021160969510674477, -0.022926481440663338, 0.02191278152167797, 0.0583992600440979, -0.03338628634810448, -0.08539647608995438, 0.06565871089696884, -0.020847942680120468, -0.02826596423983574, 0.009138665162026882, -0.03609596937894821, -0.07548747956752777, 0.04124610498547554, 0.002618685131892562, 0.09159506857395172, -0.12401706725358963, -0.016653258353471756, 0.03374537453055382, 0.004280438646674156, 0.04579543322324753, -0.021860703825950623, 0.09893552958965302, -0.013497484847903252, 0.03897342458367348, -0.017658540979027748, 0.0023417368065565825, 0.023665666580200195, 0.06329143792390823, -0.00603830348700285, 0.04800158366560936, 0.06573368608951569, -0.04917098954319954, 0.0009583091014064848, -0.012098632752895355, -0.056513410061597824, 0.026204237714409828, 0.08602026104927063, 0.04591049253940582, 0.062124043703079224, -0.008943495340645313, 0.0193549282848835, -0.0043794214725494385, 0.01343149971216917, -0.0018267378909513354, -0.010319544933736324, -0.0664811059832573, -0.001485943328589201, -0.037000611424446106, -0.008781535550951958, -0.03517938405275345, -0.060046471655368805, -0.04904545471072197, -0.10909957438707352, 0.02032388001680374, -0.043372586369514465, 0.11821283400058746, 0.02440655417740345, 0.02190956100821495, 0.022679569199681282, 8.484437207617028e-34, 0.08106634765863419, 0.012935603968799114, -0.0406435951590538, -0.0011673945700749755, 0.03377707302570343, 0.02665833942592144, -0.04230527952313423, -0.026362286880612373, -0.13122625648975372, 0.013970945961773396, -0.023471759632229805, -0.005611239932477474, 0.0036552271340042353, 0.016863219439983368, 0.0016366424970328808, -0.0656895712018013, -0.09936514496803284, 0.048883672803640366, -0.01487319078296423, -0.11922167986631393, -0.09203090518712997, -0.0746583342552185, 0.015058452263474464, -0.04550033435225487, 0.053875502198934555, -0.015218737535178661, 0.009781794622540474, 0.04347926005721092, -0.07420404255390167, -0.03944389894604683, -0.07124387472867966, -0.10978738963603973, -0.011769669130444527, -0.017444828525185585, 0.07907471805810928, -0.034116242080926895, -0.005682820919901133, 0.0023374196607619524, -0.014204717241227627, 0.10475187003612518, 0.0675702691078186, 0.036710891872644424, 0.016068454831838608, 0.013748908415436745, 0.03756954148411751, -0.05841684341430664, 0.07025758922100067, 0.09532269835472107, 0.0006878585554659367, 0.016802065074443817, -0.06379055231809616, 0.010760769248008728, -0.047120947390794754, -0.038079310208559036, -0.10674776881933212, -0.028845539316534996, 0.0515095479786396, -0.020027874037623405, -0.04142139106988907, -0.033058226108551025, -0.012939873151481152, 0.029355088248848915, 0.022154349833726883, -0.006021415814757347, 0.10561389476060867, 0.13655926287174225, -0.04772556200623512, 0.0474725067615509, 0.10435418039560318, 0.041488148272037506, -0.022484874352812767, -0.059681959450244904, 0.09851953387260437, 0.008008861914277077, 0.06976961344480515, 0.054243303835392, 0.05394149571657181, -0.03800997883081436, 0.04188702255487442, 0.033286385238170624, -0.028783399611711502, 0.05296735465526581, -0.01702016592025757, -0.004424842074513435, -0.05246184766292572, 0.05478404462337494, -0.0011070768814533949, -0.013331901282072067, 0.059466563165187836, 0.07529965788125992, -0.04580802470445633, 0.017423812299966812, 0.03351599723100662, -0.025107568129897118, 0.05638936161994934, -1.6294904729190097e-33, 0.03908007591962814, 0.024386534467339516, -0.05761329457163811, -0.029996339231729507, -0.035915885120630264, -0.11726922541856766, -0.009782165288925171, 0.0997375026345253, -0.0249633826315403, -0.03796718269586563, 0.05658339336514473, 0.044826604425907135, 0.08314438909292221, -0.11014215648174286, 0.0331878624856472, -0.05855364724993706, -0.06534840911626816, -0.016034863889217377, 0.002677812008187175, -0.003889987710863352, -0.0319722555577755, -0.10714472830295563, -0.06909053027629852, 0.02458318881690502, -0.02131875976920128, 0.043715059757232666, 0.005304013844579458, -0.006034977734088898, 0.07722453027963638, 0.0015622730134055018, -0.05141900107264519, 0.0022618977818638086, -0.05509362369775772, -0.012772861868143082, -0.02956799976527691, 0.024104783311486244, -0.025343408808112144, 0.05208270251750946, 0.054043304175138474, 0.008738735690712929, -0.0038565027061849833, -0.04093955457210541, -0.01712709665298462, -0.0719464123249054, 0.06530682742595673, -0.004008448217064142, 0.04660233482718468, 0.019477033987641335, -0.00412140553817153, 0.003073150059208274, -0.008666624315083027, 0.03321103751659393, -0.01861460506916046, 0.06254444271326065, 0.0358792208135128, 0.0011818987550213933, -0.02138214372098446, 0.0816279798746109, 0.0238629262894392, -0.07813800126314163, -0.020122824236750603, 0.13003191351890564, -0.014246649108827114, 0.012455631978809834, 0.08878719806671143, -0.0025891917757689953, -0.07710041850805283, -0.008412100374698639, -0.02417423576116562, 0.07543066889047623, -0.01889428310096264, 0.0035160044208168983, -0.08469651639461517, -0.05944305285811424, 0.06049126014113426, -0.04930749908089638, -0.059945426881313324, -0.010478154756128788, -0.013811435550451279, 0.09785693138837814, -0.023740369826555252, 0.04788070172071457, -0.020202502608299255, 0.02755150757730007, 0.08024020493030548, -0.0037542651407420635, -0.003040989860892296, -0.04496423155069351, 0.007102981675416231, 0.015467751771211624, 0.011193988844752312, -0.10065359622240067, -0.11672472953796387, -0.007500711362808943, -0.04909554123878479, -3.916844093510008e-08, 0.05770188942551613, 0.038828980177640915, 0.04173628240823746, 0.03673309087753296, 0.04816678166389465, 0.021089747548103333, 0.024425555020570755, 0.0637979805469513, 0.011191878467798233, 0.04713549464941025, 0.11315646767616272, -0.02735317125916481, 0.05403420329093933, 0.007475649006664753, 0.02583567425608635, -0.03613298013806343, -0.05250817537307739, -0.05594613775610924, -0.036026161164045334, -0.03637537360191345, -0.04320118948817253, 0.019324850291013718, -0.00971305463463068, -0.009871450252830982, -0.00497768260538578, 0.013113860972225666, 0.023277614265680313, 0.11838914453983307, -0.004442943260073662, -0.015289708971977234, 0.05791540443897247, -0.04173598811030388, -0.04182292893528938, -0.06998943537473679, 0.04858612269163132, -0.09004157036542892, -0.008434208109974861, 0.07052134722471237, -0.037781067192554474, -0.05418714880943298, 0.04572790116071701, 0.053970012813806534, -0.038469698280096054, 0.06505703926086426, -0.00790640152990818, -0.03147916495800018, -0.05006038770079613, 0.038330528885126114, 0.04503001272678375, 0.08656904846429825, 0.02979230508208275, 0.04129403457045555, -0.04855050891637802, 0.059702977538108826, -0.011890406720340252, -0.04696114733815193, 0.04003579542040825, -0.020794136449694633, -0.12697575986385345, 0.07243217527866364, 0.05959709361195564, -0.026326211169362068, 0.019343875348567963, -0.0882846787571907], "predicate_type": "Location", "predicate": "is located within", "subject_type": "Organization", "object_type": "Geological Formation"}', '543-m-thick (1780 ft) deep-marine section'), ('Paleocene-Eocene Thermal Maximum (PETM) record', '{"context": "In this study, we present evidence of a Paleocene\\u2013Eocene Thermal Maximum (PETM) record within a 543-m-thick (1780 ft) deep-marine section in the Gulf of Mexico (GoM) using organic carbon stable isotopes and biostratigraphic constraints. We suggest that climate and tectonic perturbations in the upstream North American catchments can induce a substantial response in the downstream sectors of the Gulf Coastal Plain and ultimately in the GoM.", "context_embeddings": [-0.0012271085288375616, 0.013425009325146675, 0.030366241931915283, -0.019079506397247314, -0.014303878881037235, -0.010693298652768135, -0.15427561104297638, -0.00650711078196764, -0.017623882740736008, -0.02028549648821354, -0.024592051282525063, -0.08374392241239548, 0.0009469542419537902, 0.041213423013687134, 0.03390967845916748, 0.014956949278712273, -0.02523980848491192, 0.017663903534412384, 0.08013967424631119, 0.021113678812980652, 0.01349718403071165, 0.10254321247339249, -0.0230905469506979, 0.02219785749912262, -0.03851298987865448, -0.06848952174186707, -0.066293865442276, 0.01727285049855709, -0.003443583380430937, 0.052778661251068115, -0.0012023882009088993, 0.046956826001405716, 0.038306206464767456, -0.026521041989326477, 0.05880318954586983, -0.04189427196979523, -0.06203264370560646, -0.01675843819975853, -0.042914196848869324, 0.0678146556019783, -0.039008978754282, -0.05203939229249954, 0.08894723653793335, 0.041889846324920654, -0.06711404025554657, -0.005139053799211979, 0.04637252539396286, -0.018018178641796112, -0.040550459176301956, 0.001791472896002233, 0.04215759038925171, 0.0013910226989537477, -0.07891755551099777, 0.045675814151763916, -0.053060226142406464, -0.025435620918869972, 0.0002864995039999485, -0.03658481687307358, -0.06780476868152618, -0.026491524651646614, 0.08902446925640106, 0.008203689008951187, -0.09294832497835159, -0.024831213057041168, 0.02485021948814392, 0.05568614602088928, 0.08549235016107559, -0.007939847186207771, -0.021160969510674477, -0.022926481440663338, 0.02191278152167797, 0.0583992600440979, -0.03338628634810448, -0.08539647608995438, 0.06565871089696884, -0.020847942680120468, -0.02826596423983574, 0.009138665162026882, -0.03609596937894821, -0.07548747956752777, 0.04124610498547554, 0.002618685131892562, 0.09159506857395172, -0.12401706725358963, -0.016653258353471756, 0.03374537453055382, 0.004280438646674156, 0.04579543322324753, -0.021860703825950623, 0.09893552958965302, -0.013497484847903252, 0.03897342458367348, -0.017658540979027748, 0.0023417368065565825, 0.023665666580200195, 0.06329143792390823, -0.00603830348700285, 0.04800158366560936, 0.06573368608951569, -0.04917098954319954, 0.0009583091014064848, -0.012098632752895355, -0.056513410061597824, 0.026204237714409828, 0.08602026104927063, 0.04591049253940582, 0.062124043703079224, -0.008943495340645313, 0.0193549282848835, -0.0043794214725494385, 0.01343149971216917, -0.0018267378909513354, -0.010319544933736324, -0.0664811059832573, -0.001485943328589201, -0.037000611424446106, -0.008781535550951958, -0.03517938405275345, -0.060046471655368805, -0.04904545471072197, -0.10909957438707352, 0.02032388001680374, -0.043372586369514465, 0.11821283400058746, 0.02440655417740345, 0.02190956100821495, 0.022679569199681282, 8.484437207617028e-34, 0.08106634765863419, 0.012935603968799114, -0.0406435951590538, -0.0011673945700749755, 0.03377707302570343, 0.02665833942592144, -0.04230527952313423, -0.026362286880612373, -0.13122625648975372, 0.013970945961773396, -0.023471759632229805, -0.005611239932477474, 0.0036552271340042353, 0.016863219439983368, 0.0016366424970328808, -0.0656895712018013, -0.09936514496803284, 0.048883672803640366, -0.01487319078296423, -0.11922167986631393, -0.09203090518712997, -0.0746583342552185, 0.015058452263474464, -0.04550033435225487, 0.053875502198934555, -0.015218737535178661, 0.009781794622540474, 0.04347926005721092, -0.07420404255390167, -0.03944389894604683, -0.07124387472867966, -0.10978738963603973, -0.011769669130444527, -0.017444828525185585, 0.07907471805810928, -0.034116242080926895, -0.005682820919901133, 0.0023374196607619524, -0.014204717241227627, 0.10475187003612518, 0.0675702691078186, 0.036710891872644424, 0.016068454831838608, 0.013748908415436745, 0.03756954148411751, -0.05841684341430664, 0.07025758922100067, 0.09532269835472107, 0.0006878585554659367, 0.016802065074443817, -0.06379055231809616, 0.010760769248008728, -0.047120947390794754, -0.038079310208559036, -0.10674776881933212, -0.028845539316534996, 0.0515095479786396, -0.020027874037623405, -0.04142139106988907, -0.033058226108551025, -0.012939873151481152, 0.029355088248848915, 0.022154349833726883, -0.006021415814757347, 0.10561389476060867, 0.13655926287174225, -0.04772556200623512, 0.0474725067615509, 0.10435418039560318, 0.041488148272037506, -0.022484874352812767, -0.059681959450244904, 0.09851953387260437, 0.008008861914277077, 0.06976961344480515, 0.054243303835392, 0.05394149571657181, -0.03800997883081436, 0.04188702255487442, 0.033286385238170624, -0.028783399611711502, 0.05296735465526581, -0.01702016592025757, -0.004424842074513435, -0.05246184766292572, 0.05478404462337494, -0.0011070768814533949, -0.013331901282072067, 0.059466563165187836, 0.07529965788125992, -0.04580802470445633, 0.017423812299966812, 0.03351599723100662, -0.025107568129897118, 0.05638936161994934, -1.6294904729190097e-33, 0.03908007591962814, 0.024386534467339516, -0.05761329457163811, -0.029996339231729507, -0.035915885120630264, -0.11726922541856766, -0.009782165288925171, 0.0997375026345253, -0.0249633826315403, -0.03796718269586563, 0.05658339336514473, 0.044826604425907135, 0.08314438909292221, -0.11014215648174286, 0.0331878624856472, -0.05855364724993706, -0.06534840911626816, -0.016034863889217377, 0.002677812008187175, -0.003889987710863352, -0.0319722555577755, -0.10714472830295563, -0.06909053027629852, 0.02458318881690502, -0.02131875976920128, 0.043715059757232666, 0.005304013844579458, -0.006034977734088898, 0.07722453027963638, 0.0015622730134055018, -0.05141900107264519, 0.0022618977818638086, -0.05509362369775772, -0.012772861868143082, -0.02956799976527691, 0.024104783311486244, -0.025343408808112144, 0.05208270251750946, 0.054043304175138474, 0.008738735690712929, -0.0038565027061849833, -0.04093955457210541, -0.01712709665298462, -0.0719464123249054, 0.06530682742595673, -0.004008448217064142, 0.04660233482718468, 0.019477033987641335, -0.00412140553817153, 0.003073150059208274, -0.008666624315083027, 0.03321103751659393, -0.01861460506916046, 0.06254444271326065, 0.0358792208135128, 0.0011818987550213933, -0.02138214372098446, 0.0816279798746109, 0.0238629262894392, -0.07813800126314163, -0.020122824236750603, 0.13003191351890564, -0.014246649108827114, 0.012455631978809834, 0.08878719806671143, -0.0025891917757689953, -0.07710041850805283, -0.008412100374698639, -0.02417423576116562, 0.07543066889047623, -0.01889428310096264, 0.0035160044208168983, -0.08469651639461517, -0.05944305285811424, 0.06049126014113426, -0.04930749908089638, -0.059945426881313324, -0.010478154756128788, -0.013811435550451279, 0.09785693138837814, -0.023740369826555252, 0.04788070172071457, -0.020202502608299255, 0.02755150757730007, 0.08024020493030548, -0.0037542651407420635, -0.003040989860892296, -0.04496423155069351, 0.007102981675416231, 0.015467751771211624, 0.011193988844752312, -0.10065359622240067, -0.11672472953796387, -0.007500711362808943, -0.04909554123878479, -3.916844093510008e-08, 0.05770188942551613, 0.038828980177640915, 0.04173628240823746, 0.03673309087753296, 0.04816678166389465, 0.021089747548103333, 0.024425555020570755, 0.0637979805469513, 0.011191878467798233, 0.04713549464941025, 0.11315646767616272, -0.02735317125916481, 0.05403420329093933, 0.007475649006664753, 0.02583567425608635, -0.03613298013806343, -0.05250817537307739, -0.05594613775610924, -0.036026161164045334, -0.03637537360191345, -0.04320118948817253, 0.019324850291013718, -0.00971305463463068, -0.009871450252830982, -0.00497768260538578, 0.013113860972225666, 0.023277614265680313, 0.11838914453983307, -0.004442943260073662, -0.015289708971977234, 0.05791540443897247, -0.04173598811030388, -0.04182292893528938, -0.06998943537473679, 0.04858612269163132, -0.09004157036542892, -0.008434208109974861, 0.07052134722471237, -0.037781067192554474, -0.05418714880943298, 0.04572790116071701, 0.053970012813806534, -0.038469698280096054, 0.06505703926086426, -0.00790640152990818, -0.03147916495800018, -0.05006038770079613, 0.038330528885126114, 0.04503001272678375, 0.08656904846429825, 0.02979230508208275, 0.04129403457045555, -0.04855050891637802, 0.059702977538108826, -0.011890406720340252, -0.04696114733815193, 0.04003579542040825, -0.020794136449694633, -0.12697575986385345, 0.07243217527866364, 0.05959709361195564, -0.026326211169362068, 0.019343875348567963, -0.0882846787571907], "predicate_type": "LocatedIn", "predicate": "occurs in", "subject_type": "Event", "object_type": "Country"}', 'Mexico'), ('Paleocene–Eocene Thermal Maximum (PETM)', '{"context": "In this study, we present evidence of a Paleocene\\u2013Eocene Thermal Maximum (PETM) record within a 543-m-thick (1780 ft) deep-marine section in the Gulf of Mexico (GoM) using organic carbon stable isotopes and biostratigraphic constraints. We suggest that climate and tectonic perturbations in the upstream North American catchments can induce a substantial response in the downstream sectors of the Gulf Coastal Plain and ultimately in the GoM.", "context_embeddings": [-0.0012271085288375616, 0.013425009325146675, 0.030366241931915283, -0.019079506397247314, -0.014303878881037235, -0.010693298652768135, -0.15427561104297638, -0.00650711078196764, -0.017623882740736008, -0.02028549648821354, -0.024592051282525063, -0.08374392241239548, 0.0009469542419537902, 0.041213423013687134, 0.03390967845916748, 0.014956949278712273, -0.02523980848491192, 0.017663903534412384, 0.08013967424631119, 0.021113678812980652, 0.01349718403071165, 0.10254321247339249, -0.0230905469506979, 0.02219785749912262, -0.03851298987865448, -0.06848952174186707, -0.066293865442276, 0.01727285049855709, -0.003443583380430937, 0.052778661251068115, -0.0012023882009088993, 0.046956826001405716, 0.038306206464767456, -0.026521041989326477, 0.05880318954586983, -0.04189427196979523, -0.06203264370560646, -0.01675843819975853, -0.042914196848869324, 0.0678146556019783, -0.039008978754282, -0.05203939229249954, 0.08894723653793335, 0.041889846324920654, -0.06711404025554657, -0.005139053799211979, 0.04637252539396286, -0.018018178641796112, -0.040550459176301956, 0.001791472896002233, 0.04215759038925171, 0.0013910226989537477, -0.07891755551099777, 0.045675814151763916, -0.053060226142406464, -0.025435620918869972, 0.0002864995039999485, -0.03658481687307358, -0.06780476868152618, -0.026491524651646614, 0.08902446925640106, 0.008203689008951187, -0.09294832497835159, -0.024831213057041168, 0.02485021948814392, 0.05568614602088928, 0.08549235016107559, -0.007939847186207771, -0.021160969510674477, -0.022926481440663338, 0.02191278152167797, 0.0583992600440979, -0.03338628634810448, -0.08539647608995438, 0.06565871089696884, -0.020847942680120468, -0.02826596423983574, 0.009138665162026882, -0.03609596937894821, -0.07548747956752777, 0.04124610498547554, 0.002618685131892562, 0.09159506857395172, -0.12401706725358963, -0.016653258353471756, 0.03374537453055382, 0.004280438646674156, 0.04579543322324753, -0.021860703825950623, 0.09893552958965302, -0.013497484847903252, 0.03897342458367348, -0.017658540979027748, 0.0023417368065565825, 0.023665666580200195, 0.06329143792390823, -0.00603830348700285, 0.04800158366560936, 0.06573368608951569, -0.04917098954319954, 0.0009583091014064848, -0.012098632752895355, -0.056513410061597824, 0.026204237714409828, 0.08602026104927063, 0.04591049253940582, 0.062124043703079224, -0.008943495340645313, 0.0193549282848835, -0.0043794214725494385, 0.01343149971216917, -0.0018267378909513354, -0.010319544933736324, -0.0664811059832573, -0.001485943328589201, -0.037000611424446106, -0.008781535550951958, -0.03517938405275345, -0.060046471655368805, -0.04904545471072197, -0.10909957438707352, 0.02032388001680374, -0.043372586369514465, 0.11821283400058746, 0.02440655417740345, 0.02190956100821495, 0.022679569199681282, 8.484437207617028e-34, 0.08106634765863419, 0.012935603968799114, -0.0406435951590538, -0.0011673945700749755, 0.03377707302570343, 0.02665833942592144, -0.04230527952313423, -0.026362286880612373, -0.13122625648975372, 0.013970945961773396, -0.023471759632229805, -0.005611239932477474, 0.0036552271340042353, 0.016863219439983368, 0.0016366424970328808, -0.0656895712018013, -0.09936514496803284, 0.048883672803640366, -0.01487319078296423, -0.11922167986631393, -0.09203090518712997, -0.0746583342552185, 0.015058452263474464, -0.04550033435225487, 0.053875502198934555, -0.015218737535178661, 0.009781794622540474, 0.04347926005721092, -0.07420404255390167, -0.03944389894604683, -0.07124387472867966, -0.10978738963603973, -0.011769669130444527, -0.017444828525185585, 0.07907471805810928, -0.034116242080926895, -0.005682820919901133, 0.0023374196607619524, -0.014204717241227627, 0.10475187003612518, 0.0675702691078186, 0.036710891872644424, 0.016068454831838608, 0.013748908415436745, 0.03756954148411751, -0.05841684341430664, 0.07025758922100067, 0.09532269835472107, 0.0006878585554659367, 0.016802065074443817, -0.06379055231809616, 0.010760769248008728, -0.047120947390794754, -0.038079310208559036, -0.10674776881933212, -0.028845539316534996, 0.0515095479786396, -0.020027874037623405, -0.04142139106988907, -0.033058226108551025, -0.012939873151481152, 0.029355088248848915, 0.022154349833726883, -0.006021415814757347, 0.10561389476060867, 0.13655926287174225, -0.04772556200623512, 0.0474725067615509, 0.10435418039560318, 0.041488148272037506, -0.022484874352812767, -0.059681959450244904, 0.09851953387260437, 0.008008861914277077, 0.06976961344480515, 0.054243303835392, 0.05394149571657181, -0.03800997883081436, 0.04188702255487442, 0.033286385238170624, -0.028783399611711502, 0.05296735465526581, -0.01702016592025757, -0.004424842074513435, -0.05246184766292572, 0.05478404462337494, -0.0011070768814533949, -0.013331901282072067, 0.059466563165187836, 0.07529965788125992, -0.04580802470445633, 0.017423812299966812, 0.03351599723100662, -0.025107568129897118, 0.05638936161994934, -1.6294904729190097e-33, 0.03908007591962814, 0.024386534467339516, -0.05761329457163811, -0.029996339231729507, -0.035915885120630264, -0.11726922541856766, -0.009782165288925171, 0.0997375026345253, -0.0249633826315403, -0.03796718269586563, 0.05658339336514473, 0.044826604425907135, 0.08314438909292221, -0.11014215648174286, 0.0331878624856472, -0.05855364724993706, -0.06534840911626816, -0.016034863889217377, 0.002677812008187175, -0.003889987710863352, -0.0319722555577755, -0.10714472830295563, -0.06909053027629852, 0.02458318881690502, -0.02131875976920128, 0.043715059757232666, 0.005304013844579458, -0.006034977734088898, 0.07722453027963638, 0.0015622730134055018, -0.05141900107264519, 0.0022618977818638086, -0.05509362369775772, -0.012772861868143082, -0.02956799976527691, 0.024104783311486244, -0.025343408808112144, 0.05208270251750946, 0.054043304175138474, 0.008738735690712929, -0.0038565027061849833, -0.04093955457210541, -0.01712709665298462, -0.0719464123249054, 0.06530682742595673, -0.004008448217064142, 0.04660233482718468, 0.019477033987641335, -0.00412140553817153, 0.003073150059208274, -0.008666624315083027, 0.03321103751659393, -0.01861460506916046, 0.06254444271326065, 0.0358792208135128, 0.0011818987550213933, -0.02138214372098446, 0.0816279798746109, 0.0238629262894392, -0.07813800126314163, -0.020122824236750603, 0.13003191351890564, -0.014246649108827114, 0.012455631978809834, 0.08878719806671143, -0.0025891917757689953, -0.07710041850805283, -0.008412100374698639, -0.02417423576116562, 0.07543066889047623, -0.01889428310096264, 0.0035160044208168983, -0.08469651639461517, -0.05944305285811424, 0.06049126014113426, -0.04930749908089638, -0.059945426881313324, -0.010478154756128788, -0.013811435550451279, 0.09785693138837814, -0.023740369826555252, 0.04788070172071457, -0.020202502608299255, 0.02755150757730007, 0.08024020493030548, -0.0037542651407420635, -0.003040989860892296, -0.04496423155069351, 0.007102981675416231, 0.015467751771211624, 0.011193988844752312, -0.10065359622240067, -0.11672472953796387, -0.007500711362808943, -0.04909554123878479, -3.916844093510008e-08, 0.05770188942551613, 0.038828980177640915, 0.04173628240823746, 0.03673309087753296, 0.04816678166389465, 0.021089747548103333, 0.024425555020570755, 0.0637979805469513, 0.011191878467798233, 0.04713549464941025, 0.11315646767616272, -0.02735317125916481, 0.05403420329093933, 0.007475649006664753, 0.02583567425608635, -0.03613298013806343, -0.05250817537307739, -0.05594613775610924, -0.036026161164045334, -0.03637537360191345, -0.04320118948817253, 0.019324850291013718, -0.00971305463463068, -0.009871450252830982, -0.00497768260538578, 0.013113860972225666, 0.023277614265680313, 0.11838914453983307, -0.004442943260073662, -0.015289708971977234, 0.05791540443897247, -0.04173598811030388, -0.04182292893528938, -0.06998943537473679, 0.04858612269163132, -0.09004157036542892, -0.008434208109974861, 0.07052134722471237, -0.037781067192554474, -0.05418714880943298, 0.04572790116071701, 0.053970012813806534, -0.038469698280096054, 0.06505703926086426, -0.00790640152990818, -0.03147916495800018, -0.05006038770079613, 0.038330528885126114, 0.04503001272678375, 0.08656904846429825, 0.02979230508208275, 0.04129403457045555, -0.04855050891637802, 0.059702977538108826, -0.011890406720340252, -0.04696114733815193, 0.04003579542040825, -0.020794136449694633, -0.12697575986385345, 0.07243217527866364, 0.05959709361195564, -0.026326211169362068, 0.019343875348567963, -0.0882846787571907], "predicate_type": "Action", "predicate": "record of", "subject_type": "Entity", "object_type": "Quantity"}', 'organic carbon stable isotopes'), ('Deep-marine section', '{"context": "In this study, we present evidence of a Paleocene\\u2013Eocene Thermal Maximum (PETM) record within a 543-m-thick (1780 ft) deep-marine section in the Gulf of Mexico (GoM) using organic carbon stable isotopes and biostratigraphic constraints. We suggest that climate and tectonic perturbations in the upstream North American catchments can induce a substantial response in the downstream sectors of the Gulf Coastal Plain and ultimately in the GoM.", "context_embeddings": [-0.0012271085288375616, 0.013425009325146675, 0.030366241931915283, -0.019079506397247314, -0.014303878881037235, -0.010693298652768135, -0.15427561104297638, -0.00650711078196764, -0.017623882740736008, -0.02028549648821354, -0.024592051282525063, -0.08374392241239548, 0.0009469542419537902, 0.041213423013687134, 0.03390967845916748, 0.014956949278712273, -0.02523980848491192, 0.017663903534412384, 0.08013967424631119, 0.021113678812980652, 0.01349718403071165, 0.10254321247339249, -0.0230905469506979, 0.02219785749912262, -0.03851298987865448, -0.06848952174186707, -0.066293865442276, 0.01727285049855709, -0.003443583380430937, 0.052778661251068115, -0.0012023882009088993, 0.046956826001405716, 0.038306206464767456, -0.026521041989326477, 0.05880318954586983, -0.04189427196979523, -0.06203264370560646, -0.01675843819975853, -0.042914196848869324, 0.0678146556019783, -0.039008978754282, -0.05203939229249954, 0.08894723653793335, 0.041889846324920654, -0.06711404025554657, -0.005139053799211979, 0.04637252539396286, -0.018018178641796112, -0.040550459176301956, 0.001791472896002233, 0.04215759038925171, 0.0013910226989537477, -0.07891755551099777, 0.045675814151763916, -0.053060226142406464, -0.025435620918869972, 0.0002864995039999485, -0.03658481687307358, -0.06780476868152618, -0.026491524651646614, 0.08902446925640106, 0.008203689008951187, -0.09294832497835159, -0.024831213057041168, 0.02485021948814392, 0.05568614602088928, 0.08549235016107559, -0.007939847186207771, -0.021160969510674477, -0.022926481440663338, 0.02191278152167797, 0.0583992600440979, -0.03338628634810448, -0.08539647608995438, 0.06565871089696884, -0.020847942680120468, -0.02826596423983574, 0.009138665162026882, -0.03609596937894821, -0.07548747956752777, 0.04124610498547554, 0.002618685131892562, 0.09159506857395172, -0.12401706725358963, -0.016653258353471756, 0.03374537453055382, 0.004280438646674156, 0.04579543322324753, -0.021860703825950623, 0.09893552958965302, -0.013497484847903252, 0.03897342458367348, -0.017658540979027748, 0.0023417368065565825, 0.023665666580200195, 0.06329143792390823, -0.00603830348700285, 0.04800158366560936, 0.06573368608951569, -0.04917098954319954, 0.0009583091014064848, -0.012098632752895355, -0.056513410061597824, 0.026204237714409828, 0.08602026104927063, 0.04591049253940582, 0.062124043703079224, -0.008943495340645313, 0.0193549282848835, -0.0043794214725494385, 0.01343149971216917, -0.0018267378909513354, -0.010319544933736324, -0.0664811059832573, -0.001485943328589201, -0.037000611424446106, -0.008781535550951958, -0.03517938405275345, -0.060046471655368805, -0.04904545471072197, -0.10909957438707352, 0.02032388001680374, -0.043372586369514465, 0.11821283400058746, 0.02440655417740345, 0.02190956100821495, 0.022679569199681282, 8.484437207617028e-34, 0.08106634765863419, 0.012935603968799114, -0.0406435951590538, -0.0011673945700749755, 0.03377707302570343, 0.02665833942592144, -0.04230527952313423, -0.026362286880612373, -0.13122625648975372, 0.013970945961773396, -0.023471759632229805, -0.005611239932477474, 0.0036552271340042353, 0.016863219439983368, 0.0016366424970328808, -0.0656895712018013, -0.09936514496803284, 0.048883672803640366, -0.01487319078296423, -0.11922167986631393, -0.09203090518712997, -0.0746583342552185, 0.015058452263474464, -0.04550033435225487, 0.053875502198934555, -0.015218737535178661, 0.009781794622540474, 0.04347926005721092, -0.07420404255390167, -0.03944389894604683, -0.07124387472867966, -0.10978738963603973, -0.011769669130444527, -0.017444828525185585, 0.07907471805810928, -0.034116242080926895, -0.005682820919901133, 0.0023374196607619524, -0.014204717241227627, 0.10475187003612518, 0.0675702691078186, 0.036710891872644424, 0.016068454831838608, 0.013748908415436745, 0.03756954148411751, -0.05841684341430664, 0.07025758922100067, 0.09532269835472107, 0.0006878585554659367, 0.016802065074443817, -0.06379055231809616, 0.010760769248008728, -0.047120947390794754, -0.038079310208559036, -0.10674776881933212, -0.028845539316534996, 0.0515095479786396, -0.020027874037623405, -0.04142139106988907, -0.033058226108551025, -0.012939873151481152, 0.029355088248848915, 0.022154349833726883, -0.006021415814757347, 0.10561389476060867, 0.13655926287174225, -0.04772556200623512, 0.0474725067615509, 0.10435418039560318, 0.041488148272037506, -0.022484874352812767, -0.059681959450244904, 0.09851953387260437, 0.008008861914277077, 0.06976961344480515, 0.054243303835392, 0.05394149571657181, -0.03800997883081436, 0.04188702255487442, 0.033286385238170624, -0.028783399611711502, 0.05296735465526581, -0.01702016592025757, -0.004424842074513435, -0.05246184766292572, 0.05478404462337494, -0.0011070768814533949, -0.013331901282072067, 0.059466563165187836, 0.07529965788125992, -0.04580802470445633, 0.017423812299966812, 0.03351599723100662, -0.025107568129897118, 0.05638936161994934, -1.6294904729190097e-33, 0.03908007591962814, 0.024386534467339516, -0.05761329457163811, -0.029996339231729507, -0.035915885120630264, -0.11726922541856766, -0.009782165288925171, 0.0997375026345253, -0.0249633826315403, -0.03796718269586563, 0.05658339336514473, 0.044826604425907135, 0.08314438909292221, -0.11014215648174286, 0.0331878624856472, -0.05855364724993706, -0.06534840911626816, -0.016034863889217377, 0.002677812008187175, -0.003889987710863352, -0.0319722555577755, -0.10714472830295563, -0.06909053027629852, 0.02458318881690502, -0.02131875976920128, 0.043715059757232666, 0.005304013844579458, -0.006034977734088898, 0.07722453027963638, 0.0015622730134055018, -0.05141900107264519, 0.0022618977818638086, -0.05509362369775772, -0.012772861868143082, -0.02956799976527691, 0.024104783311486244, -0.025343408808112144, 0.05208270251750946, 0.054043304175138474, 0.008738735690712929, -0.0038565027061849833, -0.04093955457210541, -0.01712709665298462, -0.0719464123249054, 0.06530682742595673, -0.004008448217064142, 0.04660233482718468, 0.019477033987641335, -0.00412140553817153, 0.003073150059208274, -0.008666624315083027, 0.03321103751659393, -0.01861460506916046, 0.06254444271326065, 0.0358792208135128, 0.0011818987550213933, -0.02138214372098446, 0.0816279798746109, 0.0238629262894392, -0.07813800126314163, -0.020122824236750603, 0.13003191351890564, -0.014246649108827114, 0.012455631978809834, 0.08878719806671143, -0.0025891917757689953, -0.07710041850805283, -0.008412100374698639, -0.02417423576116562, 0.07543066889047623, -0.01889428310096264, 0.0035160044208168983, -0.08469651639461517, -0.05944305285811424, 0.06049126014113426, -0.04930749908089638, -0.059945426881313324, -0.010478154756128788, -0.013811435550451279, 0.09785693138837814, -0.023740369826555252, 0.04788070172071457, -0.020202502608299255, 0.02755150757730007, 0.08024020493030548, -0.0037542651407420635, -0.003040989860892296, -0.04496423155069351, 0.007102981675416231, 0.015467751771211624, 0.011193988844752312, -0.10065359622240067, -0.11672472953796387, -0.007500711362808943, -0.04909554123878479, -3.916844093510008e-08, 0.05770188942551613, 0.038828980177640915, 0.04173628240823746, 0.03673309087753296, 0.04816678166389465, 0.021089747548103333, 0.024425555020570755, 0.0637979805469513, 0.011191878467798233, 0.04713549464941025, 0.11315646767616272, -0.02735317125916481, 0.05403420329093933, 0.007475649006664753, 0.02583567425608635, -0.03613298013806343, -0.05250817537307739, -0.05594613775610924, -0.036026161164045334, -0.03637537360191345, -0.04320118948817253, 0.019324850291013718, -0.00971305463463068, -0.009871450252830982, -0.00497768260538578, 0.013113860972225666, 0.023277614265680313, 0.11838914453983307, -0.004442943260073662, -0.015289708971977234, 0.05791540443897247, -0.04173598811030388, -0.04182292893528938, -0.06998943537473679, 0.04858612269163132, -0.09004157036542892, -0.008434208109974861, 0.07052134722471237, -0.037781067192554474, -0.05418714880943298, 0.04572790116071701, 0.053970012813806534, -0.038469698280096054, 0.06505703926086426, -0.00790640152990818, -0.03147916495800018, -0.05006038770079613, 0.038330528885126114, 0.04503001272678375, 0.08656904846429825, 0.02979230508208275, 0.04129403457045555, -0.04855050891637802, 0.059702977538108826, -0.011890406720340252, -0.04696114733815193, 0.04003579542040825, -0.020794136449694633, -0.12697575986385345, 0.07243217527866364, 0.05959709361195564, -0.026326211169362068, 0.019343875348567963, -0.0882846787571907], "predicate_type": "containedIn", "predicate": "contains", "subject_type": "Location", "object_type": "Country"}', 'Mexico'), ('Mexico', '{"context": "In this study, we present evidence of a Paleocene\\u2013Eocene Thermal Maximum (PETM) record within a 543-m-thick (1780 ft) deep-marine section in the Gulf of Mexico (GoM) using organic carbon stable isotopes and biostratigraphic constraints. We suggest that climate and tectonic perturbations in the upstream North American catchments can induce a substantial response in the downstream sectors of the Gulf Coastal Plain and ultimately in the GoM.", "context_embeddings": [-0.0012271085288375616, 0.013425009325146675, 0.030366241931915283, -0.019079506397247314, -0.014303878881037235, -0.010693298652768135, -0.15427561104297638, -0.00650711078196764, -0.017623882740736008, -0.02028549648821354, -0.024592051282525063, -0.08374392241239548, 0.0009469542419537902, 0.041213423013687134, 0.03390967845916748, 0.014956949278712273, -0.02523980848491192, 0.017663903534412384, 0.08013967424631119, 0.021113678812980652, 0.01349718403071165, 0.10254321247339249, -0.0230905469506979, 0.02219785749912262, -0.03851298987865448, -0.06848952174186707, -0.066293865442276, 0.01727285049855709, -0.003443583380430937, 0.052778661251068115, -0.0012023882009088993, 0.046956826001405716, 0.038306206464767456, -0.026521041989326477, 0.05880318954586983, -0.04189427196979523, -0.06203264370560646, -0.01675843819975853, -0.042914196848869324, 0.0678146556019783, -0.039008978754282, -0.05203939229249954, 0.08894723653793335, 0.041889846324920654, -0.06711404025554657, -0.005139053799211979, 0.04637252539396286, -0.018018178641796112, -0.040550459176301956, 0.001791472896002233, 0.04215759038925171, 0.0013910226989537477, -0.07891755551099777, 0.045675814151763916, -0.053060226142406464, -0.025435620918869972, 0.0002864995039999485, -0.03658481687307358, -0.06780476868152618, -0.026491524651646614, 0.08902446925640106, 0.008203689008951187, -0.09294832497835159, -0.024831213057041168, 0.02485021948814392, 0.05568614602088928, 0.08549235016107559, -0.007939847186207771, -0.021160969510674477, -0.022926481440663338, 0.02191278152167797, 0.0583992600440979, -0.03338628634810448, -0.08539647608995438, 0.06565871089696884, -0.020847942680120468, -0.02826596423983574, 0.009138665162026882, -0.03609596937894821, -0.07548747956752777, 0.04124610498547554, 0.002618685131892562, 0.09159506857395172, -0.12401706725358963, -0.016653258353471756, 0.03374537453055382, 0.004280438646674156, 0.04579543322324753, -0.021860703825950623, 0.09893552958965302, -0.013497484847903252, 0.03897342458367348, -0.017658540979027748, 0.0023417368065565825, 0.023665666580200195, 0.06329143792390823, -0.00603830348700285, 0.04800158366560936, 0.06573368608951569, -0.04917098954319954, 0.0009583091014064848, -0.012098632752895355, -0.056513410061597824, 0.026204237714409828, 0.08602026104927063, 0.04591049253940582, 0.062124043703079224, -0.008943495340645313, 0.0193549282848835, -0.0043794214725494385, 0.01343149971216917, -0.0018267378909513354, -0.010319544933736324, -0.0664811059832573, -0.001485943328589201, -0.037000611424446106, -0.008781535550951958, -0.03517938405275345, -0.060046471655368805, -0.04904545471072197, -0.10909957438707352, 0.02032388001680374, -0.043372586369514465, 0.11821283400058746, 0.02440655417740345, 0.02190956100821495, 0.022679569199681282, 8.484437207617028e-34, 0.08106634765863419, 0.012935603968799114, -0.0406435951590538, -0.0011673945700749755, 0.03377707302570343, 0.02665833942592144, -0.04230527952313423, -0.026362286880612373, -0.13122625648975372, 0.013970945961773396, -0.023471759632229805, -0.005611239932477474, 0.0036552271340042353, 0.016863219439983368, 0.0016366424970328808, -0.0656895712018013, -0.09936514496803284, 0.048883672803640366, -0.01487319078296423, -0.11922167986631393, -0.09203090518712997, -0.0746583342552185, 0.015058452263474464, -0.04550033435225487, 0.053875502198934555, -0.015218737535178661, 0.009781794622540474, 0.04347926005721092, -0.07420404255390167, -0.03944389894604683, -0.07124387472867966, -0.10978738963603973, -0.011769669130444527, -0.017444828525185585, 0.07907471805810928, -0.034116242080926895, -0.005682820919901133, 0.0023374196607619524, -0.014204717241227627, 0.10475187003612518, 0.0675702691078186, 0.036710891872644424, 0.016068454831838608, 0.013748908415436745, 0.03756954148411751, -0.05841684341430664, 0.07025758922100067, 0.09532269835472107, 0.0006878585554659367, 0.016802065074443817, -0.06379055231809616, 0.010760769248008728, -0.047120947390794754, -0.038079310208559036, -0.10674776881933212, -0.028845539316534996, 0.0515095479786396, -0.020027874037623405, -0.04142139106988907, -0.033058226108551025, -0.012939873151481152, 0.029355088248848915, 0.022154349833726883, -0.006021415814757347, 0.10561389476060867, 0.13655926287174225, -0.04772556200623512, 0.0474725067615509, 0.10435418039560318, 0.041488148272037506, -0.022484874352812767, -0.059681959450244904, 0.09851953387260437, 0.008008861914277077, 0.06976961344480515, 0.054243303835392, 0.05394149571657181, -0.03800997883081436, 0.04188702255487442, 0.033286385238170624, -0.028783399611711502, 0.05296735465526581, -0.01702016592025757, -0.004424842074513435, -0.05246184766292572, 0.05478404462337494, -0.0011070768814533949, -0.013331901282072067, 0.059466563165187836, 0.07529965788125992, -0.04580802470445633, 0.017423812299966812, 0.03351599723100662, -0.025107568129897118, 0.05638936161994934, -1.6294904729190097e-33, 0.03908007591962814, 0.024386534467339516, -0.05761329457163811, -0.029996339231729507, -0.035915885120630264, -0.11726922541856766, -0.009782165288925171, 0.0997375026345253, -0.0249633826315403, -0.03796718269586563, 0.05658339336514473, 0.044826604425907135, 0.08314438909292221, -0.11014215648174286, 0.0331878624856472, -0.05855364724993706, -0.06534840911626816, -0.016034863889217377, 0.002677812008187175, -0.003889987710863352, -0.0319722555577755, -0.10714472830295563, -0.06909053027629852, 0.02458318881690502, -0.02131875976920128, 0.043715059757232666, 0.005304013844579458, -0.006034977734088898, 0.07722453027963638, 0.0015622730134055018, -0.05141900107264519, 0.0022618977818638086, -0.05509362369775772, -0.012772861868143082, -0.02956799976527691, 0.024104783311486244, -0.025343408808112144, 0.05208270251750946, 0.054043304175138474, 0.008738735690712929, -0.0038565027061849833, -0.04093955457210541, -0.01712709665298462, -0.0719464123249054, 0.06530682742595673, -0.004008448217064142, 0.04660233482718468, 0.019477033987641335, -0.00412140553817153, 0.003073150059208274, -0.008666624315083027, 0.03321103751659393, -0.01861460506916046, 0.06254444271326065, 0.0358792208135128, 0.0011818987550213933, -0.02138214372098446, 0.0816279798746109, 0.0238629262894392, -0.07813800126314163, -0.020122824236750603, 0.13003191351890564, -0.014246649108827114, 0.012455631978809834, 0.08878719806671143, -0.0025891917757689953, -0.07710041850805283, -0.008412100374698639, -0.02417423576116562, 0.07543066889047623, -0.01889428310096264, 0.0035160044208168983, -0.08469651639461517, -0.05944305285811424, 0.06049126014113426, -0.04930749908089638, -0.059945426881313324, -0.010478154756128788, -0.013811435550451279, 0.09785693138837814, -0.023740369826555252, 0.04788070172071457, -0.020202502608299255, 0.02755150757730007, 0.08024020493030548, -0.0037542651407420635, -0.003040989860892296, -0.04496423155069351, 0.007102981675416231, 0.015467751771211624, 0.011193988844752312, -0.10065359622240067, -0.11672472953796387, -0.007500711362808943, -0.04909554123878479, -3.916844093510008e-08, 0.05770188942551613, 0.038828980177640915, 0.04173628240823746, 0.03673309087753296, 0.04816678166389465, 0.021089747548103333, 0.024425555020570755, 0.0637979805469513, 0.011191878467798233, 0.04713549464941025, 0.11315646767616272, -0.02735317125916481, 0.05403420329093933, 0.007475649006664753, 0.02583567425608635, -0.03613298013806343, -0.05250817537307739, -0.05594613775610924, -0.036026161164045334, -0.03637537360191345, -0.04320118948817253, 0.019324850291013718, -0.00971305463463068, -0.009871450252830982, -0.00497768260538578, 0.013113860972225666, 0.023277614265680313, 0.11838914453983307, -0.004442943260073662, -0.015289708971977234, 0.05791540443897247, -0.04173598811030388, -0.04182292893528938, -0.06998943537473679, 0.04858612269163132, -0.09004157036542892, -0.008434208109974861, 0.07052134722471237, -0.037781067192554474, -0.05418714880943298, 0.04572790116071701, 0.053970012813806534, -0.038469698280096054, 0.06505703926086426, -0.00790640152990818, -0.03147916495800018, -0.05006038770079613, 0.038330528885126114, 0.04503001272678375, 0.08656904846429825, 0.02979230508208275, 0.04129403457045555, -0.04855050891637802, 0.059702977538108826, -0.011890406720340252, -0.04696114733815193, 0.04003579542040825, -0.020794136449694633, -0.12697575986385345, 0.07243217527866364, 0.05959709361195564, -0.026326211169362068, 0.019343875348567963, -0.0882846787571907], "predicate_type": "association", "predicate": "is related to", "subject_type": "location", "object_type": "scientific_data"}', 'organic carbon stable isotopes'), ('The Paleocene', '{"context": "This relationship is illustrated in the deep-water basin by (1) a high accom- modation and deposition of a shale interval when coarse-grained terrigenous material was trapped upstream at the onset of the PETM, and (2) a considerable increase in sedi- ment supply during the PETM, which is archived as a particularly thick sedimentary section in the deep-sea fans of the GoM basin. The Paleocene\\u2013Eocene Thermal Maximum (PETM) (ca. 56 Ma) was a rapid global warming event characterized by the rise of temperatures to5\\u20139 \\u00b0C (Kennett and Stott, 1991), which caused substantial environmental changes around the globe.", "context_embeddings": [-0.010716593824326992, -0.020161522552371025, 0.11516858637332916, -0.016813287511467934, 0.005367173347622156, -0.039041679352521896, -0.10785308480262756, 0.05660011246800423, -0.054052840918302536, 0.02096092700958252, -0.03716977685689926, -0.08573389053344727, -0.02204674854874611, 0.015436275862157345, 0.01754988543689251, 0.00830248836427927, -0.05494903773069382, 0.0006390766357071698, 0.036576226353645325, -0.016171902418136597, 0.035359010100364685, 0.0783550962805748, -0.042406242340803146, -0.013257351703941822, -0.05269470438361168, 0.01701144315302372, -0.022892827168107033, 0.049928877502679825, 0.0182496290653944, 0.07782068848609924, -0.08476147055625916, 0.06292009353637695, 0.060134660452604294, -0.03296894207596779, 0.062124431133270264, 0.009127342142164707, -0.06904404610395432, -0.010243598371744156, -0.06075846403837204, 0.03503567352890968, -0.05262744054198265, -0.060323573648929596, 0.08791673183441162, 0.001714587095193565, -0.0973084419965744, 0.022928712889552116, 0.0584084689617157, -0.05662190914154053, -0.07256624102592468, 0.03464759513735771, 0.07321309298276901, 0.007374717853963375, -0.10289684683084488, 0.013611698523163795, -0.0688103437423706, -0.07901462912559509, -0.03488592058420181, -0.021386465057730675, -0.06369773298501968, -0.026627248153090477, 0.05717604607343674, 0.0469876192510128, -0.07648719847202301, -0.0167390089482069, 0.0981670618057251, 0.03501800447702408, 0.010618630796670914, -0.005690462421625853, -0.019869424402713776, 0.04339299723505974, 0.04809900000691414, 0.05793105065822601, 0.01685408502817154, -0.13796623051166534, 0.00973308365792036, -0.04453720152378082, -0.08877061307430267, 0.038251008838415146, 0.02796957641839981, -0.05579620599746704, 0.02699865587055683, 0.039417825639247894, 0.0993378534913063, -0.12028790265321732, -0.02950972132384777, -0.004855756182223558, 0.0396898128092289, 0.0451042540371418, 0.002141564851626754, 0.04569176211953163, -0.03384649381041527, 0.0020804584491997957, -0.036434106528759, 0.016658954322338104, 0.02542859874665737, 0.014207546599209309, -0.005491376854479313, 0.09846843779087067, 0.048250600695610046, -0.04735549911856651, -0.02596231736242771, 0.0527469664812088, -0.15105584263801575, 0.04463128745555878, 0.0802157074213028, -0.011425251141190529, 0.025348540395498276, 0.013043778017163277, 0.06955918669700623, 0.026419568806886673, -0.05516035109758377, -0.0249980129301548, 0.03150343894958496, -0.06676819920539856, 0.008695658296346664, -0.05451520159840584, -0.04262499883770943, 0.01417319942265749, -0.07952044159173965, -0.015964455902576447, -0.0627724900841713, -0.0003466531343292445, -0.042983535677194595, 0.0669320747256279, -0.04634090140461922, -0.006864557042717934, -0.006677747704088688, 2.474304946708045e-34, 0.09700274467468262, -0.020106254145503044, -0.06459879130125046, 0.02293786220252514, 0.020473776385188103, 0.022033363580703735, -0.02774304337799549, 0.017213527113199234, -0.13269777595996857, 0.022424383088946342, -0.056769922375679016, 0.0422510989010334, -0.008022066205739975, 0.03974060341715813, -0.03793394938111305, -0.06627033650875092, -0.06384662538766861, 0.04554082453250885, 0.01418501976877451, -0.08928849548101425, -0.05882896110415459, -0.012676597572863102, 0.027630962431430817, 0.0118849016726017, 0.033183503895998, -0.02657390385866165, 0.02540869452059269, -0.0014014713233336806, -0.05950054153800011, -0.02745611034333706, -0.013320564292371273, -0.12455897778272629, -0.05156319960951805, -0.015272839926183224, 0.06910017877817154, -0.019522015005350113, 0.008266210556030273, -0.024272456765174866, -0.025162311270833015, 0.06820869445800781, 0.08810942620038986, -0.07232502847909927, 0.07662346214056015, -0.025027360767126083, -0.013629288412630558, -0.03209386765956879, 0.04369237646460533, 0.05721977725625038, 0.01003225613385439, 0.025278549641370773, -0.018943440169095993, 0.018747784197330475, -0.0416891947388649, 0.0400390662252903, -0.07339975237846375, -0.006022857967764139, 0.04159718379378319, -0.0678531602025032, -0.030261164531111717, 0.016977433115243912, -0.03419658541679382, 0.0688537210226059, 0.02708701230585575, -0.01464147586375475, 0.06377949565649033, 0.12633803486824036, -0.006655441131442785, 0.008472656831145287, 0.03034655936062336, 0.047782257199287415, -0.038887251168489456, -0.048190802335739136, 0.011894305236637592, 0.00970424897968769, 0.014225037768483162, 0.011782987043261528, 0.08502735197544098, -0.005886628292500973, -0.028673700988292694, 0.04903190955519676, -0.03385348245501518, 0.07048828899860382, -0.02073472924530506, -0.07295194268226624, -0.0942830890417099, 0.0146455317735672, 0.06515070050954819, 0.023736923933029175, 0.09027916193008423, 0.12113428860902786, -0.05902266874909401, -0.041011910885572433, 0.08274460583925247, -0.019124751910567284, 0.005394884385168552, -4.160007926825361e-34, 0.06856311112642288, -0.029283028095960617, -0.10168097168207169, 0.018352577462792397, -0.04352543130517006, -0.09465429931879044, 0.02164279669523239, 0.11064838618040085, -0.008572693914175034, -0.013213292695581913, 0.06804550439119339, 0.06195580214262009, 0.13890765607357025, -0.07499177753925323, -0.006158274598419666, -0.03739805519580841, -0.030847197398543358, -0.021436696872115135, 0.058760866522789, -0.03285476565361023, -0.0047295489348471165, -0.03355090320110321, -0.042967699468135834, -0.0018072728998959064, -0.08028338104486465, 0.06220734864473343, 0.028018765151500702, -0.02988685481250286, 0.0011860145023092628, 0.01524304784834385, -0.08135531097650528, 0.05529318004846573, -0.08079557120800018, 0.005188057664781809, -0.09696334600448608, 0.05825292691588402, 0.0200999453663826, -0.00669030612334609, -0.005224473774433136, -0.03957435116171837, 0.018082577735185623, -0.008086444810032845, -0.0037287145387381315, -0.0015846480382606387, 0.07042630761861801, -0.013229847885668278, 0.020325325429439545, 0.06404583901166916, 0.04989204928278923, 0.039517179131507874, 0.026225866749882698, -0.04130375757813454, -0.007860640063881874, -0.013943071477115154, -0.0015007127076387405, 0.003515099873766303, -0.057879816740751266, 0.028558189049363136, -0.09205809235572815, -0.05222838371992111, 0.05418161302804947, 0.06094224378466606, -0.011368782259523869, 0.011961582116782665, 0.060503315180540085, -0.025518519803881645, -0.07388006895780563, -0.004490128252655268, 0.009139645844697952, 0.03564498946070671, 0.010911980643868446, 0.024656610563397408, -0.025502147153019905, -0.0053815837018191814, 0.10889345407485962, -0.05592627078294754, -0.014813662506639957, 0.04772782325744629, 0.037398625165224075, 0.0579819455742836, -0.042791564017534256, 0.05148908123373985, 0.006621192675083876, 0.0762915313243866, 0.08969224244356155, 0.01699560321867466, -0.003387253964319825, -0.0238681398332119, 0.03442677482962608, -0.03092275559902191, 0.0056114960461854935, -0.10453016310930252, -0.032945841550827026, 0.02749592810869217, -0.024341154843568802, -4.181420720783535e-08, 0.03776130452752113, 0.012810415588319302, 0.009668500162661076, 0.05111696198582649, 0.08230004459619522, -0.047404464334249496, 0.03418678790330887, 0.06566792726516724, 0.06165896728634834, 0.012577895075082779, 0.06647603958845139, -0.027014223858714104, 0.030331598594784737, -0.011293028481304646, 0.032276302576065063, -0.014517036266624928, 0.016116788610816002, -0.05961145460605621, -0.02211984060704708, -0.02558651939034462, -0.02335376664996147, -0.0022676298394799232, 0.02988462708890438, 0.010238081216812134, 0.057079385966062546, 0.021087460219860077, 0.09519463777542114, 0.08144110441207886, -0.06912324577569962, -0.03271108120679855, -0.013029323890805244, -0.06415765732526779, -0.06799512356519699, -0.05786263942718506, 0.07875660806894302, -0.029477205127477646, 0.02489212527871132, 0.09116057306528091, 0.01050265971571207, -0.05220010131597519, -0.01963125541806221, 0.07111731916666031, 0.020367512479424477, 0.04189296439290047, -0.021163873374462128, -0.014691240154206753, -0.07427156716585159, 0.022980060428380966, 0.025568490847945213, 0.026992440223693848, 0.00937937293201685, 0.09566057473421097, 0.0699271559715271, 0.03341803699731827, 0.006682462990283966, -0.020194217562675476, 0.011685309931635857, 0.013514537364244461, -0.08164742588996887, 0.11974445730447769, 0.0057155373506248, -0.021615181118249893, 0.0028130693826824427, -0.06747741997241974], "predicate_type": "association", "predicate": "is associated with", "subject_type": "entity", "object_type": "event"}', 'Eocene Thermal Maximum'), ('The Paleocene', '{"context": "This relationship is illustrated in the deep-water basin by (1) a high accom- modation and deposition of a shale interval when coarse-grained terrigenous material was trapped upstream at the onset of the PETM, and (2) a considerable increase in sedi- ment supply during the PETM, which is archived as a particularly thick sedimentary section in the deep-sea fans of the GoM basin. The Paleocene\\u2013Eocene Thermal Maximum (PETM) (ca. 56 Ma) was a rapid global warming event characterized by the rise of temperatures to5\\u20139 \\u00b0C (Kennett and Stott, 1991), which caused substantial environmental changes around the globe.", "context_embeddings": [-0.010716593824326992, -0.020161522552371025, 0.11516858637332916, -0.016813287511467934, 0.005367173347622156, -0.039041679352521896, -0.10785308480262756, 0.05660011246800423, -0.054052840918302536, 0.02096092700958252, -0.03716977685689926, -0.08573389053344727, -0.02204674854874611, 0.015436275862157345, 0.01754988543689251, 0.00830248836427927, -0.05494903773069382, 0.0006390766357071698, 0.036576226353645325, -0.016171902418136597, 0.035359010100364685, 0.0783550962805748, -0.042406242340803146, -0.013257351703941822, -0.05269470438361168, 0.01701144315302372, -0.022892827168107033, 0.049928877502679825, 0.0182496290653944, 0.07782068848609924, -0.08476147055625916, 0.06292009353637695, 0.060134660452604294, -0.03296894207596779, 0.062124431133270264, 0.009127342142164707, -0.06904404610395432, -0.010243598371744156, -0.06075846403837204, 0.03503567352890968, -0.05262744054198265, -0.060323573648929596, 0.08791673183441162, 0.001714587095193565, -0.0973084419965744, 0.022928712889552116, 0.0584084689617157, -0.05662190914154053, -0.07256624102592468, 0.03464759513735771, 0.07321309298276901, 0.007374717853963375, -0.10289684683084488, 0.013611698523163795, -0.0688103437423706, -0.07901462912559509, -0.03488592058420181, -0.021386465057730675, -0.06369773298501968, -0.026627248153090477, 0.05717604607343674, 0.0469876192510128, -0.07648719847202301, -0.0167390089482069, 0.0981670618057251, 0.03501800447702408, 0.010618630796670914, -0.005690462421625853, -0.019869424402713776, 0.04339299723505974, 0.04809900000691414, 0.05793105065822601, 0.01685408502817154, -0.13796623051166534, 0.00973308365792036, -0.04453720152378082, -0.08877061307430267, 0.038251008838415146, 0.02796957641839981, -0.05579620599746704, 0.02699865587055683, 0.039417825639247894, 0.0993378534913063, -0.12028790265321732, -0.02950972132384777, -0.004855756182223558, 0.0396898128092289, 0.0451042540371418, 0.002141564851626754, 0.04569176211953163, -0.03384649381041527, 0.0020804584491997957, -0.036434106528759, 0.016658954322338104, 0.02542859874665737, 0.014207546599209309, -0.005491376854479313, 0.09846843779087067, 0.048250600695610046, -0.04735549911856651, -0.02596231736242771, 0.0527469664812088, -0.15105584263801575, 0.04463128745555878, 0.0802157074213028, -0.011425251141190529, 0.025348540395498276, 0.013043778017163277, 0.06955918669700623, 0.026419568806886673, -0.05516035109758377, -0.0249980129301548, 0.03150343894958496, -0.06676819920539856, 0.008695658296346664, -0.05451520159840584, -0.04262499883770943, 0.01417319942265749, -0.07952044159173965, -0.015964455902576447, -0.0627724900841713, -0.0003466531343292445, -0.042983535677194595, 0.0669320747256279, -0.04634090140461922, -0.006864557042717934, -0.006677747704088688, 2.474304946708045e-34, 0.09700274467468262, -0.020106254145503044, -0.06459879130125046, 0.02293786220252514, 0.020473776385188103, 0.022033363580703735, -0.02774304337799549, 0.017213527113199234, -0.13269777595996857, 0.022424383088946342, -0.056769922375679016, 0.0422510989010334, -0.008022066205739975, 0.03974060341715813, -0.03793394938111305, -0.06627033650875092, -0.06384662538766861, 0.04554082453250885, 0.01418501976877451, -0.08928849548101425, -0.05882896110415459, -0.012676597572863102, 0.027630962431430817, 0.0118849016726017, 0.033183503895998, -0.02657390385866165, 0.02540869452059269, -0.0014014713233336806, -0.05950054153800011, -0.02745611034333706, -0.013320564292371273, -0.12455897778272629, -0.05156319960951805, -0.015272839926183224, 0.06910017877817154, -0.019522015005350113, 0.008266210556030273, -0.024272456765174866, -0.025162311270833015, 0.06820869445800781, 0.08810942620038986, -0.07232502847909927, 0.07662346214056015, -0.025027360767126083, -0.013629288412630558, -0.03209386765956879, 0.04369237646460533, 0.05721977725625038, 0.01003225613385439, 0.025278549641370773, -0.018943440169095993, 0.018747784197330475, -0.0416891947388649, 0.0400390662252903, -0.07339975237846375, -0.006022857967764139, 0.04159718379378319, -0.0678531602025032, -0.030261164531111717, 0.016977433115243912, -0.03419658541679382, 0.0688537210226059, 0.02708701230585575, -0.01464147586375475, 0.06377949565649033, 0.12633803486824036, -0.006655441131442785, 0.008472656831145287, 0.03034655936062336, 0.047782257199287415, -0.038887251168489456, -0.048190802335739136, 0.011894305236637592, 0.00970424897968769, 0.014225037768483162, 0.011782987043261528, 0.08502735197544098, -0.005886628292500973, -0.028673700988292694, 0.04903190955519676, -0.03385348245501518, 0.07048828899860382, -0.02073472924530506, -0.07295194268226624, -0.0942830890417099, 0.0146455317735672, 0.06515070050954819, 0.023736923933029175, 0.09027916193008423, 0.12113428860902786, -0.05902266874909401, -0.041011910885572433, 0.08274460583925247, -0.019124751910567284, 0.005394884385168552, -4.160007926825361e-34, 0.06856311112642288, -0.029283028095960617, -0.10168097168207169, 0.018352577462792397, -0.04352543130517006, -0.09465429931879044, 0.02164279669523239, 0.11064838618040085, -0.008572693914175034, -0.013213292695581913, 0.06804550439119339, 0.06195580214262009, 0.13890765607357025, -0.07499177753925323, -0.006158274598419666, -0.03739805519580841, -0.030847197398543358, -0.021436696872115135, 0.058760866522789, -0.03285476565361023, -0.0047295489348471165, -0.03355090320110321, -0.042967699468135834, -0.0018072728998959064, -0.08028338104486465, 0.06220734864473343, 0.028018765151500702, -0.02988685481250286, 0.0011860145023092628, 0.01524304784834385, -0.08135531097650528, 0.05529318004846573, -0.08079557120800018, 0.005188057664781809, -0.09696334600448608, 0.05825292691588402, 0.0200999453663826, -0.00669030612334609, -0.005224473774433136, -0.03957435116171837, 0.018082577735185623, -0.008086444810032845, -0.0037287145387381315, -0.0015846480382606387, 0.07042630761861801, -0.013229847885668278, 0.020325325429439545, 0.06404583901166916, 0.04989204928278923, 0.039517179131507874, 0.026225866749882698, -0.04130375757813454, -0.007860640063881874, -0.013943071477115154, -0.0015007127076387405, 0.003515099873766303, -0.057879816740751266, 0.028558189049363136, -0.09205809235572815, -0.05222838371992111, 0.05418161302804947, 0.06094224378466606, -0.011368782259523869, 0.011961582116782665, 0.060503315180540085, -0.025518519803881645, -0.07388006895780563, -0.004490128252655268, 0.009139645844697952, 0.03564498946070671, 0.010911980643868446, 0.024656610563397408, -0.025502147153019905, -0.0053815837018191814, 0.10889345407485962, -0.05592627078294754, -0.014813662506639957, 0.04772782325744629, 0.037398625165224075, 0.0579819455742836, -0.042791564017534256, 0.05148908123373985, 0.006621192675083876, 0.0762915313243866, 0.08969224244356155, 0.01699560321867466, -0.003387253964319825, -0.0238681398332119, 0.03442677482962608, -0.03092275559902191, 0.0056114960461854935, -0.10453016310930252, -0.032945841550827026, 0.02749592810869217, -0.024341154843568802, -4.181420720783535e-08, 0.03776130452752113, 0.012810415588319302, 0.009668500162661076, 0.05111696198582649, 0.08230004459619522, -0.047404464334249496, 0.03418678790330887, 0.06566792726516724, 0.06165896728634834, 0.012577895075082779, 0.06647603958845139, -0.027014223858714104, 0.030331598594784737, -0.011293028481304646, 0.032276302576065063, -0.014517036266624928, 0.016116788610816002, -0.05961145460605621, -0.02211984060704708, -0.02558651939034462, -0.02335376664996147, -0.0022676298394799232, 0.02988462708890438, 0.010238081216812134, 0.057079385966062546, 0.021087460219860077, 0.09519463777542114, 0.08144110441207886, -0.06912324577569962, -0.03271108120679855, -0.013029323890805244, -0.06415765732526779, -0.06799512356519699, -0.05786263942718506, 0.07875660806894302, -0.029477205127477646, 0.02489212527871132, 0.09116057306528091, 0.01050265971571207, -0.05220010131597519, -0.01963125541806221, 0.07111731916666031, 0.020367512479424477, 0.04189296439290047, -0.021163873374462128, -0.014691240154206753, -0.07427156716585159, 0.022980060428380966, 0.025568490847945213, 0.026992440223693848, 0.00937937293201685, 0.09566057473421097, 0.0699271559715271, 0.03341803699731827, 0.006682462990283966, -0.020194217562675476, 0.011685309931635857, 0.013514537364244461, -0.08164742588996887, 0.11974445730447769, 0.0057155373506248, -0.021615181118249893, 0.0028130693826824427, -0.06747741997241974], "predicate_type": "has_object", "predicate": "is associated with", "subject_type": "event", "object_type": "geological_event"}', '(PETM)'), ('Eocene Thermal Maximum', '{"context": "This relationship is illustrated in the deep-water basin by (1) a high accom- modation and deposition of a shale interval when coarse-grained terrigenous material was trapped upstream at the onset of the PETM, and (2) a considerable increase in sedi- ment supply during the PETM, which is archived as a particularly thick sedimentary section in the deep-sea fans of the GoM basin. The Paleocene\\u2013Eocene Thermal Maximum (PETM) (ca. 56 Ma) was a rapid global warming event characterized by the rise of temperatures to5\\u20139 \\u00b0C (Kennett and Stott, 1991), which caused substantial environmental changes around the globe.", "context_embeddings": [-0.010716593824326992, -0.020161522552371025, 0.11516858637332916, -0.016813287511467934, 0.005367173347622156, -0.039041679352521896, -0.10785308480262756, 0.05660011246800423, -0.054052840918302536, 0.02096092700958252, -0.03716977685689926, -0.08573389053344727, -0.02204674854874611, 0.015436275862157345, 0.01754988543689251, 0.00830248836427927, -0.05494903773069382, 0.0006390766357071698, 0.036576226353645325, -0.016171902418136597, 0.035359010100364685, 0.0783550962805748, -0.042406242340803146, -0.013257351703941822, -0.05269470438361168, 0.01701144315302372, -0.022892827168107033, 0.049928877502679825, 0.0182496290653944, 0.07782068848609924, -0.08476147055625916, 0.06292009353637695, 0.060134660452604294, -0.03296894207596779, 0.062124431133270264, 0.009127342142164707, -0.06904404610395432, -0.010243598371744156, -0.06075846403837204, 0.03503567352890968, -0.05262744054198265, -0.060323573648929596, 0.08791673183441162, 0.001714587095193565, -0.0973084419965744, 0.022928712889552116, 0.0584084689617157, -0.05662190914154053, -0.07256624102592468, 0.03464759513735771, 0.07321309298276901, 0.007374717853963375, -0.10289684683084488, 0.013611698523163795, -0.0688103437423706, -0.07901462912559509, -0.03488592058420181, -0.021386465057730675, -0.06369773298501968, -0.026627248153090477, 0.05717604607343674, 0.0469876192510128, -0.07648719847202301, -0.0167390089482069, 0.0981670618057251, 0.03501800447702408, 0.010618630796670914, -0.005690462421625853, -0.019869424402713776, 0.04339299723505974, 0.04809900000691414, 0.05793105065822601, 0.01685408502817154, -0.13796623051166534, 0.00973308365792036, -0.04453720152378082, -0.08877061307430267, 0.038251008838415146, 0.02796957641839981, -0.05579620599746704, 0.02699865587055683, 0.039417825639247894, 0.0993378534913063, -0.12028790265321732, -0.02950972132384777, -0.004855756182223558, 0.0396898128092289, 0.0451042540371418, 0.002141564851626754, 0.04569176211953163, -0.03384649381041527, 0.0020804584491997957, -0.036434106528759, 0.016658954322338104, 0.02542859874665737, 0.014207546599209309, -0.005491376854479313, 0.09846843779087067, 0.048250600695610046, -0.04735549911856651, -0.02596231736242771, 0.0527469664812088, -0.15105584263801575, 0.04463128745555878, 0.0802157074213028, -0.011425251141190529, 0.025348540395498276, 0.013043778017163277, 0.06955918669700623, 0.026419568806886673, -0.05516035109758377, -0.0249980129301548, 0.03150343894958496, -0.06676819920539856, 0.008695658296346664, -0.05451520159840584, -0.04262499883770943, 0.01417319942265749, -0.07952044159173965, -0.015964455902576447, -0.0627724900841713, -0.0003466531343292445, -0.042983535677194595, 0.0669320747256279, -0.04634090140461922, -0.006864557042717934, -0.006677747704088688, 2.474304946708045e-34, 0.09700274467468262, -0.020106254145503044, -0.06459879130125046, 0.02293786220252514, 0.020473776385188103, 0.022033363580703735, -0.02774304337799549, 0.017213527113199234, -0.13269777595996857, 0.022424383088946342, -0.056769922375679016, 0.0422510989010334, -0.008022066205739975, 0.03974060341715813, -0.03793394938111305, -0.06627033650875092, -0.06384662538766861, 0.04554082453250885, 0.01418501976877451, -0.08928849548101425, -0.05882896110415459, -0.012676597572863102, 0.027630962431430817, 0.0118849016726017, 0.033183503895998, -0.02657390385866165, 0.02540869452059269, -0.0014014713233336806, -0.05950054153800011, -0.02745611034333706, -0.013320564292371273, -0.12455897778272629, -0.05156319960951805, -0.015272839926183224, 0.06910017877817154, -0.019522015005350113, 0.008266210556030273, -0.024272456765174866, -0.025162311270833015, 0.06820869445800781, 0.08810942620038986, -0.07232502847909927, 0.07662346214056015, -0.025027360767126083, -0.013629288412630558, -0.03209386765956879, 0.04369237646460533, 0.05721977725625038, 0.01003225613385439, 0.025278549641370773, -0.018943440169095993, 0.018747784197330475, -0.0416891947388649, 0.0400390662252903, -0.07339975237846375, -0.006022857967764139, 0.04159718379378319, -0.0678531602025032, -0.030261164531111717, 0.016977433115243912, -0.03419658541679382, 0.0688537210226059, 0.02708701230585575, -0.01464147586375475, 0.06377949565649033, 0.12633803486824036, -0.006655441131442785, 0.008472656831145287, 0.03034655936062336, 0.047782257199287415, -0.038887251168489456, -0.048190802335739136, 0.011894305236637592, 0.00970424897968769, 0.014225037768483162, 0.011782987043261528, 0.08502735197544098, -0.005886628292500973, -0.028673700988292694, 0.04903190955519676, -0.03385348245501518, 0.07048828899860382, -0.02073472924530506, -0.07295194268226624, -0.0942830890417099, 0.0146455317735672, 0.06515070050954819, 0.023736923933029175, 0.09027916193008423, 0.12113428860902786, -0.05902266874909401, -0.041011910885572433, 0.08274460583925247, -0.019124751910567284, 0.005394884385168552, -4.160007926825361e-34, 0.06856311112642288, -0.029283028095960617, -0.10168097168207169, 0.018352577462792397, -0.04352543130517006, -0.09465429931879044, 0.02164279669523239, 0.11064838618040085, -0.008572693914175034, -0.013213292695581913, 0.06804550439119339, 0.06195580214262009, 0.13890765607357025, -0.07499177753925323, -0.006158274598419666, -0.03739805519580841, -0.030847197398543358, -0.021436696872115135, 0.058760866522789, -0.03285476565361023, -0.0047295489348471165, -0.03355090320110321, -0.042967699468135834, -0.0018072728998959064, -0.08028338104486465, 0.06220734864473343, 0.028018765151500702, -0.02988685481250286, 0.0011860145023092628, 0.01524304784834385, -0.08135531097650528, 0.05529318004846573, -0.08079557120800018, 0.005188057664781809, -0.09696334600448608, 0.05825292691588402, 0.0200999453663826, -0.00669030612334609, -0.005224473774433136, -0.03957435116171837, 0.018082577735185623, -0.008086444810032845, -0.0037287145387381315, -0.0015846480382606387, 0.07042630761861801, -0.013229847885668278, 0.020325325429439545, 0.06404583901166916, 0.04989204928278923, 0.039517179131507874, 0.026225866749882698, -0.04130375757813454, -0.007860640063881874, -0.013943071477115154, -0.0015007127076387405, 0.003515099873766303, -0.057879816740751266, 0.028558189049363136, -0.09205809235572815, -0.05222838371992111, 0.05418161302804947, 0.06094224378466606, -0.011368782259523869, 0.011961582116782665, 0.060503315180540085, -0.025518519803881645, -0.07388006895780563, -0.004490128252655268, 0.009139645844697952, 0.03564498946070671, 0.010911980643868446, 0.024656610563397408, -0.025502147153019905, -0.0053815837018191814, 0.10889345407485962, -0.05592627078294754, -0.014813662506639957, 0.04772782325744629, 0.037398625165224075, 0.0579819455742836, -0.042791564017534256, 0.05148908123373985, 0.006621192675083876, 0.0762915313243866, 0.08969224244356155, 0.01699560321867466, -0.003387253964319825, -0.0238681398332119, 0.03442677482962608, -0.03092275559902191, 0.0056114960461854935, -0.10453016310930252, -0.032945841550827026, 0.02749592810869217, -0.024341154843568802, -4.181420720783535e-08, 0.03776130452752113, 0.012810415588319302, 0.009668500162661076, 0.05111696198582649, 0.08230004459619522, -0.047404464334249496, 0.03418678790330887, 0.06566792726516724, 0.06165896728634834, 0.012577895075082779, 0.06647603958845139, -0.027014223858714104, 0.030331598594784737, -0.011293028481304646, 0.032276302576065063, -0.014517036266624928, 0.016116788610816002, -0.05961145460605621, -0.02211984060704708, -0.02558651939034462, -0.02335376664996147, -0.0022676298394799232, 0.02988462708890438, 0.010238081216812134, 0.057079385966062546, 0.021087460219860077, 0.09519463777542114, 0.08144110441207886, -0.06912324577569962, -0.03271108120679855, -0.013029323890805244, -0.06415765732526779, -0.06799512356519699, -0.05786263942718506, 0.07875660806894302, -0.029477205127477646, 0.02489212527871132, 0.09116057306528091, 0.01050265971571207, -0.05220010131597519, -0.01963125541806221, 0.07111731916666031, 0.020367512479424477, 0.04189296439290047, -0.021163873374462128, -0.014691240154206753, -0.07427156716585159, 0.022980060428380966, 0.025568490847945213, 0.026992440223693848, 0.00937937293201685, 0.09566057473421097, 0.0699271559715271, 0.03341803699731827, 0.006682462990283966, -0.020194217562675476, 0.011685309931635857, 0.013514537364244461, -0.08164742588996887, 0.11974445730447769, 0.0057155373506248, -0.021615181118249893, 0.0028130693826824427, -0.06747741997241974], "predicate_type": "caused", "predicate": "caused", "subject_type": "event", "object_type": "environmental_change"}', 'Paleocene-Eocene Thermal Maximum (PETM)')] + print(extractor.process_predicate_types(sample_text)) +if __name__ == "__main__": + main() + + diff --git a/querent/kg/ner_helperfunctions/ner_llm_transformer.py b/querent/kg/ner_helperfunctions/ner_llm_transformer.py index 4b8170ed..9476d4d8 100644 --- a/querent/kg/ner_helperfunctions/ner_llm_transformer.py +++ b/querent/kg/ner_helperfunctions/ner_llm_transformer.py @@ -256,14 +256,38 @@ def extract_binary_pairs(self, entities: List[dict], tokens: List[str], all_sent self.logger.error(f"Error extracting binary pairs: {e}") raise(f"Error extracting binary pairs: {e}") return binary_pairs + + def extract_fixed_entities_from_chunk(self, chunk: List[str], fixed_entities: List[str], default_label='User', default_score=1.0): + results = [] + try: + for idx, token in enumerate(chunk): + for entity in fixed_entities: + if token.lower() == entity.lower(): # Case insensitive comparison + entity_info = { + "entity": token.lower(), + "label": default_label, + "score": default_score, + "start_idx": idx + } + results.append(entity_info) + except Exception as e: + self.logger.error(f"Error extracting fixed entities from chunk: {e}") + raise Exception(f"Error extracting fixed entities from chunk: {e}") + + return results - def extract_entities_from_sentence(self, sentence: str, sentence_idx: int, all_sentences: List[str]): + def extract_entities_from_sentence(self, sentence: str, sentence_idx: int, all_sentences: List[str], fixed_entities_flag: bool, fixed_entities: List[str]): try: tokens = self.tokenize_sentence(sentence) chunks = self.get_chunks(tokens) all_entities = [] for chunk in chunks: - entities = self.extract_entities_from_chunk(chunk) + if fixed_entities_flag == False: + entities = self.extract_entities_from_chunk(chunk) + else: + print("Extracting entities from chunk..........") + entities = self.extract_fixed_entities_from_chunk(chunk,fixed_entities) + print("entities: {}".format(entities)) all_entities.extend(entities) final_entities = self.combine_entities_wordpiece(all_entities, tokens) parsed_entities = Dependency_Parsing(entities=final_entities, sentence=sentence) diff --git a/querent/kg/rel_helperfunctions/triple_to_json.py b/querent/kg/rel_helperfunctions/triple_to_json.py index 55ee8670..f1d83e78 100644 --- a/querent/kg/rel_helperfunctions/triple_to_json.py +++ b/querent/kg/rel_helperfunctions/triple_to_json.py @@ -70,4 +70,6 @@ def convert_vectorjson(triple): return json_object except Exception as e: raise Exception(f"Error in convert_vectorjson: {e}") - + + + diff --git a/tests/llm_tests/bert_llm_test.py b/tests/llm_tests/bert_llm_test.py index 83e7ea34..fa56a5f6 100644 --- a/tests/llm_tests/bert_llm_test.py +++ b/tests/llm_tests/bert_llm_test.py @@ -24,7 +24,8 @@ modation and deposition of a shale interval when coarse-grained terrigenous material was trapped upstream at the onset of the PETM, and (2) a considerable increase in sedi- ment supply during the PETM, which is archived as a particularly thick sedimentary -section in the deep-sea fans of the GoM basin.""","botryan96/GeoBERT", BERTLLM, ["tectonic perturbations","downstream sectors"], True)]) +section in the deep-sea fans of the GoM basin. The Paleocene–Eocene Thermal Maximum (PETM) (ca. 56 Ma) was a rapid global warming event characterized by the rise of temperatures to5–9 °C (Kennett and Stott, 1991), which caused substantial environmental changes around the globe.""", +"botryan96/GeoBERT", BERTLLM, ["tectonic perturbations","downstream sectors"], True)]) @@ -46,17 +47,20 @@ async def test_bertllm_ner_tokenization_and_entity_extraction(input_data, ner_mo 'min_samples': 3, 'cluster_persistence_threshold':0.2 } + # ,fixed_entities = ['eocene', 'mexico'] + , sample_entities=['B-GeoTime', 'B-GeoLoc'] + , fixed_relationships=["constraint"] + , sample_relationships=["location", "locatedin"] ) llm_instance = llm_class(input_queue, bert_llm_config) class StateChangeCallback(EventCallbackInterface): async def handle_event(self, event_type: EventType, event_state: EventState): assert event_state.event_type == EventType.Graph triple = event_state.payload + print("--------------------------------", triple) + print("-----------------------inside assertion") assert triple['subject'] == 'tectonic perturbations' or triple['subject'] == 'deposition' - - llm_instance.subscribe(EventType.Graph, StateChangeCallback()) - # llm_instance.subscribe(EventType.RdfSemanticTriples, StateChangeCallback()) querent = Querent( [llm_instance], resource_manager=resource_manager, diff --git a/tests/llm_tests/mock_llm_test.py b/tests/llm_tests/mock_llm_test.py index 55e2de1b..24eac9c6 100644 --- a/tests/llm_tests/mock_llm_test.py +++ b/tests/llm_tests/mock_llm_test.py @@ -21,7 +21,7 @@ def __init__(self, input_queue: QuerentQueue): super().__init__(input_queue) async def process_tokens(self, data: IngestedTokens): - await super().process_tokens(data) + # await super().process_tokens(data) if data is None or data.is_error(): # the LLM developer can raise an error here or do something else # the developers of Querent can customize the behavior of Querent @@ -33,7 +33,7 @@ async def process_tokens(self, data: IngestedTokens): # can set the state of the LLM using the set_state method # The state of the LLM is stored in the state attribute of the LLM # The state of the LLM is published to subscribers of the LLM - current_state = EventState(EventType.ContextualTriples, 1.0, "anything") + current_state = EventState(EventType.Graph, 1.0, "anything", "dummy.txt") await self.set_state(new_state=current_state) async def process_code(self, data: IngestedCode): @@ -70,11 +70,11 @@ class StateChangeCallback(EventCallbackInterface): async def handle_event(self, event_type: EventType, event_state: EventState): print(f"New state: {event_state}") print(f"New state type: {event_type}") - assert event_state.event_type == EventType.ContextualTriples + assert event_state.event_type == EventType.Graph # Subscribe to state change events # This pattern is ideal as we can expose multiple events for each use case of the LLM - llm_mocker.subscribe(EventType.ContextualTriples, StateChangeCallback()) + llm_mocker.subscribe(EventType.Graph, StateChangeCallback()) ## one can also subscribe to other events, e.g. EventType.CHAT_COMPLETION ...