From 642f5b84216529be164521a5486572fa4030517a Mon Sep 17 00:00:00 2001 From: Vincent Raymond Date: Fri, 14 Jul 2023 09:17:18 -0400 Subject: [PATCH 1/4] [code2fn] - Support for Fortran Record Idiom and TS2CAST enchancements (#329) ### **Refactoring pipeline to work directly on tree-sitter nodes:** Previously, we were generating our own Dict tree based off of the tree-sitter parse tree. This allowed us to make a few quality of life optimizations such as removing nodes representing control characters like '+' and '=='. The code has now been refactored to remove this step. This change decreases processing time and will make it easier to support other tree-sitter languages in the future. In its place, multiple helper functions have been defined in node_helper.py to better support working with tree-sitter Node objects. ### **Moving tree-sitter parsing out of preprocessor:** The tree-sitter parsing of the Fortran source code has been moved out of the preprocessor and into ts2cast.py. Overall, it makes more sense for the preprocessor to return source code rather than a parse tree. ### **Adds supports for Record Idiom:** We are now support generating CAST for the Record idiom in Fortran. Specifically, the record idiom shows up as a Derived Type. ``` Fortran type, public :: Circle real :: radius contains procedure :: area => circle_area procedure :: print => circle_print end type Circle ``` ### **Adds support for multi-module CAST output:** Previously, there was a 1->1 relationship between source file and CAST module. However, with the addition of the Record idioms, the following are now being processed as their own CAST module: - Module body - Program body - Functions defined outside of module/program The source->Gromet frontends have also been updated to support this change. --- skema/program_analysis/TS2CAST/node_helper.py | 145 ++- .../TS2CAST/preprocessor/preprocess.py | 157 +-- skema/program_analysis/TS2CAST/ts2cast.py | 1116 +++++++++++------ skema/program_analysis/TS2CAST/util.py | 16 +- .../TS2CAST/variable_context.py | 61 +- skema/program_analysis/multi_file_ingester.py | 89 +- 6 files changed, 951 insertions(+), 633 deletions(-) diff --git a/skema/program_analysis/TS2CAST/node_helper.py b/skema/program_analysis/TS2CAST/node_helper.py index 5ec26325860..31dab49d1a8 100644 --- a/skema/program_analysis/TS2CAST/node_helper.py +++ b/skema/program_analysis/TS2CAST/node_helper.py @@ -1,76 +1,53 @@ from typing import List, Dict from skema.program_analysis.CAST2FN.model.cast import SourceRef - -class NodeHelper(object): - def __init__(self, source_file_name: str, source: str): - self.source_file_name = source_file_name +from tree_sitter import Node + +CONTROL_CHARACTERS = [ + ",", + "=", + "==", + "(", + ")", + "(/", + "/)", + ":", + "::", + "+", + "-", + "*", + "**", + "/", + ">", + "<", + "<=", + ">=", + "only", +] + +class NodeHelper(): + def __init__(self, source: str, source_file_name: str): self.source = source + self.source_file_name = source_file_name - def parse_tree_to_dict(self, node) -> Dict: - node_dict = { - "type": self.get_node_type(node), - "source_refs": [self.get_node_source_ref(node)], - "identifier": self.get_node_identifier(node), - "original_children_order": [], - "children": [], - "comments": [], - "control": [], - } - for child in node.children: - child_dict = self.parse_tree_to_dict(child) - node_dict["original_children_order"].append(child_dict) - if self.is_comment_node(child): - node_dict["comments"].append(child_dict) - elif self.is_control_character_node(child): - node_dict["control"].append(child_dict) - else: - node_dict["children"].append(child_dict) - - return node_dict - - def is_comment_node(self, node): - if node.type == "comment": - return True - return False - - def is_control_character_node(self, node): - control_characters = [ - ",", - "=", - "(", - ")", - ":", - "::", - "+", - "-", - "*", - "**", - "/", - ">", - "<", - "<=", - ">=", - ] - return node.type in control_characters - - def get_node_source_ref(self, node) -> SourceRef: + def get_source_ref(self, node: Node) -> SourceRef: + """Given a node and file name, return a CAST SourceRef object.""" row_start, col_start = node.start_point row_end, col_end = node.end_point return SourceRef(self.source_file_name, col_start, col_end, row_start, row_end) - def get_node_identifier(self, node) -> str: - source_ref = self.get_node_source_ref(node) + def get_identifier(self, node: Node) -> str: + """Given a node, return the identifier it represents. ie. The code between node.start_point and node.end_point""" line_num = 0 column_num = 0 in_identifier = False identifier = "" for i, char in enumerate(self.source): - if line_num == source_ref.row_start and column_num == source_ref.col_start: + if line_num == node.start_point[0] and column_num == node.start_point[1]: in_identifier = True - elif line_num == source_ref.row_end and column_num == source_ref.col_end: + elif line_num == node.end_point[0] and column_num == node.end_point[1]: break if char == "\n": @@ -84,19 +61,51 @@ def get_node_identifier(self, node) -> str: return identifier - def get_node_type(self, node) -> str: - return node.type +def get_first_child_by_type(node: Node, type: str, recurse=False): + """Takes in a node and a type string as inputs and returns the first child matching that type. Otherwise, return None + When the recurse argument is set, it will also recursivly search children nodes as well. + """ + for child in node.children: + if child.type == type: + return child + + if recurse: + for child in node.children: + out = get_first_child_by_type(child, type, True) + if out: + return out + return None + + +def get_children_by_types(node: Node, types: List): + """Takes in a node and a list of types as inputs and returns all children matching those types. Otherwise, return an empty list""" + return [child for child in node.children if child.type in types] + + +def get_first_child_index(node, type: str): + """Get the index of the first child of node with type type.""" + for i, child in enumerate(node.children): + if child.type == type: + return i + + +def get_last_child_index(node, type: str): + """Get the index of the last child of node with type type.""" + last = None + for i, child in enumerate(node.children): + if child.type == type: + last = child + return last + - def get_first_child_by_type(self, node: Dict, node_type: str) -> Dict: - children = self.get_children_by_type(node, node_type) - if len(children) >= 1: - return children[0] +def get_control_children(node: Node): + return get_children_by_types(node, CONTROL_CHARACTERS) - def get_children_by_type(self, node: Dict, node_type: str) -> List: - children = [] - for child in node["children"]: - if child["type"] == node_type: - children.append(child) +def get_non_control_children(node: Node): + children = [] + for child in node.children: + if child.type not in CONTROL_CHARACTERS: + children.append(child) - return children + return children diff --git a/skema/program_analysis/TS2CAST/preprocessor/preprocess.py b/skema/program_analysis/TS2CAST/preprocessor/preprocess.py index a55422251c6..a1b4e6cca1f 100644 --- a/skema/program_analysis/TS2CAST/preprocessor/preprocess.py +++ b/skema/program_analysis/TS2CAST/preprocessor/preprocess.py @@ -2,7 +2,9 @@ import re import os import shutil -from typing import List +import logging +from typing import List, Optional +from pathlib import Path from subprocess import run, PIPE from tree_sitter import Parser, Node, Language, Tree @@ -13,15 +15,14 @@ def preprocess( - source_path: str, - out_path: str, + source_path: Path, + out_dir=None, overwrite=False, out_missing_includes=False, out_gcc=False, out_unsupported=False, out_corrected=False, - out_parse=False, -) -> Tree: +) -> str: """Run the full preprocessing pipeline for Fortran->Tree-Sitter->CAST Takes the original source as input and will return the tree-sitter parse tree as output An intermediary directory will also be created containing: @@ -29,44 +30,46 @@ def preprocess( 2. The intermediary product from running the c-preprocessor 3. A log of unsupported idioms 4. The source code with unsupported idioms corrected - 5. The tree-sitter parse tree """ + # NOTE: The order of preprocessing steps does matter. We have to run the GCC preprocessor before correcting the continuation lines or there could be issues - source = open(source_path, "r").read() - source_file_name = os.path.basename(source_path).split(".")[0] - source_directory = os.path.dirname(source_path) - include_base_directory = os.path.join( - source_directory, f"include_{source_file_name}" - ) + source = source_path.read_text() - # NOTE: The order of preprocessing steps does matter. We have to run the GCC preprocessor before correcting the continuation lines or there could be issues - try: - os.mkdir(out_path) - except FileExistsError: - if not overwrite: - exit() + # Get paths for intermediate products + if out_dir: + if not (out_missing_includes or out_gcc or out_unsupported or out_corrected): + logging.warning("out_dir is specified, but no out flags are set") + + out_dir.mkdir(parents=True, exist_ok=True) + + missing_includes_path = Path(out_dir, "missing_includes.txt") + gcc_path = Path(out_dir, "gcc.F") + unsupported_path = Path(out_dir, "unsupported_idioms.txt") + corrected_path = Path(out_dir, "corrected.F") + parse_path = Path(out_dir, "parse_tree.txt") # Step 1: Check for missing included files - missing_includes = check_for_missing_includes(source_path) - if out_missing_includes: - missing_includes_path = os.path.join(out_path, "missing_includes.txt") - with open(missing_includes_path, "w") as f: - f.write("\n".join(missing_includes)) - if len(missing_includes) > 0: - print("Missing required included files, missing files were:") - for include in missing_includes: - print(include) - exit() + # Many source files won't have includes. We only need to check missing includes if a source contains an include statement. + if len(produce_include_summary(source)) > 0: + missing_includes = check_for_missing_includes(source_path) + if out_missing_includes: + missing_includes_path.write_text("\n".join(missing_includes)) + + if len(missing_includes) > 0: + logging.error("Missing required included files, missing files were:") + for include in missing_includes: + logging.error(include) + exit() + elif out_missing_includes: + missing_includes_path.write_text("Source file contains no include statements") # Step 2: Correct include directives to remove system references source = fix_include_directives(source) # Step 3: Process with gcc c-preprocessor - source = run_c_preprocessor(source, include_base_directory) + source = run_c_preprocessor(source, source_path.parent) if out_gcc: - gcc_path = os.path.join(out_path, "gcc.F") - with open(gcc_path, "w") as f: - f.write(source) + gcc_path.write_text(source) # Step 4: Prepare for tree-sitter # This step removes any additional preprocessor directives added or not removed by GCC @@ -76,53 +79,41 @@ def preprocess( # Step 5: Check for unsupported idioms if out_unsupported: - unsupported_path = os.path.join(out_path, "unsupported_idioms.txt") - with open(unsupported_path, "w") as f: - f.writelines(search_for_unsupported_idioms(source, "idioms_regex.txt")) + unsupported_path.write_text( + "\n".join(search_for_unsupported_idioms(source, "idioms_regex.txt")) + ) # Step 6 : Fix unsupported idioms source = fix_unsupported_idioms(source) if out_corrected: - corrected_path = os.path.join(out_path, "corrected.F") - with open(corrected_path, "w") as f: - f.write(source) + corrected_path.write_text(source) - # Stage 7: Parse with tree-sitter - parse_tree = tree_sitter_parse(source) - if out_parse: - parse_path = os.path.join(out_path, "parse_tree.txt") - with open(parse_path, "w") as f: - f.write(parse_tree.root_node.sexp()) + return source - return parse_tree +def produce_include_summary(source: str) -> List: + """Uses regex to produce a list of all included files in a source""" + includes = [] -def check_for_missing_includes(source_path: str): - """Gathers all required includes and check if they have been added to the include_SOURCE directory""" + system_re = "#include\s+<(.*)>" + local_re = '#include\s+"(.*)"' - def produce_include_summary(source: str) -> List: - """Uses regex to produce a list of all included files in a source""" - includes = [] + for match in re.finditer(system_re, source): + includes.append(match.group(1)) + for match in re.finditer(local_re, source): + includes.append(match.group(1)) - system_re = "#include\s+<(.*)>" - local_re = '#include\s+"(.*)"' + return includes - for match in re.finditer(system_re, source): - includes.append(match.group(1)) - for match in re.finditer(local_re, source): - includes.append(match.group(1)) - return includes +def check_for_missing_includes(source_path: Path): + """Gathers all required includes and check if they have been added to the include_SOURCE directory""" missing_files = [] # First we will check for the include directory - source_file_name = os.path.basename(source_path).split(".")[0] - source_directory = os.path.dirname(source_path) - include_base_directory = os.path.join( - source_directory, f"include_{source_file_name}" - ) - if not os.path.isdir(include_base_directory): + include_base_directory = Path(source_path.parent, f"include_{source_path.stem}") + if not include_base_directory.exists(): missing_files.append(include_base_directory) return missing_files @@ -133,7 +124,7 @@ def produce_include_summary(source: str) -> List: includes = [] for dirpath, dirnames, filenames in os.walk(include_base_directory): for file in filenames: - file_source = open(os.path.join(dirpath, file), "r").read() + file_source = Path(dirpath, file).read_text() includes.extend(produce_include_summary(file_source)) # Check for missing files @@ -141,7 +132,7 @@ def produce_include_summary(source: str) -> List: for include in includes: if include in already_checked: continue - if not os.path.isfile(os.path.join(include_base_directory, include)): + if not Path(include_base_directory, include).exists(): missing_files.append(include) already_checked.add(include) return missing_files @@ -154,10 +145,9 @@ def search_for_unsupported_idioms(source: str, idioms_regex_path: str): for line in lines: for match in re.finditer(line, source, flags=re.MULTILINE): line_number = source[: match.span()[0]].count("\n") - log.append(f"Found unsupported idiom matching regex: {line}" + "\n") - log.append(f"Match was: {match.group(0)}" + "\n") - log.append(f"Line was: {line_number}" + "\n") - log.append(f"\n") + log.append(f"Found unsupported idiom matching regex: {line}") + log.append(f"Match was: {match.group(0)}") + log.append(f"Line was: {line_number}") return log @@ -192,7 +182,7 @@ def fix_include_directives(source: str) -> str: return source -def run_c_preprocessor(source: str, include_base_path: str) -> str: +def run_c_preprocessor(source: str, include_base_path: Path) -> str: """Run the gcc c-preprocessor. Its run from the context of the include_base_path, so that it can find all included files""" result = run( ["gcc", "-cpp", "-E", "-"], @@ -205,24 +195,11 @@ def run_c_preprocessor(source: str, include_base_path: str) -> str: return result.stdout -def tree_sitter_parse(source: str) -> Tree: - """Use tree-sitter to parse the source code and output the parse tree""" - parser = Parser() - - parser.set_language( - Language( - os.path.join(os.path.dirname("../"), LANGUAGE_LIBRARY_REL_PATH), "fortran" - ) - ) - - return parser.parse(bytes(source, "utf8")) - - def main(): """Run the preprocessor as a script""" parser = argparse.ArgumentParser(description="Fortran preprocessing script") parser.add_argument("source_path", type=str, help="Path to the source file") - parser.add_argument("out_path", type=str, help="Output directory path") + parser.add_argument("out_dir", type=str, help="Output directory path") parser.add_argument( "-o", "--overwrite", @@ -249,24 +226,18 @@ def main(): action="store_true", help="Output source after fixing unsupported idioms", ) - parser.add_argument( - "--out_parse", - action="store_true", - help="Output tree-sitter parse tree", - ) args = parser.parse_args() preprocess( - args.source_path, - args.out_path, + Path(args.source_path), + Path(args.out_dir), args.overwrite, args.out_missing_includes, args.out_gcc, args.out_unsupported, args.out_corrected, - args.out_parse, ) if __name__ == "__main__": - main() + main() \ No newline at end of file diff --git a/skema/program_analysis/TS2CAST/ts2cast.py b/skema/program_analysis/TS2CAST/ts2cast.py index 3845723bcbc..abf319b6849 100644 --- a/skema/program_analysis/TS2CAST/ts2cast.py +++ b/skema/program_analysis/TS2CAST/ts2cast.py @@ -1,8 +1,9 @@ import json import os.path -from typing import Any, Dict, List +from pathlib import Path +from typing import Any, Dict, List, Union -from tree_sitter import Language, Parser +from tree_sitter import Language, Parser, Node from skema.program_analysis.CAST2FN.cast import CAST from skema.program_analysis.CAST2FN.model.cast import ( @@ -22,127 +23,168 @@ Call, ModelReturn, ModelIf, + RecordDef, + Attribute, ) - from skema.program_analysis.TS2CAST.variable_context import VariableContext -from skema.program_analysis.TS2CAST.node_helper import NodeHelper -from skema.program_analysis.TS2CAST.util import generate_dummy_source_refs, preprocess +from skema.program_analysis.TS2CAST.node_helper import ( + NodeHelper, + get_children_by_types, + get_first_child_by_type, + get_control_children, + get_non_control_children, + get_first_child_index, + get_last_child_index, +) +from skema.program_analysis.TS2CAST.util import generate_dummy_source_refs +from skema.program_analysis.TS2CAST.preprocessor.preprocess import preprocess from skema.program_analysis.TS2CAST.build_tree_sitter_fortran import LANGUAGE_LIBRARY_REL_PATH - class TS2CAST(object): def __init__(self, source_file_path: str): - # Initialize tree-sitter - tree_sitter_fortran_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), LANGUAGE_LIBRARY_REL_PATH) - self.tree_sitter_fortran = Language(tree_sitter_fortran_path, "fortran") - - # We load the source code from a file - self.source = None - with open(source_file_path, "r") as f: - self.source = f.read() - - # Set up tree sitter parser - self.parser = Parser() - self.parser.set_language(self.tree_sitter_fortran) - self.tree = self.parser.parse(bytes(self.source, "utf8")) - - # CAST objects - self.module_name = None - self.source_file_name = source_file_path - self.module = Module() + # Prepare source with preprocessor + self.path = Path(source_file_path) + self.source_file_name = self.path.name + self.source = preprocess(self.path) + + # Run tree-sitter on preprocessor output to generate parse tree + parser = Parser() + parser.set_language( + Language( + Path(Path(__file__).parent, LANGUAGE_LIBRARY_REL_PATH), + "fortran" + ) + ) + self.tree = parser.parse(bytes(self.source, "utf8")) # Walking data self.variable_context = VariableContext() - - self.node_helper = NodeHelper(source_file_path, self.source) - self.parse_dict = self.node_helper.parse_tree_to_dict(self.tree.root_node) - # print(json.dumps(self.parse_dict)) + self.node_helper = NodeHelper(self.source, self.source_file_name) # Start visiting - self.run(self.parse_dict) - - generate_dummy_source_refs(self.module) - - # Create outer cast wrapping - self.out_cast = CAST([self.module], "Fortran") - # print( - # json.dumps( - # out_cast.to_json_object(), sort_keys=True, indent=None - # ) - # ) - - def run(self, root: Dict): - self.module.source_refs = root["source_refs"] - self.module.body = [] - for child in root["children"]: - child_cast = self.visit(child) - if isinstance(child_cast, List): - self.module.body.extend(child_cast) - else: - self.module.body.append(child_cast) - - def visit(self, node: Dict): - if node["type"] == "program": - return self.visit_program_statement(node) - elif node["type"] in ["subroutine", "function"]: + self.out_cast = self.generate_cast() + + def generate_cast(self) -> List[CAST]: + '''Interface for generating CAST.''' + modules = self.run(self.tree.root_node) + return [CAST([generate_dummy_source_refs(module)], "Fortran") for module in modules] + + def run(self, root) -> List[Module]: + '''Top level visitor function. Will return between 1-3 Module objects.''' + # A program can have between 1-3 modules + # 1. A module body + # 2. A program body + # 3. Everything else (defined functions) + modules = [] + + contexts = get_children_by_types(root, ["module", "program"]) + for context in contexts: + modules.append(self.visit(context)) + + # Currently, we are supporting functions and subroutines defined outside of programs and modules + # Other than comments, it is unclear if anything else is allowed. + # TODO: Research the above + outer_body_nodes = get_children_by_types(root, ["function", "subroutine"]) + if len(outer_body_nodes) > 0: + body = [] + for body_node in outer_body_nodes: + child_cast = self.visit(body_node) + if isinstance(child_cast, List): + body.extend(child_cast) + elif isinstance(child_cast, AstNode): + body.append(child_cast) + modules.append(Module( + name=None, + body=body, + source_refs=[self.node_helper.get_source_ref(root)] + )) + + return modules + + def visit(self, node): + if node.type in ["program", "module"] : + return self.visit_module(node) + elif node.type == "internal_procedures": + return self.visit_internal_procedures(node) + elif node.type in ["subroutine", "function"]: return self.visit_function_def(node) - elif node["type"] in ["subroutine_call", "call_expression"]: + elif node.type in ["subroutine_call", "call_expression"]: return self.visit_function_call(node) - elif node["type"] == "use_statement": + elif node.type == "use_statement": return self.visit_use_statement(node) - elif node["type"] == "variable_declaration": + elif node.type == "variable_declaration": return self.visit_variable_declaration(node) - elif node["type"] == "assignment_statement": + elif node.type == "assignment_statement": return self.visit_assignment_statement(node) - elif node["type"] == "identifier": + elif node.type == "identifier": return self.visit_identifier(node) - elif node["type"] == "name": + elif node.type == "name": return self.visit_name(node) - elif node["type"] in ["math_expression", "relational_expression"]: + elif node.type in ["math_expression", "relational_expression"]: return self.visit_math_expression(node) - elif node["type"] in [ + elif node.type in [ "number_literal", "array_literal", "string_literal", "boolean_literal", ]: return self.visit_literal(node) - elif node["type"] == "keyword_statement": + elif node.type == "keyword_statement": return self.visit_keyword_statement(node) - elif node["type"] == "extent_specifier": + elif node.type == "extent_specifier": return self.visit_extent_specifier(node) - elif node["type"] == "do_loop_statement": + elif node.type == "do_loop_statement": return self.visit_do_loop_statement(node) - elif node["type"] == "if_statement": + elif node.type == "if_statement": return self.visit_if_statement(node) + elif node.type == "derived_type_definition": + return self.visit_derived_type(node) + elif node.type == "derived_type_member_expression": + return self.visit_derived_type_member_expression(node) else: return self._visit_passthrough(node) - def visit_program_statement(self, node): + def visit_module(self, node: Node) -> Module: + '''Visitor for program and module statement. Returns a Module object''' + self.variable_context.push_context() + program_body = [] - for child in node["children"][1:]: + for child in node.children[1:-1]: # Ignore the start and end program statement child_cast = self.visit(child) if isinstance(child_cast, List): program_body.extend(child_cast) - else: + elif isinstance(child_cast, AstNode): program_body.append(child_cast) - return program_body + + self.variable_context.pop_context() + + return Module( + name=None, #TODO: Fill out name field + body=program_body, + source_refs = [self.node_helper.get_source_ref(node)] + ) + + def visit_internal_procedures(self, node: Node) -> List[FunctionDef]: + '''Visitor for internal procedures. Returns list of FunctionDef''' + internal_procedures = get_children_by_types(node, ["function", "subroutine"]) + return [self.visit(procedure) for procedure in internal_procedures] def visit_name(self, node): # Node structure # (name) - assert len(node["children"]) == 0 - # First, we will check if this name is already defined, and if it is - if self.variable_context.is_variable(node["identifier"]): - return self.variable_context.get_node(node["identifier"]) + # First, we will check if this name is already defined, and if it is return the name node generated previously + identifier = self.node_helper.get_identifier(node) + if self.variable_context.is_variable(identifier): + return self.variable_context.get_node(identifier) return self.variable_context.add_variable( - node["identifier"], "Unknown", node["source_refs"] + identifier, "Unknown", [self.node_helper.get_source_ref(node)] ) def visit_function_def(self, node): + # TODO: Refactor function def code to use new helper functions # Node structure # (subroutine) # (subroutine_statement) @@ -164,91 +206,99 @@ def visit_function_def(self, node): self.variable_context.push_context() # Top level statement node - statement_node = node["children"][0] - name_node = self.node_helper.get_first_child_by_type(statement_node, "name") - self.visit(name_node) # Visit the name node + statement_node = get_children_by_types(node, ["subroutine_statement", "function_statement"])[0] + name_node = get_first_child_by_type(statement_node, "name") + name = self.visit( + name_node + ) # Visit the name node to add it to the variable context # If this is a function, check for return type and return value intrinsic_type = None return_value = None - if node["type"] == "function": - if intrinsic_type_node := self.node_helper.get_first_child_by_type( - statement_node, "intrinsic_type" - ): - intrinsic_type = intrinsic_type_node["identifier"] - self.variable_context.add_variable( - name_node["identifier"], intrinsic_type, None - ) - if return_value_node := self.node_helper.get_first_child_by_type( - statement_node, "function_result" - ): - return_value = self.visit(return_value_node["children"][1]) - self.variable_context.add_return_value(return_value.val.name) - else: - # #TODO: What happens if function doesn't return anything? - # If this is a function, and there is no explicit results variable, then we will assume the return value is the name of the function - self.variable_context.add_return_value(name_node["identifier"]) + if node.type == "function": + signature_qualifiers = get_children_by_types( + statement_node, ["intrinsic_type", "function_result"] + ) + for qualifier in signature_qualifiers: + if qualifier.type == "intrinsic_type": + intrinsic_type = self.node_helper.get_identifier(qualifier) + self.variable_context.add_variable( + self.node_helper.get_identifier(name_node), intrinsic_type, None + ) + elif qualifier.type == "function_result": + return_value = self.visit( + get_first_child_by_type(qualifier, "identifier") + ) # TODO: UPDATE NODES + self.variable_context.add_return_value(return_value.val.name) + + # #TODO: What happens if function doesn't return anything? + # If this is a function, and there is no explicit results variable, then we will assume the return value is the name of the function + if not return_value: + self.variable_context.add_return_value( + self.node_helper.get_identifier(name_node) + ) # If funciton has both, then we also need to update the type of the return value in the variable context # It does not explicity have to be declared if return_value and intrinsic_type: self.variable_context.update_type(return_value.val.name, intrinsic_type) - cast_func = FunctionDef() - cast_func.source_refs = node["source_refs"] - cast_func.func_args = [] - cast_func.body = [] - cast_func.name = self.visit(name_node) - # Generating the function arguments by walking the parameters node - parameters_node = self.node_helper.get_first_child_by_type( - statement_node, "parameters" - ) - if parameters_node: - for child in parameters_node["children"]: + func_args = [] + if parameters_node := get_first_child_by_type(statement_node, "parameters"): + for parameter in get_non_control_children(parameters_node): # For both subroutine and functions, all arguments are assumes intent(inout) by default unless otherwise specified with intent(in) # The variable declaration visitor will check for this and remove any arguments that are input only from the return values - self.variable_context.add_return_value(child["identifier"]) - - cast_func.func_args = TS2CAST.update_field( - cast_func.func_args, self.visit(child) + self.variable_context.add_return_value( + self.node_helper.get_identifier(parameter) ) + func_args.append(self.visit(parameter)) # The first child of function will be the function statement, the rest will be body nodes - for child in node["children"][1:]: - cast_func.body = TS2CAST.update_field(cast_func.body, self.visit(child)) + body = [] + for body_node in node.children[1:]: + child_cast = self.visit(body_node) + if isinstance(child_cast, List): + body.extend(child_cast) + elif isinstance(child_cast, AstNode): + body.append(child_cast) # After creating the body, we can go back and update the var nodes we created for the arguments # We do this by looking for intent,in nodes - for i, arg in enumerate(cast_func.func_args): - cast_func.func_args[i].type = self.variable_context.get_type(arg.val.name) + for i, arg in enumerate(func_args): + func_args[i].type = self.variable_context.get_type(arg.val.name) # TODO: # This logic can be made cleaner # Fortran doesn't require a return statement, so we need to check if there is a top-level return statement # If there is not, then we will create a dummy one return_found = False - for child in cast_func.body: + for child in body: if isinstance(child, ModelReturn): return_found = True if not return_found: - cast_func.body.append(self.visit_keyword_statement(node)) + body.append(self.visit_keyword_statement(node)) # Pop variable context off of stack before leaving this scope self.variable_context.pop_context() - return cast_func + return FunctionDef( + name=name, + func_args=func_args, + body=body, + source_refs=[self.node_helper.get_source_ref(node)], + ) def visit_function_call(self, node): # Pull relevent nodes - if node["type"] == "subroutine_call": - function_node = node["children"][1] - arguments_node = node["children"][2] - elif node["type"] == "call_expression": - function_node = node["children"][0] - arguments_node = node["children"][1] + if node.type == "subroutine_call": + function_node = node.children[1] + arguments_node = node.children[2] + elif node.type == "call_expression": + function_node = node.children[0] + arguments_node = node.children[1] - function_identifier = function_node["identifier"] + function_identifier = self.node_helper.get_identifier(function_node) # Tree-Sitter incorrectly parses mutlidimensional array accesses as function calls # We will need to check if this is truly a function call or a subscript @@ -258,28 +308,31 @@ def visit_function_call(self, node): node ) # This overrides the visitor and forces us to visit another - cast_call = Call() - cast_call.source_refs = node["source_refs"] - # TODO: What should get a name node? Instrincit functions? Imported functions? # Judging from the Gromet generation pipeline, it appears that all functions need Name nodes. if self.variable_context.is_variable(function_identifier): - cast_call.func = self.variable_context.get_node(function_identifier) + func = self.variable_context.get_node(function_identifier) else: - cast_call.func = Name(function_identifier, -1) + func = Name(function_identifier, -1) # TODO: REFACTOR # Add arguments to arguments list - for child in arguments_node["children"]: - cast_call.arguments = TS2CAST.update_field( - cast_call.arguments, self.visit(child) - ) - - return cast_call + arguments = [] + for argument in arguments_node.children: + child_cast = self.visit(argument) + if child_cast: + arguments.append(child_cast) + + return Call( + func=func, + source_language="Fortran", + source_language_version="2008", + arguments=arguments, + source_refs=[self.node_helper.get_source_ref(node)], + ) def visit_keyword_statement(self, node): # Currently, the only keyword_identifier produced by tree-sitter is Return # However, there may be other instances - cast_return = ModelReturn(source_refs=node["source_refs"]) # In Fortran the return statement doesn't return a value (there is the obsolete "alternative return") # We keep track of values that need to be returned in the variable context @@ -288,108 +341,126 @@ def visit_keyword_statement(self, node): ] # TODO: Make function for this if len(return_values) == 1: - cast_return.value = self.variable_context.get_node(return_values[0]) + # TODO: Fix this case + value = self.variable_context.get_node(list(return_values)[0]) elif len(return_values) > 1: - cast_tuple = LiteralValue("Tuple", []) - - for return_value in return_values: - cast_var = Var() - cast_var.val = self.variable_context.get_node(return_value) - cast_var.type = self.variable_context.get_type(return_value) - cast_tuple.value.append(cast_var) - cast_return.value = cast_tuple + value = LiteralValue( + value_type="Tuple", + value=[ + Var( + val=self.variable_context.get_node(ret), + type=self.variable_context.get_type(ret), + default_value=None, + source_refs=None, + ) + for ret in return_values + ], + source_code_data_type=None, # TODO: REFACTOR + source_refs=None, + ) else: - cast_return.value = LiteralValue(None, None) + value = LiteralValue(val=None, type=None, source_refs=None) - return cast_return + return ModelReturn( + value=value, source_refs=[self.node_helper.get_source_ref(node)] + ) def visit_use_statement(self, node): + # (use) + # (use) + # (module_name) + ## Pull relevent child nodes - module_name_node = node["children"][0] - included_items_nodes = self.node_helper.get_children_by_type( - node, - "included_items", - ) + module_name_node = get_first_child_by_type(node, "module_name") + module_name = self.node_helper.get_identifier(module_name_node) + included_items_node = get_first_child_by_type(node, "included_items") - import_all = len(included_items_nodes) == 0 + import_all = included_items_node is None import_alias = None # TODO: Look into local-name and use-name fields # We need to check if this import is a full import of a module, i.e. use module # Or a partial import i.e. use module,only: sub1, sub2 if import_all: - cast_import = ModelImport() - cast_import.source_refs = node["source_refs"] - cast_import.name = module_name_node["identifier"] - cast_import.alias = import_alias - cast_import.all = import_all - cast_import.symbol = None - - return cast_import + return ModelImport( + name=module_name, + alias=import_alias, + all=import_all, + symbol=None, + source_refs=None, + ) else: imports = [] - for child in included_items_nodes[0]["children"]: - cast_import = ModelImport() - cast_import.source_refs = child["source_refs"] - cast_import.name = module_name_node["identifier"] - cast_import.alias = import_alias - cast_import.all = import_all - cast_import.symbol = child["identifier"] - - # Add the symbol to the variable context - self.variable_context.add_variable( - cast_import.symbol, "function", child["source_refs"] + for symbol in get_non_control_children(included_items_node): + symbol_identifier = self.node_helper.get_identifier(symbol) + symbol_source_refs = [self.node_helper.get_source_ref(symbol)] + imports.append( + ModelImport( + name=module_name, + alias=import_alias, + all=import_all, + symbol=symbol_identifier, + source_refs=symbol_source_refs, + ) ) - imports.append(cast_import) return imports - def visit_do_loop_statement(self, node): - # Node structure - # Do loop - # (do_loop_statement) - # (do) - TODO: Get rid of extraneous nodes like this - # (loop_control_expression) - # (...) ... - # (body) ... - # - # Do while - # (do_loop_statement) - # (do) - # (while_statement) - # (while) - # (parenthesized_expression) - # (...) ... - # (body) ... - # print(self.variable_context.context) - assert len(node["children"]) > 2 - loop_type = node["children"][1]["type"] - - cast_loop = Loop() - cast_loop.source_refs = node["source_refs"] - cast_loop.pre = [] - cast_loop.post = [] - cast_loop.expr = None - cast_loop.body = [] - - # The body will be the same for both loops, like the function definition, its simply every child node after the first - # TODO: This may not be the case - for child in node["children"][2:]: - cast_loop.body = self.update_field(cast_loop.body, self.visit(child)) + def visit_do_loop_statement(self, node) -> Loop: + """Visitor for Loops. Do to complexity, this visitor logic only handles the range-based do loop. + The do while loop will be passed off to a seperate visitor. Returns a Loop object. + """ + """ + Node structure + Do loop + (do_loop_statement) + (loop_control_expression) + (...) ... + (body) ... + + Do while + (do_loop_statement) + (while_statement) + (parenthesized_expression) + (...) ... + (body) ... + """ + + # First check for + # TODO: Add do until Loop support + while_statement_node = get_first_child_by_type(node, "while_statement") + if while_statement_node: + return self._visit_while(node) + + # The first body node will be the node after the loop_control_expression + # NOTE: This code is for the creation of the main body. The do loop will still add some additional nodes at the end of this body. + body = [] + body_start_index = 1 + get_first_child_index(node, "loop_control_expression") + for body_node in node.children[body_start_index:]: + child_cast = self.visit(body_node) + if isinstance(child_cast, List): + body.extend(child_cast) + elif isinstance(child_cast, AstNode): + body.append(child_cast) # For the init and expression fields, we first need to determine if we are in a regular "do" or a "do while" loop - # PRE: - # TODO: Why is this different from the schema # _next(_iter(range(start, stop, step))) - loop_control_node = node["children"][1] - itterator = self.visit(loop_control_node["children"][0]) - start = self.visit(loop_control_node["children"][1]) - stop = self.visit(loop_control_node["children"][2]) - - if len(loop_control_node["children"]) == 3: # No step value + loop_control_node = get_first_child_by_type(node, "loop_control_expression") + loop_control_children = get_non_control_children(loop_control_node) + if len(loop_control_children) == 3: + itterator, start, stop = [ + self.visit(child) for child in loop_control_children + ] step = LiteralValue("Integer", "1") - elif len(loop_control_node["children"]) == 4: - step = self.visit(loop_control_node["children"][3]) + elif len(loop_control_children) == 4: + itterator, start, stop, step = [ + self.visit(child) for child in loop_control_children + ] + else: + itterator = None + start = None + stop = None + step = None range_name_node = self.get_gromet_function_node("range") iter_name_node = self.get_gromet_function_node("iter") @@ -398,7 +469,8 @@ def visit_do_loop_statement(self, node): stop_condition_name_node = self.variable_context.generate_stop_condition() # generated_iter_0 = iter(range(start, stop, step)) - cast_loop.pre.append( + pre = [] + pre.append( Assignment( left=Var(generated_iter_name_node, "Iterator"), right=Call( @@ -409,7 +481,7 @@ def visit_do_loop_statement(self, node): ) # (i, generated_iter_0, sc_0) = next(generated_iter_0) - cast_loop.pre.append( + pre.append( Assignment( left=LiteralValue( "Tuple", @@ -427,7 +499,8 @@ def visit_do_loop_statement(self, node): ) # EXPR - cast_loop.expr = Operator( + expr = [] + expr = Operator( op="!=", # TODO: Should this be == or != operands=[ Var(stop_condition_name_node, "Boolean"), @@ -438,7 +511,7 @@ def visit_do_loop_statement(self, node): # BODY # At this point, the body nodes have already been visited # We just need to append the iterator next call - cast_loop.body.append( + body.append( Assignment( left=LiteralValue( "Tuple", @@ -456,14 +529,21 @@ def visit_do_loop_statement(self, node): ) # POST - cast_loop.post.append( + post = [] + post.append( Assignment( left=itterator, right=Operator(op="+", operands=[itterator, step]), ) ) - return cast_loop + return Loop( + pre=pre, + expr=expr, + body=body, + post=post, + source_refs=[self.node_helper.get_source_ref(node)], + ) def visit_if_statement(self, node): # (if_statement) @@ -475,7 +555,9 @@ def visit_if_statement(self, node): # (else_clause) # (end_if_statement) - child_types = [child["type"] for child in node["children"]] + # First we need to identify if this is a componund conditional + # We can do this by counting the number of control characters in a relational expression + child_types = [child.type for child in node.children] try: elseif_index = child_types.index("elseif_clause") @@ -498,17 +580,16 @@ def visit_if_statement(self, node): if elseif_index != -1: orelse = ModelIf() prev = orelse - for condition in node["children"][elseif_index:else_index]: - elseif_expr = self.visit(condition["children"][2]) - elseif_body = [self.visit(child) for child in condition["children"][4:]] + for condition in node.children[elseif_index:else_index]: + elseif_expr = self.visit(condition.children[2]) + elseif_body = [self.visit(child) for child in condition.children[4:]] prev.orelse = ModelIf(elseif_expr, elseif_body, None) prev = prev.orelse if else_index != -1: else_body = [ - self.visit(child) - for child in node["children"][else_index]["children"][1:] + self.visit(child) for child in node.children[else_index].children[1:] ] if prev: prev.orelse = else_body @@ -519,177 +600,222 @@ def visit_if_statement(self, node): orelse = orelse.orelse return ModelIf( - expr=self.visit(node["children"][1]), - body=[self.visit(child) for child in node["children"][3:body_stop_index]], + expr=self.visit(node.children[1]), + body=[self.visit(child) for child in node.children[3:body_stop_index]], orelse=orelse, ) def visit_assignment_statement(self, node): - cast_assignment = Assignment() - cast_assignment.source_refs = node["source_refs"] - - assert len(node["children"]) == 2 - left, right = node["children"] + left, _, right = node.children # We need to check if the left side is a multidimensional array, # Since tree-sitter incorrectly shows this assignment as a call_expression - if left["type"] == "call_expression": + if left.type == "call_expression": return self._visit_set(node) - cast_assignment.left = self.visit(left) - cast_assignment.right = self.visit(right) - - return cast_assignment - - def visit_literal(self, node): - literal_type = node["type"] - literal_value = node["identifier"] + return Assignment( + left=self.visit(left), + right=self.visit(right), + source_refs=[self.node_helper.get_source_ref(node)], + ) - cast_literal = LiteralValue() - cast_literal.source_refs = node["source_refs"] + def visit_literal(self, node) -> LiteralValue: + """Visitor for literals. Returns a LiteralValue""" + literal_type = node.type + literal_value = self.node_helper.get_identifier(node) + literal_source_ref = self.node_helper.get_source_ref(node) if literal_type == "number_literal": # Check if this is a real value, or an Integer if "e" in literal_value.lower() or "." in literal_value: - cast_literal.value_type = "AbstractFloat" - cast_literal.source_code_data_type = [ - "Fortran", - "Fortran95", - "real", - ] + return LiteralValue( + value_type="AbstractFloat", + value=literal_value, + source_code_data_type=["Fortran", "Fortran95", "real"], + source_refs=[literal_source_ref], + ) else: - cast_literal.value_type = "Integer" - cast_literal.source_code_data_type = [ - "Fortran", - "Fortran95", - "integer", - ] - cast_literal.value = literal_value + return LiteralValue( + value_type="Integer", + value=literal_value, + source_code_data_type=["Fortran", "Fortran95", "integer"], + source_refs=[literal_source_ref], + ) elif literal_type == "string_literal": - cast_literal.value_type = "Character" - cast_literal.source_code_data_type = [ - "Fortran", - "Fortran95", - "character", - ] - cast_literal.value = literal_value + return LiteralValue( + value_type="Character", + value=literal_value, + source_code_data_type=["Fortran", "Fortran95", "character"], + source_refs=[literal_source_ref], + ) elif literal_type == "boolean_literal": - cast_literal.value_type = "Boolean" - cast_literal.source_code_data_type = ["Fortran", "Fortran95", "logical"] - cast_literal.value = literal_value + return LiteralValue( + value_type="Boolean", + value=literal_value, + source_code_data_type=["Fortran", "Fortran95", "logical"], + source_refs=[literal_source_ref], + ) elif literal_type == "array_literal": - cast_literal.value_type = "List" - cast_literal.source_code_data_type = [ - "Fortran", - "Fortran95", - "dimension", - ] - cast_literal.value = None - - return cast_literal + # There are a multiple ways to create an array literal. This visitor is for the traditional explicit creation (/ 1,2,3 /) + # For the do loop based version, we pass it off to another visitor + implied_do_loop_expression_node = get_first_child_by_type( + node, "implied_do_loop_expression" + ) + if implied_do_loop_expression_node: + return self._visit_implied_do_loop(implied_do_loop_expression_node) + + return LiteralValue( + value_type="List", + value=[ + self.visit(element) for element in get_non_control_children(node) + ], + source_code_data_type=["Fortran", "Fortran95", "dimension"], + source_refs=[literal_source_ref], + ) def visit_identifier(self, node): - cast_var = Var() - cast_var.source_refs = node["source_refs"] - # By default, this is unknown, but can be updated by other visitors - if self.variable_context.is_variable(node["identifier"]): - cast_var.type = self.variable_context.get_type(node["identifier"]) + identifier = self.node_helper.get_identifier(node) + if self.variable_context.is_variable(identifier): + var_type = self.variable_context.get_type(identifier) else: - cast_var.type = "Unknown" + var_type = "Unknown" # Default value comes from Pytohn keyword arguments i.e. def foo(a, b=10) # Fortran does have optional arguments introduced in F90, but these do not specify a default - cast_var.default_value = None + default_value = None # This is another case where we need to override the visitor to explicitly visit another node - cast_var.val = self.visit_name(node) + value = self.visit_name(node) - return cast_var + return Var( + val=value, + type=var_type, + default_value=default_value, + source_refs=[self.node_helper.get_source_ref(node)], + ) def visit_math_expression(self, node): - op = node["control"][0] # The operator will be the first control character - - cast_op = Operator() - cast_op.source_refs = node["source_refs"] - - cast_op.source_language = "Fortran" - cast_op.interpreter = None - cast_op.version = None + op = self.node_helper.get_identifier( + get_control_children(node)[0] + ) # The operator will be the first control character + + operands = [] + for operand in get_non_control_children(node): + operands.append(self.visit(operand)) + + return Operator( + source_language="Fortran", + interpreter=None, + version=None, + op=op, + operands=operands, + source_refs=[self.node_helper.get_source_ref(node)], + ) - cast_op.op = op["identifier"] + def visit_variable_declaration(self, node) -> List: + """Visitor for variable declaration. Will return a List of Var and Assignment nodes.""" + """ + # Node structure + (variable_declaration) + (intrinsic_type) + (type_qualifier) + (qualifier) + (value) + (identifier) ... + (assignment_statement) ... + + (variable_declaration) + (derived_type) + (type_name) + """ + # A variable can be declared with an intrinsic_type if its built-in, or a derived_type if it is user defined. + intrinsic_type_node = get_first_child_by_type(node, "intrinsic_type") + derived_type_node = get_first_child_by_type(node, "derived_type") + + variable_type = "" + variable_intent = "" + + if intrinsic_type_node: + type_map = { + "integer": "Integer", + "real": "AbstractFloat", + "complex": None, + "logical": "Boolean", + "character": "String", + } + variable_type = type_map[self.node_helper.get_identifier(intrinsic_type_node)] + elif derived_type_node: + variable_type = self.node_helper.get_identifier( + get_first_child_by_type(derived_type_node, "type_name", recurse=True), + ) - for child in node["children"]: - cast_op.operands = TS2CAST.update_field(cast_op.operands, self.visit(child)) + # There are multiple type qualifiers that change the way we generate a variable + # For example, we need to determine if we are creating an array (dimension) or a single variable + type_qualifiers = get_children_by_types(node, ["type_qualifier"]) + for qualifier in type_qualifiers: + field = self.node_helper.get_identifier(qualifier.children[0]) - return cast_op + if field == "dimension": + variable_type = "List" + elif field == "intent": + variable_intent = self.node_helper.get_identifier(qualifier.children[1]) - def visit_variable_declaration(self, node): - # Node structure - # (variable_declaration) - # (intrinsic_type) - # (type_qualifier) - # (qualifier) - # (value) - # (identifier) ... - # (assignment_statement) ... - - # The type will be determined from the child intrensic_type node - # TODO: Expand this type map and move it somewhere else - type_map = { - "integer": "Integer", - "real": "AbstractFloat", - "complex": None, - "logical": "Boolean", - "character": "String", - } - - intrinsic_type = type_map[node["children"][0]["identifier"]] - variable_intent = "TODO" - - type_qualifiers = self.node_helper.get_children_by_type(node, "type_qualifier") - identifiers = self.node_helper.get_children_by_type(node, "identifier") - assignment_statements = self.node_helper.get_children_by_type( - node, "assignment_statement" + # You can declare multiple variables of the same type in a single statement, so we need to create a Var or Assignment node for each instance + definied_variables = get_children_by_types( + node, + [ + "identifier", # Variable declaration + "assignment_statement", # Variable assignment + "call_expression", # Dimension without intent + ], ) - - # We then need to determine if we are creating an array (dimension) or a single variable - for type_qualifier in type_qualifiers: - qualifier = type_qualifier["children"][0]["identifier"] - try: - value = type_qualifier["children"][1]["identifier"] - except IndexError: - # There are a few cases of qualifiers without values such as parameter. These are not currently being handled - continue - - if qualifier == "dimension": - intrinsic_type = "List" - elif qualifier == "intent": - variable_intent = value - - # You can declare multiple variables of the same type in a single statement, so we need to create a Var node for each instance vars = [] - for identifier in identifiers: - cast_var = self.visit(identifier) - cast_var.type = intrinsic_type - self.variable_context.update_type(cast_var.val.name, intrinsic_type) - - vars.append(cast_var) - - for assignment_statement in assignment_statements: - cast_assignment = self.visit(assignment_statement) - cast_assignment.left.type = intrinsic_type - self.variable_context.update_type( - cast_assignment.left.val.name, intrinsic_type - ) - - vars.append(cast_assignment) - - # If the intent is out, we need to add all these variables to the return values - # TODO: But what if one branch has a different return value? Are ifs going to be a seperate context + for variable in definied_variables: + if variable.type == "assignment_statement": + if variable.children[0].type == "call_expression": + vars.append( + Assignment( + left=self.visit( + get_first_child_by_type( + variable.children[0], "identifier" + ) + ), + right=self.visit(variable.children[2]), + source_refs=[ + self.node_helper.get_source_ref(variable) + ], + ) + ) + vars[-1].left.type = "dimension" + self.variable_context.update_type( + vars[-1].left.val.name, "dimension" + ) + else: + # If its a regular assignment, we can update the type normally + vars.append(self.visit(variable)) + vars[-1].left.type = variable_type + self.variable_context.update_type( + vars[-1].left.val.name, variable_type + ) + + elif variable.type == "identifier": + # A basic variable declaration, we visit the identifier and then update the type + vars.append(self.visit(variable)) + vars[-1].type = variable_type + self.variable_context.update_type(vars[-1].val.name, variable_type) + elif variable.type == "call_expression": + # Declaring a dimension variable using the x(1:5) format. It will look like a call expression in tree-sitter. + # We treat it like an identifier by visiting its identifier node. Then the type gets overridden by "dimension" + vars.append(self.visit(get_first_child_by_type(variable, "identifier"))) + vars[-1].type = "dimension" + self.variable_context.update_type(vars[-1].val.name, "dimension") + + # By default, all variables are added to a function's list of return values + # If the intent is actually in, then we need to remove them from the list if variable_intent == "in": for var in vars: self.variable_context.remove_return_value(var.val.name) @@ -705,23 +831,141 @@ def visit_extent_specifier(self, node): # The extent specifier is the same as a slice, it can have a start, stop, and step # We can determine these by looking at the number of control characters in this node. # Fortran uses the character ':' to differentiate these values - cast_call = Call() - cast_call.source_refs = node["source_refs"] - cast_call.func = self.get_gromet_function_node("slice") - cast_call.arguments = [ + argument_pointer = 0 + arguments = [ LiteralValue("None", "None"), LiteralValue("None", "None"), LiteralValue("None", "None"), ] - argument_pointer = 0 - - for child in node["original_children_order"]: - if child["type"] == ":": + for child in node.children: + if child.type == ":": argument_pointer += 1 else: - cast_call.arguments[argument_pointer] = self.visit(child) + arguments[argument_pointer] = self.visit(child) + + return Call( + func=self.get_gromet_function_node("slice"), + source_language="Fortran", + source_language_version="Fortran95", + arguments=arguments, + source_refs=[self.node_helper.get_source_ref(node)], + ) - return cast_call + def visit_derived_type(self, node: Node) -> RecordDef: + """Visitor function for derived type definition. Will return a RecordDef""" + """Node Structure: + (derived_type_definition) + (derived_type_statement) + (base) + (base_type_specifier) + (identifier) + (type_name) + (BODY_NODES) + ... + """ + + record_name = self.node_helper.get_identifier( + get_first_child_by_type(node, "type_name", recurse=True) + ) + + # There is no multiple inheritance in Fortran, so a type may only extend 1 other type + bases = [] + derived_type_statement_node = get_first_child_by_type( + node, "derived_type_statement" + ) + base_node = get_first_child_by_type( + derived_type_statement_node, "identifier", recurse=True + ) + if base_node: + bases.append([self.node_helper.get_identifier(base_node)]) + + # A derived type can contain symbols with the same name as those already in the main program body. + # If we tell the variable context we are in a record definition, it will append the type name as a prefix to all defined variables. + self.variable_context.enter_record_definition(record_name) + + # TODO: Full support for this requires handling the contains statement generally + funcs = [] + derived_type_procedures_node = get_first_child_by_type( + node, "derived_type_procedures" + ) + if derived_type_procedures_node: + for procedure_node in get_children_by_types( + derived_type_procedures_node, ["procedure_statement"] + ): + funcs.append( + self.visit_name( + get_first_child_by_type(procedure_node, "method_name") + ) + ) + + # A derived type can only have variable declarations in its body. + fields = [] + variable_declarations = [ + self.visit(variable_declaration) + for variable_declaration in get_children_by_types( + node, ["variable_declaration"] + ) + ] + for declaration in variable_declarations: + # Variable declarations always returns a list of Var or Assignment, even when only one var is being created + for var in declaration: + if isinstance(var, Var): + fields.append(var) + elif isinstance(var, Assignment): + # Since this is a record definition, an assignment is actually equivalent to setting the default value + var.left.default_value = var.right + fields.append(var.left) + # TODO: Handle dimension type (Call type) + elif isinstance(var, Call): + pass + # Leaving the record definition sets the prefix back to an empty string + self.variable_context.exit_record_definition() + + return RecordDef( + name=record_name, + bases=bases, + funcs=funcs, + fields=fields, + source_refs=[self.node_helper.get_source_ref(node)], + ) + + def visit_derived_type_member_expression(self, node) -> Attribute: + """Visitor function for derived type access. Returns an Attribute object""" + """ Node Structure + Scalar Access + (derived_type_member_expression) + (identifier) + (type_member) + + Dimensional Access + (derived_type_member_expression) + (call_expression) + (identifier) + (argument_list) + (type_member) + """ + + # If we are accessing an attribute of a scalar type, we can simply pull the name node from the variable context. + # However, if this is a dimensional type, we must convert it to a call to _get. + call_expression_node = get_first_child_by_type(node, "call_expression") + if call_expression_node: + value = self._visit_get(call_expression_node) + else: + value = self.variable_context.get_node( + self.node_helper.get_identifier( + get_first_child_by_type(node, "identifier", recurse=True), + ) + ) + + attr = self.node_helper.get_identifier( + get_first_child_by_type(node, "type_member", recurse=True) + ) + + return Attribute( + value=value, + attr=attr, + source_refs=[self.node_helper.get_source_ref(node)], + ) # NOTE: This function starts with _ because it will never be dispatched to directly. There is not a get node in the tree-sitter parse tree. # From context, we will determine when we are accessing an element of a List, and call this function, @@ -731,41 +975,37 @@ def _visit_get(self, node): # (identifier) # (argument_list) - assert len(node["children"]) == 2 - identifier = node["children"][0] - arguments = node["children"][1]["children"] - - # This is a call to the get Gromet function - cast_call = Call() - cast_call.source_refs = node["source_refs"] - - # We can generate/get the name node for the "get" function by passing the identifier node to the name visitor - cast_call.func = self.get_gromet_function_node("get") + identifier_node = node.children[0] + argument_nodes = get_non_control_children(node.children[1]) # First argument to get is the List itself. We can get this by passing the identifier to the identifier visitor - cast_call.arguments = [] - cast_call.arguments.append(self.visit(identifier)) + arguments = [] + arguments.append(self.visit(identifier_node)) # If there are more than one arguments, then this is a multi dimensional array and we need to use an extended slice - if len(arguments) > 1: + if len(argument_nodes) > 1: dimension_list = LiteralValue() - dimension_list.source_refs = node["children"][1]["source_refs"] dimension_list.value_type = "List" dimension_list.value = [] - for argument in arguments: + for argument in argument_nodes: dimension_list.value.append(self.visit(argument)) extslice_call = Call() - extslice_call.source_refs = node["source_refs"] extslice_call.func = self.get_gromet_function_node("ext_slice") extslice_call.arguments = [] extslice_call.arguments.append(dimension_list) - cast_call.arguments.append(extslice_call) + arguments.append(extslice_call) else: - cast_call.arguments.append(self.visit(arguments[0])) - - return cast_call + arguments.append(self.visit(argument_nodes[0])) + + return Call( + func=self.get_gromet_function_node("get"), + source_language="Fortran", + source_language_version="Fortran95", + arguments=arguments, + source_refs=[self.node_helper.get_source_ref(node)], + ) def _visit_set(self, node): # Node structure @@ -773,39 +1013,95 @@ def _visit_set(self, node): # (call_expression) # (right side) - assert (len(node["children"])) == 2 - left, right = node["children"] + left, _, right = node.children # The left side is equivilent to a call gromet "get", so we will first pass the left side to the get visitor # Then we can easily convert this to a "set" call by modifying the fields and then appending the right side to the function arguments cast_call = self._visit_get(left) - cast_call.source_refs = node["source_refs"] cast_call.func = self.get_gromet_function_node("set") cast_call.arguments.append(self.visit(right)) return cast_call - def _visit_passthrough(self, node): - if len(node["children"]) == 0: - return [] + def _visit_while(self, node) -> Loop: + """Custom visitor for while loop. Returns a Loop object""" + """ + Node structure + Do while + (do_loop_statement) + (while_statement) + (parenthesized_expression) + (...) ... + (body) ... + """ + while_statement_node = get_first_child_by_type(node, "while_statement") + + # The first body node will be the node after the while_statement + body = [] + body_start_index = 1 + get_first_child_index(node, "while_statement") + for body_node in node.children[body_start_index:]: + child_cast = self.visit(body_node) + if isinstance(child_cast, List): + body.extend(child_cast) + elif isinstance(child_cast, AstNode): + body.append(child_cast) - return self.visit(node["children"][0]) + # We don't have explicit handling for parenthesized_expression, but the passthrough handler will make sure that we visit the expression correctly. + expr = self.visit( + get_first_child_by_type(while_statement_node, "parenthesized_expression") + ) - def get_gromet_function_node(self, func_name: str) -> Name: - node_dict = {"identifier": func_name, "source_refs": [], "children": []} - cast_name = self.visit_name(node_dict) + return Loop( + pre=[], # TODO: Should pre and post contain anything? + expr=expr, + body=body, + post=[], + source_refs=[self.node_helper.get_source_ref(node)], + ) - return cast_name + def _visit_implied_do_loop(self, node) -> Call: + """Custom visitor for implied_do_loop array literal. This form gets converted to a call to range""" + # TODO: This loop_control is the same as the do loop. Can we turn this into one visitor? + loop_control_node = get_first_child_by_type( + node, "loop_control_expression", recurse=True + ) + loop_control_children = get_non_control_children(loop_control_node) + if len(loop_control_children) == 3: + itterator, start, stop = [ + self.visit(child) for child in loop_control_children + ] + step = LiteralValue("Integer", "1") + elif len(loop_control_children) == 4: + itterator, start, stop, step = [ + self.visit(child) for child in loop_control_children + ] + else: + itterator = None + start = None + stop = None + step = None + + return Call( + func=self.get_gromet_function_node("range"), + source_language=None, + source_language_version=None, + arguments=[start, stop, step], + source_refs=[self.node_helper.get_source_ref(node)], + ) - @staticmethod - def update_field(field: Any, element: Any) -> List: - if not field: - field = [] + def _visit_passthrough(self, node): + if len(node.children) == 0: + return None - if element: - if isinstance(element, List): - field.extend(element) - else: - field.append(element) + for child in node.children: + child_cast = self.visit(child) + if child_cast: + return child_cast + + def get_gromet_function_node(self, func_name: str) -> Name: + # Idealy, we would be able to create a dummy node and just call the name visitor. + # However, tree-sitter does not allow you to create or modify nodes, so we have to recreate the logic here. + if self.variable_context.is_variable(func_name): + return self.variable_context.get_node(func_name) - return field + return self.variable_context.add_variable(func_name, "function", None) diff --git a/skema/program_analysis/TS2CAST/util.py b/skema/program_analysis/TS2CAST/util.py index dc89dd4646b..07c12ee809c 100644 --- a/skema/program_analysis/TS2CAST/util.py +++ b/skema/program_analysis/TS2CAST/util.py @@ -2,7 +2,7 @@ from skema.program_analysis.CAST2FN.model.cast import AstNode, LiteralValue, SourceRef -def generate_dummy_source_refs(node: AstNode) -> None: +def generate_dummy_source_refs(node: AstNode) -> AstNode: """Walks a tree of AstNodes replacing any null SourceRefs with a dummy value""" if isinstance(node, LiteralValue) and not node.source_code_data_type: node.source_code_data_type = ["Fortran", "Fotran95", "None"] @@ -18,17 +18,5 @@ def generate_dummy_source_refs(node: AstNode) -> None: if isinstance(element, AstNode): generate_dummy_source_refs(element) + return node -def preprocess(source_code: str) -> str: - """ - Preprocesses Fortran source code: - 1. Replaces the first occurrence of '|' with '&' if it is the first non-whitespace character in the line. - 2. Adds an additional '&' to the previous line - """ - processed_lines = [] - for i, line in enumerate(source_code.splitlines()): - if line.lstrip().startswith("|"): - line = line.replace("|", "&", 1) - processed_lines[-1] += "&" - processed_lines.append(line) - return "\n".join(processed_lines) diff --git a/skema/program_analysis/TS2CAST/variable_context.py b/skema/program_analysis/TS2CAST/variable_context.py index d4b2592ae3a..eca184bee97 100644 --- a/skema/program_analysis/TS2CAST/variable_context.py +++ b/skema/program_analysis/TS2CAST/variable_context.py @@ -1,24 +1,46 @@ -from typing import List, Dict +from typing import List, Dict, Set from skema.program_analysis.CAST2FN.model.cast import ( Var, Name, ) - class VariableContext(object): def __init__(self): - self.variable_id = 0 - self.iterator_id = 0 - self.stop_condition_id = 0 self.context = [{}] # Stack of context dictionaries self.context_return_values = [set()] # Stack of context return values self.all_symbols = {} + self.record_definitions = {} + + # The prefix is used to handle adding Record types to the variable context. + # This gives each symbol a unqique name. For example "a" would become "type_name.a" + # For nested type definitions (derived type in a module), multiple prefixes can be added. + self.prefix = [] + + # Flag neccessary to declare if a function is internal or external + self.internal = False + + self.variable_id = 0 + self.iterator_id = 0 + self.stop_condition_id = 0 def push_context(self): + """Create a new variable context and add it to the stack""" + + # TODO: Could this add unwanted variables to the context or overwrite existing variables + # If the internal flag is set, then all new scopes will use the top-level context + if self.internal: + return None + self.context.append({}) self.context_return_values.append(set()) def pop_context(self): + """Pop the current variable context off of the stack and remove any references to those symbols.""" + + # If the internal flag is set, then all new scopes will use the top-level context + if self.internal: + return None + context = self.context.pop() # Remove symbols from all_symbols variable @@ -28,6 +50,10 @@ def pop_context(self): self.context_return_values.pop() def add_variable(self, symbol: str, type: str, source_refs: List) -> Name: + """Add a variable to the current variable context""" + # Generate the full symbol name using the prefix + full_symbol_name = ".".join(self.prefix + [symbol]) + cast_name = Name(source_refs=source_refs) cast_name.name = symbol cast_name.id = self.variable_id @@ -36,17 +62,18 @@ def add_variable(self, symbol: str, type: str, source_refs: List) -> Name: self.variable_id += 1 # Add the node to the variable context - self.context[-1][symbol] = { + self.context[-1][full_symbol_name] = { "node": cast_name, "type": type, } # Add reference to all_symbols - self.all_symbols[symbol] = self.context[-1][symbol] + self.all_symbols[full_symbol_name] = self.context[-1][full_symbol_name] return cast_name def is_variable(self, symbol: str) -> bool: + """Check if a symbol exists in any context""" return symbol in self.all_symbols def get_node(self, symbol: str) -> Dict: @@ -56,7 +83,10 @@ def get_type(self, symbol: str) -> str: return self.all_symbols[symbol]["type"] def update_type(self, symbol: str, type: str): - self.all_symbols[symbol]["type"] = type + """Update the type associated with a given symbol""" + # Generate the full symbol name using the prefix + full_symbol_name = ".".join(self.prefix + [symbol]) + self.all_symbols[full_symbol_name]["type"] = type def add_return_value(self, symbol): self.context_return_values[-1].add(symbol) @@ -75,3 +105,18 @@ def generate_stop_condition(self): self.stop_condition_id += 1 return self.add_variable(symbol, "boolean", None) + + def enter_record_definition(self, name: str): + """Enter a record definition. Updates the prefix to the name of the record""" + self.prefix.append(name) + + def exit_record_definition(self): + """Exit a record definition. Resets the prefix to the empty string""" + self.prefix.pop() + + def set_internal(self): + '''Set the internal flag, meaning, all ''' + self.internal = True + + def unset_internal(self): + self.internal = False \ No newline at end of file diff --git a/skema/program_analysis/multi_file_ingester.py b/skema/program_analysis/multi_file_ingester.py index 2f516719266..20b9ed2a7b9 100644 --- a/skema/program_analysis/multi_file_ingester.py +++ b/skema/program_analysis/multi_file_ingester.py @@ -1,8 +1,8 @@ import argparse import glob - import sys import os.path +from typing import List from skema.gromet import GROMET_VERSION from skema.gromet.fn import ( @@ -64,46 +64,55 @@ def process_file_system( else: print(f"File extension not supported for {full_file}") - cur_dir = os.getcwd() - os.chdir(os.path.join(os.getcwd(), path)) - generated_gromet = ann_cast_pipeline( - cast, gromet=True, to_file=False, from_obj=True - ) - os.chdir(cur_dir) - - # Then, after we generate the GroMEt we store it in the 'modules' field - # and store its path in the 'module_index' field - module_collection.modules.append(generated_gromet) - - # DONE: Change this so that it's the dotted path from the root - # i.e. like model.view.sir" like it shows up in Python - source_directory = os.path.basename( - os.path.normpath(root_dir) - ) # We just need the last directory of the path, not the complete path - os_module_path = os.path.join(source_directory, f) - - # Normalize the path across os and then convert to module dot notation - python_module_path = ".".join(os.path.normpath(os_module_path).split(os.path.sep)) - python_module_path = python_module_path.replace(".py", "").strip() - - module_collection.module_index.append(python_module_path) - - # Done: Determine how we know a gromet goes in the 'executable' field - # We do this by finding all user_defined top level functions in the Gromet - # and check if the name 'main' is among them - function_networks = [ - fn - for fn in generated_gromet.fn_array - ] - defined_functions = [ - fn.b[0].name - for fn in function_networks - if fn.b[0].function_type == "FUNCTION" - ] - if "main" in defined_functions: - module_collection.executables.append( - len(module_collection.module_index) + # The Fortran CAST inteface (TS2CAST) can produce multiple CAST modules. + # However, the Python interface (python2cast) will only return a single module. + # This workaround will normalize a single CAST module into a list for consistent processing. + if isinstance(cast, List): + cast_list = cast + else: + cast_list = [cast] + + for cast_module in cast_list: + cur_dir = os.getcwd() + os.chdir(os.path.join(os.getcwd(), path)) + generated_gromet = ann_cast_pipeline( + cast_module, gromet=True, to_file=False, from_obj=True ) + os.chdir(cur_dir) + + # Then, after we generate the GroMEt we store it in the 'modules' field + # and store its path in the 'module_index' field + module_collection.modules.append(generated_gromet) + + # DONE: Change this so that it's the dotted path from the root + # i.e. like model.view.sir" like it shows up in Python + source_directory = os.path.basename( + os.path.normpath(root_dir) + ) # We just need the last directory of the path, not the complete path + os_module_path = os.path.join(source_directory, f) + + # Normalize the path across os and then convert to module dot notation + python_module_path = ".".join(os.path.normpath(os_module_path).split(os.path.sep)) + python_module_path = python_module_path.replace(".py", "").strip() + + module_collection.module_index.append(python_module_path) + + # Done: Determine how we know a gromet goes in the 'executable' field + # We do this by finding all user_defined top level functions in the Gromet + # and check if the name 'main' is among them + function_networks = [ + fn + for fn in generated_gromet.fn_array + ] + defined_functions = [ + fn.b[0].name + for fn in function_networks + if fn.b[0].function_type == "FUNCTION" + ] + if "main" in defined_functions: + module_collection.executables.append( + len(module_collection.module_index) + ) except ImportError as e: print("FAILURE") From 243032c9bb9f9ed892ff5a2488e9d6f87dfd3bb7 Mon Sep 17 00:00:00 2001 From: Enrique Noriega Date: Fri, 14 Jul 2023 10:26:14 -0400 Subject: [PATCH 2/4] [TR][METAL] Added a router for METAL (which is link_amr for now) (#332) Here will go endpoints to link AMR, Gromets and the future METAL features --- skema/rest/api.py | 20 ++++- skema/rest/integrated_text_reading_proxy.py | 11 +-- skema/rest/metal_proxy.py | 74 ++++++++++++++++++ skema/rest/schema.py | 5 ++ .../CHIME_SVIIvR_model.pdf | Bin .../buckymodel_webdocs.pdf | Bin .../data/metal/fixed_scenario1_amr_eq.json | 1 + .../tests/data/metal/tr_document_results.json | 1 + .../test_integrated_text_reading_proxy.py | 18 ++--- skema/rest/tests/test_metal_proxy.py | 48 ++++++++++++ 10 files changed, 157 insertions(+), 21 deletions(-) create mode 100644 skema/rest/metal_proxy.py rename skema/rest/tests/data/{ => integrated_text_reading}/CHIME_SVIIvR_model.pdf (100%) rename skema/rest/tests/data/{ => integrated_text_reading}/buckymodel_webdocs.pdf (100%) create mode 100644 skema/rest/tests/data/metal/fixed_scenario1_amr_eq.json create mode 100644 skema/rest/tests/data/metal/tr_document_results.json create mode 100644 skema/rest/tests/test_metal_proxy.py diff --git a/skema/rest/api.py b/skema/rest/api.py index 7cef0e29410..bb4b6d4711b 100644 --- a/skema/rest/api.py +++ b/skema/rest/api.py @@ -5,7 +5,7 @@ workflows, integrated_text_reading_proxy, morae_proxy, - comments_proxy, + comments_proxy, metal_proxy, ) from skema.img2mml import eqn2mml from skema.skema_py import server as code2fn @@ -65,6 +65,10 @@ "name": "text reading", "description": "Unified proxy and integration code for MIT and SKEMA TR pipelines", }, + { + "name": "metal", + "description": "AMR linking endpoints", + }, ] app = FastAPI( @@ -106,7 +110,15 @@ ) app.include_router( - integrated_text_reading_proxy.router, prefix="/text-reading", tags=["text reading"] + integrated_text_reading_proxy.router, + prefix="/text-reading", + tags=["text reading"] +) + +app.include_router( + metal_proxy.router, + prefix="/metal", + tags=["metal"] ) @@ -137,6 +149,7 @@ async def healthcheck(response: Response) -> schema.HealthStatus: eqn2mml_status = eqn2mml.img2mml_healthcheck() code2fn_status = code2fn.ping() text_reading_status = integrated_text_reading_proxy.healthcheck() + metal_status = metal_proxy.healthcheck() # check if any services failing and alter response status code accordingly status_code = ( status.HTTP_200_OK @@ -148,6 +161,7 @@ async def healthcheck(response: Response) -> schema.HealthStatus: eqn2mml_status, code2fn_status, text_reading_status, + metal_status ] ) else status.HTTP_500_INTERNAL_SERVER_ERROR @@ -158,4 +172,6 @@ async def healthcheck(response: Response) -> schema.HealthStatus: mathjax=mathjax_status, eqn2mml=eqn2mml_status, code2fn=code2fn_status, + text_reading=text_reading_status, + metal=metal_status ) diff --git a/skema/rest/integrated_text_reading_proxy.py b/skema/rest/integrated_text_reading_proxy.py index e6985019cc7..eb8f7dcd104 100644 --- a/skema/rest/integrated_text_reading_proxy.py +++ b/skema/rest/integrated_text_reading_proxy.py @@ -2,22 +2,17 @@ import io import itertools as it import json -import os import tempfile import time from pathlib import Path -from typing import List, Union, Text, BinaryIO, Callable - -from pydantic import Json -from typing_extensions import Literal +from typing import List, Union, BinaryIO, Callable from typing import Optional, Dict, Any from zipfile import ZipFile -import pandas as pd +import pandas as pd import requests from askem_extractions.data_model import AttributeCollection -from askem_extractions.importers import import_arizona, import_mit -from askem_extractions.importers.mit import merge_collections +from askem_extractions.importers import import_arizona from fastapi import APIRouter, FastAPI, UploadFile, Response, status from skema.rest.proxies import SKEMA_TR_ADDRESS, MIT_TR_ADDRESS, OPENAI_KEY, COSMOS_ADDRESS diff --git a/skema/rest/metal_proxy.py b/skema/rest/metal_proxy.py new file mode 100644 index 00000000000..e20bc2d0d7b --- /dev/null +++ b/skema/rest/metal_proxy.py @@ -0,0 +1,74 @@ +import json +import itertools as it + +from askem_extractions.data_model import AttributeCollection +from fastapi import UploadFile, File, APIRouter, FastAPI +from pydantic import Json + + +from skema.metal.model_linker.skema_model_linker.linkers import PetriNetLinker, RegNetLinker +from skema.metal.model_linker.skema_model_linker.link_amr import replace_xml_codepoints +from skema.rest.schema import TextReadingAnnotationsOutput + +router = APIRouter() + + +@router.post( + "/link_amr", +) +def link_amr(amr_type: str, + similarity_model: str = "sentence-transformers/all-MiniLM-L6-v2", + similarity_threshold: float = 0.5, + amr_file: UploadFile = File(...), + text_extractions_file: UploadFile = File(...)): + """ Links an AMR to a text extractions file """ + + # Load the AMR + amr = json.load(amr_file.file) + amr = replace_xml_codepoints(amr) + + # Load the extractions, that come out of the TR Proxy endpoing + text_extractions = TextReadingAnnotationsOutput(**json.load(text_extractions_file.file)) + + # Merge all the attribute collections + extractions = AttributeCollection( + attributes=list( + it.chain.from_iterable(o.data.attributes for o in text_extractions.outputs) + ) + ) + + # Link the AMR + if amr_type == "petrinet": + Linker = PetriNetLinker + elif amr_type == "regnet": + Linker = RegNetLinker + else: + raise NotImplementedError(f"{amr_type} AMR currently not supported") + + linker = Linker(model_name=similarity_model, sim_threshold=similarity_threshold) + + return linker.link_model_to_text_extractions(amr, extractions) + + +@router.get( + "/healthcheck", + response_model=int, + status_code=200, + responses={ + 200: { + "model": int, + "description": "All component services are healthy (200 status)", + }, + 500: { + "model": int, + "description": "Internal error occurred", + "example_value": 500 + } + }, +) +def healthcheck(): + return 200 + + +app = FastAPI() +app.include_router(router) diff --git a/skema/rest/schema.py b/skema/rest/schema.py index 214599bcf00..e1fba680116 100644 --- a/skema/rest/schema.py +++ b/skema/rest/schema.py @@ -32,6 +32,11 @@ class HealthStatus(BaseModel): ge=100, le=599, ) + metal: int = Field( + description="HTTP status code for the integrated text reading service", + ge=100, + le=599, + ) class EquationImagesToAMR(BaseModel): diff --git a/skema/rest/tests/data/CHIME_SVIIvR_model.pdf b/skema/rest/tests/data/integrated_text_reading/CHIME_SVIIvR_model.pdf similarity index 100% rename from skema/rest/tests/data/CHIME_SVIIvR_model.pdf rename to skema/rest/tests/data/integrated_text_reading/CHIME_SVIIvR_model.pdf diff --git a/skema/rest/tests/data/buckymodel_webdocs.pdf b/skema/rest/tests/data/integrated_text_reading/buckymodel_webdocs.pdf similarity index 100% rename from skema/rest/tests/data/buckymodel_webdocs.pdf rename to skema/rest/tests/data/integrated_text_reading/buckymodel_webdocs.pdf diff --git a/skema/rest/tests/data/metal/fixed_scenario1_amr_eq.json b/skema/rest/tests/data/metal/fixed_scenario1_amr_eq.json new file mode 100644 index 00000000000..2a970b5a011 --- /dev/null +++ b/skema/rest/tests/data/metal/fixed_scenario1_amr_eq.json @@ -0,0 +1 @@ +{"name":"mathml model","schema":"https://github.com/DARPA-ASKEM/Model-Representations/blob/main/petrinet/petrinet_schema.json","schema_name":"PetriNet","description":"This is a model from mathml equations","model_version":"0.1","model":{"states":[{"id":"D","name":"D"},{"id":"E","name":"E"},{"id":"I","name":"I"},{"id":"R","name":"R"},{"id":"S","name":"S"}],"transitions":[{"id":"t0","input":["S","I"],"output":["E","I"],"grounding":null},{"id":"t1","input":["E"],"output":["I"],"grounding":null},{"id":"t2","input":["I"],"output":["R"],"grounding":null},{"id":"t3","input":["I"],"output":["D"],"grounding":null}]},"semantics":{"ode":{"rates":[{"target":"t0","expression":"","expression_mathml":"SβIN"},{"target":"t1","expression":"","expression_mathml":"δE"},{"target":"t2","expression":"","expression_mathml":"I1αγ"},{"target":"t3","expression":"","expression_mathml":"Iαρ"}],"initials":[{"target":"S","expression":"S0","expression_mathml":""},{"target":"E","expression":"E0","expression_mathml":""},{"target":"I","expression":"I0","expression_mathml":""},{"target":"R","expression":"R0","expression_mathml":""},{"target":"D","expression":"D0","expression_mathml":""}],"parameters":[{"id":"α","name":"α","description":"α rate"},{"id":"β","name":"β","description":"β rate"},{"id":"γ","name":"γ","description":"γ rate"},{"id":"δ","name":"δ","description":"δ rate"},{"id":"ρ","name":"ρ","description":"ρ rate"},{"id":"1","name":"1","description":"1 rate"},{"id":"D0","name":"D0","description":"The total D population at timestep 0"},{"id":"E0","name":"E0","description":"The total E population at timestep 0"},{"id":"I0","name":"I0","description":"The total I population at timestep 0"},{"id":"N","name":"N","description":"N rate"},{"id":"R0","name":"R0","description":"The total R population at timestep 0"},{"id":"S0","name":"S0","description":"The total S population at timestep 0"}]}}} \ No newline at end of file diff --git a/skema/rest/tests/data/metal/tr_document_results.json b/skema/rest/tests/data/metal/tr_document_results.json new file mode 100644 index 00000000000..c6f3d8130f3 --- /dev/null +++ b/skema/rest/tests/data/metal/tr_document_results.json @@ -0,0 +1 @@ +{"outputs": [{"data": {"attributes": [{"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "E:-1621000196"}, "names": [{"id": {"id": "T:-2105346093"}, "name": "potential prevention of up", "extraction_source": {"page": 0, "block": 0, "char_start": 524, "char_end": 550, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.887148"}}, {"id": {"id": "v1"}, "name": "E(t)", "extraction_source": null, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}], "descriptions": [{"id": {"id": "v1"}, "source": " Number of people exposed on day t", "grounding": null, "extraction_source": null, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}], "value_specs": [{"id": {"id": "T:-202544802"}, "value": {"source": "%", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 556, "char_end": 557, "document_reference": {"id": "ijerph-18-09027.pdf"}}}, "units": null, "type": null, "bounds": null, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.887148"}}], "groundings": [{"grounding_text": "Centers for Disease Control and Prevention", "grounding_id": "ncit:C16408", "source": [], "score": 0.7546381950378418, "provenance": {"method": "SKEMA-TR-Embedding", "timestamp": "2023-07-04T01:15:56.887183"}}], "data_columns": [{"id": {"id": "5-2"}, "name": "new_confirmed_age_0", "dataset": {"id": {"id": "5"}, "name": "usa-cases-hospitalized-by-age.csv", "metadata": "https://github.com/DARPA-ASKEM/program-milestones/blob/main/6-month-milestone/evaluation/scenario_3/ta_1/google-health-data/usa-cases-hospitalized-by-age.csv"}}, {"id": {"id": "5-3"}, "name": "new_confirmed_age_1", "dataset": {"id": {"id": "5"}, "name": "usa-cases-hospitalized-by-age.csv", "metadata": "https://github.com/DARPA-ASKEM/program-milestones/blob/main/6-month-milestone/evaluation/scenario_3/ta_1/google-health-data/usa-cases-hospitalized-by-age.csv"}}]}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "R:-1621439126"}, "names": [{"id": {"id": "T:816130011"}, "name": "t. beta", "extraction_source": {"page": 0, "block": 0, "char_start": 149, "char_end": 156, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.888156"}}], "descriptions": [{"id": {"id": "T:254088697"}, "source": "day t.", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 145, "char_end": 151, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.888156"}}], "value_specs": [], "groundings": [], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "E:-1984431110"}, "names": [{"id": {"id": "T:920174442"}, "name": "alpha", "extraction_source": {"page": 0, "block": 0, "char_start": 303, "char_end": 308, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.888266"}}, {"id": {"id": "v15"}, "name": "\u03b1", "extraction_source": null, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}], "descriptions": [{"id": {"id": "T:-1889939553"}, "source": "fatality rate", "grounding": [{"grounding_text": "case fatality rate", "grounding_id": "cemo:case_fatality_rate", "source": [], "score": 0.928100049495697, "provenance": {"method": "SKEMA-TR-Embedding", "timestamp": "2023-07-04T01:15:56.888321"}}], "extraction_source": {"page": 0, "block": 0, "char_start": 316, "char_end": 329, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.888266"}}, {"id": {"id": "v15"}, "source": " Fatality rate due to the infection", "grounding": null, "extraction_source": null, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}, {"id": {"id": "v15"}, "source": " Fatality rate is defined as the percentage of deaths among all previously infected individuals", "grounding": null, "extraction_source": null, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}], "value_specs": [], "groundings": [{"grounding_text": "Van", "grounding_id": "geonames:298117", "source": [], "score": 1.0, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}, {"grounding_text": "Sfax", "grounding_id": "geonames:2467454", "source": [], "score": 1.0, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "E:-582843307"}, "names": [{"id": {"id": "T:1139102624"}, "name": "delta", "extraction_source": {"page": 0, "block": 0, "char_start": 271, "char_end": 276, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.888375"}}, {"id": {"id": "v14"}, "name": "\u03b4", "extraction_source": null, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}], "descriptions": [{"id": {"id": "T:122388655"}, "source": "incubation period", "grounding": [{"grounding_text": "incubation period", "grounding_id": "apollosv:00000317", "source": [], "score": 0.9989535808563232, "provenance": {"method": "SKEMA-TR-Embedding", "timestamp": "2023-07-04T01:15:56.888428"}}], "extraction_source": {"page": 0, "block": 0, "char_start": 284, "char_end": 301, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.888375"}}, {"id": {"id": "v14"}, "source": " Incubation period", "grounding": null, "extraction_source": null, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}, {"id": {"id": "v14"}, "source": " The SARS-CoV2 virus has an incubation period of about 5 days", "grounding": null, "extraction_source": null, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}], "value_specs": [], "groundings": [{"grounding_text": "Gent", "grounding_id": "geonames:2797656", "source": [], "score": 1.0, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}, {"grounding_text": "Adana", "grounding_id": "geonames:325363", "source": [], "score": 1.0, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "E:1549850624"}, "names": [{"id": {"id": "T:-588734649"}, "name": "gamma", "extraction_source": {"page": 0, "block": 0, "char_start": 226, "char_end": 231, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.888482"}}, {"id": {"id": "v13"}, "name": "\u03b3", "extraction_source": null, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}], "descriptions": [{"id": {"id": "T:-596460119"}, "source": "proportion of recovery per day", "grounding": [{"grounding_text": "average daily number of new infections generated per case (rt)", "grounding_id": "cemo:average_daily_number_of_new_infections_generated_per_case_rt", "source": [], "score": 0.8275450468063354, "provenance": {"method": "SKEMA-TR-Embedding", "timestamp": "2023-07-04T01:15:56.888535"}}], "extraction_source": {"page": 0, "block": 0, "char_start": 239, "char_end": 269, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.888482"}}, {"id": {"id": "v13"}, "source": " Proportion of recovery per day", "grounding": null, "extraction_source": null, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}, {"id": {"id": "v13"}, "source": " rate of recovery", "grounding": null, "extraction_source": null, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}], "value_specs": [], "groundings": [{"grounding_text": "gamma distribution", "grounding_id": "apollosv:00000255", "source": [], "score": 0.8174800872802734, "provenance": {"method": "SKEMA-TR-Embedding", "timestamp": "2023-07-04T01:15:56.888503"}}, {"grounding_text": "Vigo", "grounding_id": "geonames:3105976", "source": [], "score": 1.0, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}, {"grounding_text": "Riga", "grounding_id": "geonames:456172", "source": [], "score": 1.0, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "E:-695141294"}, "names": [{"id": {"id": "T:204344588"}, "name": "N", "extraction_source": {"page": 0, "block": 0, "char_start": 6, "char_end": 7, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.888590"}}, {"id": {"id": "v0"}, "name": "S(t)", "extraction_source": null, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}], "descriptions": [{"id": {"id": "T:-200627336"}, "source": "total population", "grounding": [{"grounding_text": "Standard Million Population", "grounding_id": "ncit:C71557", "source": [], "score": 0.8033140897750854, "provenance": {"method": "SKEMA-TR-Embedding", "timestamp": "2023-07-04T01:15:56.888643"}}], "extraction_source": {"page": 0, "block": 0, "char_start": 15, "char_end": 31, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.888590"}}, {"id": {"id": "v0"}, "source": " Number of people susceptible on day t", "grounding": null, "extraction_source": null, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}], "value_specs": [], "groundings": [{"grounding_text": "V-LSG/N", "grounding_id": "vo:0004083", "source": [], "score": 1.0000001192092896, "provenance": {"method": "SKEMA-TR-Embedding", "timestamp": "2023-07-04T01:15:56.888611"}}], "data_columns": [{"id": {"id": "0-6"}, "name": "cumulative_confirmed", "dataset": {"id": {"id": "0"}, "name": "usa-cases-deaths.csv", "metadata": "https://github.com/DARPA-ASKEM/program-milestones/blob/main/6-month-milestone/evaluation/scenario_3/ta_1/google-health-data/usa-cases-deaths.csv"}}, {"id": {"id": "5-12"}, "name": "cumulative_confirmed_age_0", "dataset": {"id": {"id": "5"}, "name": "usa-cases-hospitalized-by-age.csv", "metadata": "https://github.com/DARPA-ASKEM/program-milestones/blob/main/6-month-milestone/evaluation/scenario_3/ta_1/google-health-data/usa-cases-hospitalized-by-age.csv"}}]}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "R:1863362492"}, "names": [{"id": {"id": "T:1753779778"}, "name": "beta(t)", "extraction_source": {"page": 0, "block": 0, "char_start": 919, "char_end": 926, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.888807"}}], "descriptions": [], "value_specs": [{"id": {"id": "T:-815101101"}, "value": {"source": "m(t", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 945, "char_end": 948, "document_reference": {"id": "ijerph-18-09027.pdf"}}}, "units": null, "type": null, "bounds": null, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.888807"}}], "groundings": [], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "R:-2131818727"}, "names": [{"id": {"id": "T:1753779778"}, "name": "beta(t)", "extraction_source": {"page": 0, "block": 0, "char_start": 919, "char_end": 926, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.888993"}}, {"id": {"id": "v12"}, "name": "\u03b2", "extraction_source": null, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}], "descriptions": [{"id": {"id": "T:565214554"}, "source": "beta", "grounding": [{"grounding_text": "beta distribution", "grounding_id": "apollosv:00000078", "source": [], "score": 0.807852566242218, "provenance": {"method": "SKEMA-TR-Embedding", "timestamp": "2023-07-04T01:15:56.889046"}}], "extraction_source": {"page": 0, "block": 0, "char_start": 919, "char_end": 923, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.888993"}}, {"id": {"id": "v12"}, "source": " Expected number of people an infected person infects per day", "grounding": null, "extraction_source": null, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}], "value_specs": [], "groundings": [{"grounding_text": "Lviv", "grounding_id": "geonames:702550", "source": [], "score": 1.0, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}, {"grounding_text": "Havana", "grounding_id": "geonames:3553478", "source": [], "score": 1.0, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}], "data_columns": [{"id": {"id": "4-28"}, "name": "H2_Testing policy", "dataset": {"id": {"id": "4"}, "name": "OxCGRT_nat_latest.csv", "metadata": "https://raw.githubusercontent.com/OxCGRT/covid-policy-tracker/master/data/OxCGRT_nat_latest.csv"}}, {"id": {"id": "4-32"}, "name": "H6M_Facial Coverings", "dataset": {"id": {"id": "4"}, "name": "OxCGRT_nat_latest.csv", "metadata": "https://raw.githubusercontent.com/OxCGRT/covid-policy-tracker/master/data/OxCGRT_nat_latest.csv"}}]}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "R:-136675206"}, "names": [{"id": {"id": "T:1753779778"}, "name": "beta(t)", "extraction_source": {"page": 0, "block": 0, "char_start": 919, "char_end": 926, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.889174"}}], "descriptions": [{"id": {"id": "T:565214554"}, "source": "beta", "grounding": [{"grounding_text": "beta distribution", "grounding_id": "apollosv:00000078", "source": [], "score": 0.807852566242218, "provenance": {"method": "SKEMA-TR-Embedding", "timestamp": "2023-07-04T01:15:56.889228"}}], "extraction_source": {"page": 0, "block": 0, "char_start": 919, "char_end": 923, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.889174"}}], "value_specs": [{"id": {"id": "T:-815101101"}, "value": {"source": "m(t", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 945, "char_end": 948, "document_reference": {"id": "ijerph-18-09027.pdf"}}}, "units": null, "type": null, "bounds": null, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.889174"}}], "groundings": [], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "E:-375195508"}, "names": [{"id": {"id": "T:-1521295218"}, "name": "betac", "extraction_source": {"page": 0, "block": 0, "char_start": 1224, "char_end": 1229, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.889401"}}, {"id": {"id": "v4"}, "name": "SEIS", "extraction_source": null, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}], "descriptions": [{"id": {"id": "v4"}, "source": " Compartmental model used to investigate the impact of the delay in compulsory mask wearing on the spread of COVID-19 in the community", "grounding": null, "extraction_source": null, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}], "value_specs": [{"id": {"id": "T:-917512268"}, "value": {"source": "0.4", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 1232, "char_end": 1235, "document_reference": {"id": "ijerph-18-09027.pdf"}}}, "units": null, "type": null, "bounds": null, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.889401"}}], "groundings": [{"grounding_text": "Chongjin", "grounding_id": "geonames:2044757", "source": [], "score": 1.0, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}, {"grounding_text": "Mor\u00f3n", "grounding_id": "geonames:3430545", "source": [], "score": 1.0, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "E:-227734974"}, "names": [{"id": {"id": "T:-100782741"}, "name": "betas", "extraction_source": {"page": 0, "block": 0, "char_start": 1210, "char_end": 1215, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.889547"}}, {"id": {"id": "v19"}, "name": "\u03b2s", "extraction_source": null, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}], "descriptions": [{"id": {"id": "v19"}, "source": " infection rate before masking enforcement", "grounding": null, "extraction_source": null, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}], "value_specs": [{"id": {"id": "T:875393014"}, "value": {"source": "1", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 1218, "char_end": 1219, "document_reference": {"id": "ijerph-18-09027.pdf"}}}, "units": null, "type": null, "bounds": null, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.889547"}}], "groundings": [], "data_columns": [{"id": {"id": "4-32"}, "name": "H6M_Facial Coverings", "dataset": {"id": {"id": "4"}, "name": "OxCGRT_nat_latest.csv", "metadata": "https://raw.githubusercontent.com/OxCGRT/covid-policy-tracker/master/data/OxCGRT_nat_latest.csv"}}, {"id": {"id": "4-33"}, "name": "H6M_Flag", "dataset": {"id": {"id": "4"}, "name": "OxCGRT_nat_latest.csv", "metadata": "https://raw.githubusercontent.com/OxCGRT/covid-policy-tracker/master/data/OxCGRT_nat_latest.csv"}}]}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "R:2011356353"}, "names": [{"id": {"id": "T:854706656"}, "name": "beta(t)", "extraction_source": {"page": 0, "block": 0, "char_start": 951, "char_end": 958, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.889693"}}], "descriptions": [{"id": {"id": "T:-2070956792"}, "source": "beta", "grounding": [{"grounding_text": "beta distribution", "grounding_id": "apollosv:00000078", "source": [], "score": 0.807852566242218, "provenance": {"method": "SKEMA-TR-Embedding", "timestamp": "2023-07-04T01:15:56.889746"}}], "extraction_source": {"page": 0, "block": 0, "char_start": 951, "char_end": 955, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.889693"}}], "value_specs": [], "groundings": [], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "E:1157924531"}, "names": [{"id": {"id": "T:854706656"}, "name": "beta(t)", "extraction_source": {"page": 0, "block": 0, "char_start": 951, "char_end": 958, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.889932"}}], "descriptions": [{"id": {"id": "T:-668996858"}, "source": "beta", "grounding": [{"grounding_text": "beta distribution", "grounding_id": "apollosv:00000078", "source": [], "score": 0.807852566242218, "provenance": {"method": "SKEMA-TR-Embedding", "timestamp": "2023-07-04T01:15:56.889987"}}], "extraction_source": {"page": 0, "block": 0, "char_start": 951, "char_end": 955, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.889932"}}], "value_specs": [], "groundings": [], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "R:526915523"}, "names": [{"id": {"id": "T:854706656"}, "name": "beta(t)", "extraction_source": {"page": 0, "block": 0, "char_start": 951, "char_end": 958, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.890112"}}], "descriptions": [{"id": {"id": "T:-668996858"}, "source": "beta", "grounding": [{"grounding_text": "beta distribution", "grounding_id": "apollosv:00000078", "source": [], "score": 0.807852566242218, "provenance": {"method": "SKEMA-TR-Embedding", "timestamp": "2023-07-04T01:15:56.890164"}}], "extraction_source": {"page": 0, "block": 0, "char_start": 951, "char_end": 955, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.890112"}}], "value_specs": [], "groundings": [], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "R:-328739983"}, "names": [{"id": {"id": "T:-778701288"}, "name": "I(t)", "extraction_source": {"page": 0, "block": 0, "char_start": 96, "char_end": 100, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.890288"}}], "descriptions": [{"id": {"id": "T:1898529592"}, "source": "infection rate", "grounding": [{"grounding_text": "Infection Fatality Rate", "grounding_id": "ncit:C173780", "source": [], "score": 0.9256949424743652, "provenance": {"method": "SKEMA-TR-Embedding", "timestamp": "2023-07-04T01:15:56.890340"}}], "extraction_source": {"page": 0, "block": 0, "char_start": 81, "char_end": 95, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.890288"}}], "value_specs": [], "groundings": [{"grounding_text": "Meruvax I", "grounding_id": "vo:0003109", "source": [], "score": 0.9162705540657043, "provenance": {"method": "SKEMA-TR-Embedding", "timestamp": "2023-07-04T01:15:56.890308"}}], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "E:1248386289"}, "names": [{"id": {"id": "T:297276415"}, "name": "t0", "extraction_source": {"page": 0, "block": 0, "char_start": 1250, "char_end": 1252, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.890446"}}, {"id": {"id": "v22"}, "name": "t0", "extraction_source": null, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}], "descriptions": [{"id": {"id": "T:1110367501"}, "source": "number of days after the first case", "grounding": [{"grounding_text": "number of cases hospitalized this week", "grounding_id": "cemo:number_of_cases_hospitalized_this_week", "source": [], "score": 0.8328390717506409, "provenance": {"method": "SKEMA-TR-Embedding", "timestamp": "2023-07-04T01:15:56.890501"}}], "extraction_source": {"page": 0, "block": 0, "char_start": 1260, "char_end": 1295, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.890446"}}, {"id": {"id": "v22"}, "source": " number of days after first case where masking wearing is enforced", "grounding": null, "extraction_source": null, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}], "value_specs": [], "groundings": [{"grounding_text": "DeltaFTT0918", "grounding_id": "vo:0011346", "source": [], "score": 1.0, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}, {"grounding_text": "VAT00002", "grounding_id": "vo:0005085", "source": [], "score": 1.0, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}], "data_columns": [{"id": {"id": "4-32"}, "name": "H6M_Facial Coverings", "dataset": {"id": {"id": "4"}, "name": "OxCGRT_nat_latest.csv", "metadata": "https://raw.githubusercontent.com/OxCGRT/covid-policy-tracker/master/data/OxCGRT_nat_latest.csv"}}, {"id": {"id": "4-33"}, "name": "H6M_Flag", "dataset": {"id": {"id": "4"}, "name": "OxCGRT_nat_latest.csv", "metadata": "https://raw.githubusercontent.com/OxCGRT/covid-policy-tracker/master/data/OxCGRT_nat_latest.csv"}}]}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "R:46512816"}, "names": [{"id": {"id": "T:1372637564"}, "name": "policy of compulsory mask wearing", "extraction_source": {"page": 0, "block": 0, "char_start": 1443, "char_end": 1476, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.890627"}}], "descriptions": [], "value_specs": [{"id": {"id": "T:504003322"}, "value": {"source": "89", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 1429, "char_end": 1431, "document_reference": {"id": "ijerph-18-09027.pdf"}}}, "units": null, "type": null, "bounds": null, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.890627"}}], "groundings": [], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "R:-407044703"}, "names": [{"id": {"id": "T:-1337030228"}, "name": "example of such logistic function", "extraction_source": {"page": 0, "block": 0, "char_start": 1349, "char_end": 1382, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.890751"}}], "descriptions": [], "value_specs": [{"id": {"id": "T:-1178444117"}, "value": {"source": "1", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 1338, "char_end": 1339, "document_reference": {"id": "ijerph-18-09027.pdf"}}}, "units": null, "type": null, "bounds": null, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.890751"}}], "groundings": [{"grounding_text": "Semantic_Type", "grounding_id": "ncit:P106", "source": [], "score": 0.7590150833129883, "provenance": {"method": "SKEMA-TR-Embedding", "timestamp": "2023-07-04T01:15:56.890773"}}], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "R:-1111531285"}, "names": [{"id": {"id": "T:-1193111762"}, "name": "47%", "extraction_source": {"page": 0, "block": 0, "char_start": 453, "char_end": 456, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.890923"}}], "descriptions": [], "value_specs": [{"id": {"id": "T:1656041964"}, "value": {"source": "%", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 485, "char_end": 486, "document_reference": {"id": "ijerph-18-09027.pdf"}}}, "units": null, "type": null, "bounds": null, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.890923"}}], "groundings": [], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "E:-445420568"}, "names": [{"id": {"id": "T:900109584"}, "name": "t1", "extraction_source": {"page": 0, "block": 0, "char_start": 739, "char_end": 741, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.891244"}}, {"id": {"id": "v23"}, "name": "t1", "extraction_source": null, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}], "descriptions": [{"id": {"id": "v23"}, "source": " number of days after first case where noncompliance begins", "grounding": null, "extraction_source": null, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}], "value_specs": [{"id": {"id": "T:914267078"}, "value": {"source": "154", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 744, "char_end": 747, "document_reference": {"id": "ijerph-18-09027.pdf"}}}, "units": null, "type": null, "bounds": null, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.891244"}}], "groundings": [{"grounding_text": "BT1", "grounding_id": "vo:0011160", "source": [], "score": 1.0, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}, {"grounding_text": "Wishart1", "grounding_id": "probonto:k0000082", "source": [], "score": 1.0, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "E:-1296333892"}, "names": [{"id": {"id": "T:-1184616859"}, "name": "betanc", "extraction_source": {"page": 0, "block": 0, "char_start": 722, "char_end": 728, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.891360"}}, {"id": {"id": "v21"}, "name": "\u03b2nc", "extraction_source": null, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}], "descriptions": [{"id": {"id": "v21"}, "source": " infection rate due to noncompliance", "grounding": null, "extraction_source": null, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}, {"id": {"id": "v21"}, "source": " Rate of noncompliance", "grounding": null, "extraction_source": null, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}], "value_specs": [{"id": {"id": "T:-589212944"}, "value": {"source": "0.5", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 731, "char_end": 734, "document_reference": {"id": "ijerph-18-09027.pdf"}}}, "units": null, "type": null, "bounds": null, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.891360"}}], "groundings": [], "data_columns": [{"id": {"id": "4-32"}, "name": "H6M_Facial Coverings", "dataset": {"id": {"id": "4"}, "name": "OxCGRT_nat_latest.csv", "metadata": "https://raw.githubusercontent.com/OxCGRT/covid-policy-tracker/master/data/OxCGRT_nat_latest.csv"}}, {"id": {"id": "4-33"}, "name": "H6M_Flag", "dataset": {"id": {"id": "4"}, "name": "OxCGRT_nat_latest.csv", "metadata": "https://raw.githubusercontent.com/OxCGRT/covid-policy-tracker/master/data/OxCGRT_nat_latest.csv"}}]}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "R:-2064009007"}, "names": [{"id": {"id": "T:1820404733"}, "name": "k1", "extraction_source": {"page": 0, "block": 0, "char_start": 430, "char_end": 432, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.891455"}}, {"id": {"id": "v18"}, "name": "\u03ba", "extraction_source": null, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}], "descriptions": [{"id": {"id": "T:1768086066"}, "source": "arbitrary constants", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 410, "char_end": 429, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.891455"}}, {"id": {"id": "v18"}, "source": " arbitrary constant", "grounding": null, "extraction_source": null, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}], "value_specs": [], "groundings": [{"grounding_text": "Cork", "grounding_id": "geonames:2965140", "source": [], "score": 1.0, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}, {"grounding_text": "Omsk", "grounding_id": "geonames:1496153", "source": [], "score": 1.0, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "E:-98926741"}, "names": [{"id": {"id": "T:1904676976"}, "name": "gamma", "extraction_source": {"page": 0, "block": 0, "char_start": 0, "char_end": 5, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.891823"}}, {"id": {"id": "v25"}, "name": "k2", "extraction_source": null, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}], "descriptions": [{"id": {"id": "v25"}, "source": " arbitrary constant", "grounding": null, "extraction_source": null, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}], "value_specs": [{"id": {"id": "T:-561918051"}, "value": {"source": "1/11", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 8, "char_end": 12, "document_reference": {"id": "ijerph-18-09027.pdf"}}}, "units": null, "type": null, "bounds": null, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.891823"}}], "groundings": [{"grounding_text": "gamma distribution", "grounding_id": "apollosv:00000255", "source": [], "score": 0.8174800872802734, "provenance": {"method": "SKEMA-TR-Embedding", "timestamp": "2023-07-04T01:15:56.891841"}}, {"grounding_text": "H\u016dngnam", "grounding_id": "geonames:1877030", "source": [], "score": 1.0, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}, {"grounding_text": "ubiquilin-2 (human)", "grounding_id": "pr:Q9UHD9", "source": [], "score": 1.0, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "E:1374298884"}, "names": [{"id": {"id": "T:-1139982725"}, "name": "delta", "extraction_source": {"page": 0, "block": 0, "char_start": 197, "char_end": 202, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.891989"}}, {"id": {"id": "v17"}, "name": "\u0001", "extraction_source": null, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}], "descriptions": [{"id": {"id": "v17"}, "source": " Rate at which a recovered person becomes susceptible again", "grounding": null, "extraction_source": null, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}], "value_specs": [{"id": {"id": "T:1628287856"}, "value": {"source": "1/5", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 205, "char_end": 208, "document_reference": {"id": "ijerph-18-09027.pdf"}}}, "units": null, "type": null, "bounds": null, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.891989"}}], "groundings": [], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "E:1028710751"}, "names": [{"id": {"id": "T:-1364489025"}, "name": "incubation period", "extraction_source": {"page": 0, "block": 0, "char_start": 237, "char_end": 254, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.892153"}}], "descriptions": [], "value_specs": [{"id": {"id": "T:-518683018"}, "value": {"source": "days", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 266, "char_end": 270, "document_reference": {"id": "ijerph-18-09027.pdf"}}}, "units": null, "type": null, "bounds": null, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.892153"}}], "groundings": [{"grounding_text": "incubation period", "grounding_id": "apollosv:00000317", "source": [], "score": 0.9989535808563232, "provenance": {"method": "SKEMA-TR-Embedding", "timestamp": "2023-07-04T01:15:56.892173"}}], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "E:1157335987"}, "names": [{"id": {"id": "T:1819937082"}, "name": "alpha", "extraction_source": {"page": 0, "block": 0, "char_start": 277, "char_end": 282, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.892315"}}], "descriptions": [], "value_specs": [{"id": {"id": "T:929673194"}, "value": {"source": "0.000064", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 285, "char_end": 293, "document_reference": {"id": "ijerph-18-09027.pdf"}}}, "units": null, "type": null, "bounds": null, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.892315"}}], "groundings": [], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "E:910795188"}, "names": [{"id": {"id": "T:1137842641"}, "name": "number of deaths", "extraction_source": {"page": 0, "block": 0, "char_start": 432, "char_end": 448, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.892454"}}, {"id": {"id": "v11"}, "name": "D(t)", "extraction_source": null, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}], "descriptions": [{"id": {"id": "v11"}, "source": " Number of people dead on day t", "grounding": null, "extraction_source": null, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}], "value_specs": [{"id": {"id": "T:200829870"}, "value": {"source": "26", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 466, "char_end": 468, "document_reference": {"id": "ijerph-18-09027.pdf"}}}, "units": null, "type": null, "bounds": null, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.892454"}}], "groundings": [{"grounding_text": "number of deaths new this week", "grounding_id": "cemo:number_of_deaths_new_this_week", "source": [], "score": 0.849774956703186, "provenance": {"method": "SKEMA-TR-Embedding", "timestamp": "2023-07-04T01:15:56.892474"}}], "data_columns": [{"id": {"id": "0-7"}, "name": "cumulative_deceased", "dataset": {"id": {"id": "0"}, "name": "usa-cases-deaths.csv", "metadata": "https://github.com/DARPA-ASKEM/program-milestones/blob/main/6-month-milestone/evaluation/scenario_3/ta_1/google-health-data/usa-cases-deaths.csv"}}, {"id": {"id": "5-22"}, "name": "new_deceased_age_0", "dataset": {"id": {"id": "5"}, "name": "usa-cases-hospitalized-by-age.csv", "metadata": "https://github.com/DARPA-ASKEM/program-milestones/blob/main/6-month-milestone/evaluation/scenario_3/ta_1/google-health-data/usa-cases-hospitalized-by-age.csv"}}]}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "E:-1286804828"}, "names": [{"id": {"id": "T:-1406321319"}, "name": "total number of Recovered and Dead compartments", "extraction_source": {"page": 0, "block": 0, "char_start": 478, "char_end": 525, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.892595"}}], "descriptions": [], "value_specs": [{"id": {"id": "T:-997103511"}, "value": {"source": "40,625", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 530, "char_end": 536, "document_reference": {"id": "ijerph-18-09027.pdf"}}}, "units": null, "type": null, "bounds": null, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.892595"}}], "groundings": [{"grounding_text": "total number of cases removed from isolation", "grounding_id": "cemo:total_number_of_cases_removed_from_isolation", "source": [], "score": 0.8561632037162781, "provenance": {"method": "SKEMA-TR-Embedding", "timestamp": "2023-07-04T01:15:56.892615"}}], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "E:-325311557"}, "names": [{"id": {"id": "T:-381982534"}, "name": "rho", "extraction_source": {"page": 0, "block": 0, "char_start": 538, "char_end": 541, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.892735"}}, {"id": {"id": "v3"}, "name": "SEIR", "extraction_source": null, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}], "descriptions": [{"id": {"id": "v3"}, "source": " Compartmental model for modelling the spread of COVID-19", "grounding": null, "extraction_source": null, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}, {"id": {"id": "v3"}, "source": " Compartmentalized model", "grounding": null, "extraction_source": null, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}], "value_specs": [{"id": {"id": "T:-1057154576"}, "value": {"source": "1/9", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 544, "char_end": 547, "document_reference": {"id": "ijerph-18-09027.pdf"}}}, "units": null, "type": null, "bounds": null, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.892735"}}], "groundings": [{"grounding_text": "Rho", "grounding_id": "vo:0011064", "source": [], "score": 0.9999998807907104, "provenance": {"method": "SKEMA-TR-Embedding", "timestamp": "2023-07-04T01:15:56.892754"}}, {"grounding_text": "Salem", "grounding_id": "geonames:5750162", "source": [], "score": 1.0, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}, {"grounding_text": "Visalia", "grounding_id": "geonames:5406567", "source": [], "score": 1.0, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "E:-262180774"}, "names": [{"id": {"id": "T:1705025731"}, "name": "case", "extraction_source": {"page": 0, "block": 0, "char_start": 1483, "char_end": 1487, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.892978"}}, {"id": {"id": "v5"}, "name": "SEIRS", "extraction_source": null, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}], "descriptions": [{"id": {"id": "v5"}, "source": " Variant of SEIR to include effects of age-structure and different social settings", "grounding": null, "extraction_source": null, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}, {"id": {"id": "v5"}, "source": " Compartmentalized model with time-limited immunity", "grounding": null, "extraction_source": null, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}], "value_specs": [{"id": {"id": "T:1759035755"}, "value": {"source": "days", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 1501, "char_end": 1505, "document_reference": {"id": "ijerph-18-09027.pdf"}}}, "units": null, "type": null, "bounds": null, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.892978"}}], "groundings": [{"grounding_text": "case series", "grounding_id": "apollosv:00000558", "source": [], "score": 0.8418106436729431, "provenance": {"method": "SKEMA-TR-Embedding", "timestamp": "2023-07-04T01:15:56.892996"}}], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "E:307660388"}, "names": [{"id": {"id": "T:1342805111"}, "name": "case of a (b) 50 days delay", "extraction_source": {"page": 0, "block": 0, "char_start": 1361, "char_end": 1388, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.893087"}}], "descriptions": [], "value_specs": [{"id": {"id": "T:54218065"}, "value": {"source": "10.479", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 1434, "char_end": 1440, "document_reference": {"id": "ijerph-18-09027.pdf"}}}, "units": null, "type": null, "bounds": null, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.893087"}}], "groundings": [{"grounding_text": "time delay to case detection", "grounding_id": "apollosv:00000267", "source": [], "score": 0.7793136835098267, "provenance": {"method": "SKEMA-TR-Embedding", "timestamp": "2023-07-04T01:15:56.893109"}}], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "E:-306701002"}, "names": [{"id": {"id": "T:1342805111"}, "name": "case of a (b) 50 days delay", "extraction_source": {"page": 0, "block": 0, "char_start": 1361, "char_end": 1388, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.893179"}}], "descriptions": [], "value_specs": [{"id": {"id": "T:490022350"}, "value": {"source": "%", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 1440, "char_end": 1441, "document_reference": {"id": "ijerph-18-09027.pdf"}}}, "units": null, "type": null, "bounds": null, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.893179"}}], "groundings": [{"grounding_text": "time delay to case detection", "grounding_id": "apollosv:00000267", "source": [], "score": 0.7793136835098267, "provenance": {"method": "SKEMA-TR-Embedding", "timestamp": "2023-07-04T01:15:56.893200"}}], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "E:-1711474770"}, "names": [{"id": {"id": "T:1342805111"}, "name": "case of a (b) 50 days delay", "extraction_source": {"page": 0, "block": 0, "char_start": 1361, "char_end": 1388, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.893271"}}], "descriptions": [], "value_specs": [{"id": {"id": "T:54218065"}, "value": {"source": "10.479", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 1434, "char_end": 1440, "document_reference": {"id": "ijerph-18-09027.pdf"}}}, "units": null, "type": null, "bounds": null, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.893271"}}, {"id": {"id": "T:490022350"}, "value": {"source": "%", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 1440, "char_end": 1441, "document_reference": {"id": "ijerph-18-09027.pdf"}}}, "units": null, "type": null, "bounds": null, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.893271"}}], "groundings": [{"grounding_text": "time delay to case detection", "grounding_id": "apollosv:00000267", "source": [], "score": 0.7793136835098267, "provenance": {"method": "SKEMA-TR-Embedding", "timestamp": "2023-07-04T01:15:56.893292"}}], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "R:-1134010888"}, "names": [{"id": {"id": "T:2057170385"}, "name": "a", "extraction_source": {"page": 0, "block": 0, "char_start": 499, "char_end": 500, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.893421"}}], "descriptions": [{"id": {"id": "T:2144634561"}, "source": "be enforced", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 486, "char_end": 497, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.893421"}}], "value_specs": [], "groundings": [], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "E:-1856653836"}, "names": [{"id": {"id": "T:977224411"}, "name": "maximum infected value", "extraction_source": {"page": 0, "block": 0, "char_start": 1710, "char_end": 1732, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.893559"}}, {"id": {"id": "v6"}, "name": "Maximum Infected Values", "extraction_source": null, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}], "descriptions": [{"id": {"id": "v6"}, "source": " Maximum number of people infected with COVID-19 in the community, as a result of the delay in compulsory mask wearing", "grounding": null, "extraction_source": null, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}], "value_specs": [{"id": {"id": "T:-1826550746"}, "value": {"source": "%", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 1756, "char_end": 1757, "document_reference": {"id": "ijerph-18-09027.pdf"}}}, "units": null, "type": null, "bounds": null, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.893559"}}], "groundings": [{"grounding_text": "maximum value", "grounding_id": "apollosv:00000433", "source": [], "score": 0.9049829840660095, "provenance": {"method": "SKEMA-TR-Embedding", "timestamp": "2023-07-04T01:15:56.893581"}}], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "E:-223017254"}, "names": [{"id": {"id": "T:977224411"}, "name": "maximum infected value", "extraction_source": {"page": 0, "block": 0, "char_start": 1710, "char_end": 1732, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.893653"}}], "descriptions": [], "value_specs": [{"id": {"id": "T:2013554441"}, "value": {"source": "31.422", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 1750, "char_end": 1756, "document_reference": {"id": "ijerph-18-09027.pdf"}}}, "units": null, "type": null, "bounds": null, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.893653"}}], "groundings": [{"grounding_text": "maximum value", "grounding_id": "apollosv:00000433", "source": [], "score": 0.9049829840660095, "provenance": {"method": "SKEMA-TR-Embedding", "timestamp": "2023-07-04T01:15:56.893674"}}], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "E:-1463565746"}, "names": [{"id": {"id": "T:977224411"}, "name": "maximum infected value", "extraction_source": {"page": 0, "block": 0, "char_start": 1710, "char_end": 1732, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.893746"}}], "descriptions": [], "value_specs": [{"id": {"id": "T:2013554441"}, "value": {"source": "31.422", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 1750, "char_end": 1756, "document_reference": {"id": "ijerph-18-09027.pdf"}}}, "units": null, "type": null, "bounds": null, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.893746"}}, {"id": {"id": "T:-1826550746"}, "value": {"source": "%", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 1756, "char_end": 1757, "document_reference": {"id": "ijerph-18-09027.pdf"}}}, "units": null, "type": null, "bounds": null, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.893746"}}], "groundings": [{"grounding_text": "maximum value", "grounding_id": "apollosv:00000433", "source": [], "score": 0.9049829840660095, "provenance": {"method": "SKEMA-TR-Embedding", "timestamp": "2023-07-04T01:15:56.893769"}}], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "R:-823594056"}, "names": [{"id": {"id": "T:-1655177158"}, "name": "case of (a) 0 days of delay", "extraction_source": {"page": 0, "block": 0, "char_start": 1185, "char_end": 1212, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.893863"}}], "descriptions": [], "value_specs": [{"id": {"id": "T:1040754711"}, "value": {"source": "0", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 1197, "char_end": 1198, "document_reference": {"id": "ijerph-18-09027.pdf"}}}, "units": null, "type": null, "bounds": null, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.893863"}}], "groundings": [{"grounding_text": "probability of entry into a country is denied", "grounding_id": "apollosv:00000278", "source": [], "score": 0.7874587178230286, "provenance": {"method": "SKEMA-TR-Embedding", "timestamp": "2023-07-04T01:15:56.893885"}}], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "E:-232718024"}, "names": [{"id": {"id": "T:-384187929"}, "name": "maximum infected value", "extraction_source": {"page": 0, "block": 0, "char_start": 1238, "char_end": 1260, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.893958"}}], "descriptions": [], "value_specs": [{"id": {"id": "T:-1882725728"}, "value": {"source": "10.453", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 1278, "char_end": 1284, "document_reference": {"id": "ijerph-18-09027.pdf"}}}, "units": null, "type": null, "bounds": null, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.893958"}}], "groundings": [{"grounding_text": "maximum value", "grounding_id": "apollosv:00000433", "source": [], "score": 0.9049829840660095, "provenance": {"method": "SKEMA-TR-Embedding", "timestamp": "2023-07-04T01:15:56.893980"}}], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "E:-429168824"}, "names": [{"id": {"id": "T:-384187929"}, "name": "maximum infected value", "extraction_source": {"page": 0, "block": 0, "char_start": 1238, "char_end": 1260, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.894050"}}], "descriptions": [], "value_specs": [{"id": {"id": "T:-524556619"}, "value": {"source": "%", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 1284, "char_end": 1285, "document_reference": {"id": "ijerph-18-09027.pdf"}}}, "units": null, "type": null, "bounds": null, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.894050"}}], "groundings": [{"grounding_text": "maximum value", "grounding_id": "apollosv:00000433", "source": [], "score": 0.9049829840660095, "provenance": {"method": "SKEMA-TR-Embedding", "timestamp": "2023-07-04T01:15:56.894072"}}], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "E:1232232041"}, "names": [{"id": {"id": "T:-384187929"}, "name": "maximum infected value", "extraction_source": {"page": 0, "block": 0, "char_start": 1238, "char_end": 1260, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.894142"}}], "descriptions": [], "value_specs": [{"id": {"id": "T:-1882725728"}, "value": {"source": "10.453", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 1278, "char_end": 1284, "document_reference": {"id": "ijerph-18-09027.pdf"}}}, "units": null, "type": null, "bounds": null, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.894142"}}, {"id": {"id": "T:-524556619"}, "value": {"source": "%", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 1284, "char_end": 1285, "document_reference": {"id": "ijerph-18-09027.pdf"}}}, "units": null, "type": null, "bounds": null, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.894142"}}], "groundings": [{"grounding_text": "maximum value", "grounding_id": "apollosv:00000433", "source": [], "score": 0.9049829840660095, "provenance": {"method": "SKEMA-TR-Embedding", "timestamp": "2023-07-04T01:15:56.894164"}}], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "E:-1306756795"}, "names": [{"id": {"id": "T:-1292766255"}, "name": "case", "extraction_source": {"page": 0, "block": 0, "char_start": 1185, "char_end": 1189, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.894257"}}], "descriptions": [], "value_specs": [{"id": {"id": "T:-7729983"}, "value": {"source": "days", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 1199, "char_end": 1203, "document_reference": {"id": "ijerph-18-09027.pdf"}}}, "units": null, "type": null, "bounds": null, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.894257"}}], "groundings": [{"grounding_text": "case series", "grounding_id": "apollosv:00000558", "source": [], "score": 0.8418106436729431, "provenance": {"method": "SKEMA-TR-Embedding", "timestamp": "2023-07-04T01:15:56.894279"}}], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "E:-1697521080"}, "names": [{"id": {"id": "T:1901943977"}, "name": "delay of 80", "extraction_source": {"page": 0, "block": 0, "char_start": 159, "char_end": 170, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.894593"}}], "descriptions": [], "value_specs": [{"id": {"id": "T:-574956053"}, "value": {"source": "days", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 178, "char_end": 182, "document_reference": {"id": "ijerph-18-09027.pdf"}}}, "units": null, "type": null, "bounds": null, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.894593"}}], "groundings": [], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "E:-1619111231"}, "names": [{"id": {"id": "T:510890493"}, "name": "high maximum infection", "extraction_source": {"page": 0, "block": 0, "char_start": 79, "char_end": 101, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.894701"}}, {"id": {"id": "v31"}, "name": "Delay in Public Mask Enforcement", "extraction_source": null, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}], "descriptions": [{"id": {"id": "v31"}, "source": " Delay in implementation of compulsory mask wearing", "grounding": null, "extraction_source": null, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}], "value_specs": [{"id": {"id": "T:-2107934969"}, "value": {"source": "%", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 113, "char_end": 114, "document_reference": {"id": "ijerph-18-09027.pdf"}}}, "units": null, "type": null, "bounds": null, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.894701"}}], "groundings": [{"grounding_text": "initial infection case", "grounding_id": "cemo:initial_infection_case", "source": [], "score": 0.7537267208099365, "provenance": {"method": "SKEMA-TR-Embedding", "timestamp": "2023-07-04T01:15:56.894722"}}], "data_columns": [{"id": {"id": "4-32"}, "name": "H6M_Facial Coverings", "dataset": {"id": {"id": "4"}, "name": "OxCGRT_nat_latest.csv", "metadata": "https://raw.githubusercontent.com/OxCGRT/covid-policy-tracker/master/data/OxCGRT_nat_latest.csv"}}, {"id": {"id": "4-33"}, "name": "H6M_Flag", "dataset": {"id": {"id": "4"}, "name": "OxCGRT_nat_latest.csv", "metadata": "https://raw.githubusercontent.com/OxCGRT/covid-policy-tracker/master/data/OxCGRT_nat_latest.csv"}}]}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "E:5976644"}, "names": [{"id": {"id": "T:809457271"}, "name": "low maximum infection", "extraction_source": {"page": 0, "block": 0, "char_start": 36, "char_end": 57, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.894842"}}], "descriptions": [], "value_specs": [{"id": {"id": "T:2005233352"}, "value": {"source": "%", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 72, "char_end": 73, "document_reference": {"id": "ijerph-18-09027.pdf"}}}, "units": null, "type": null, "bounds": null, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.894842"}}], "groundings": [{"grounding_text": "initial infection case", "grounding_id": "cemo:initial_infection_case", "source": [], "score": 0.7639009356498718, "provenance": {"method": "SKEMA-TR-Embedding", "timestamp": "2023-07-04T01:15:56.894864"}}], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "R:-208609464"}, "names": [{"id": {"id": "T:-268534747"}, "name": "takes place at about the same 80 to 100 days of delay", "extraction_source": {"page": 0, "block": 0, "char_start": 1087, "char_end": 1140, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.894934"}}], "descriptions": [], "value_specs": [{"id": {"id": "T:909237295"}, "value": {"source": "80", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 1117, "char_end": 1119, "document_reference": {"id": "ijerph-18-09027.pdf"}}}, "units": null, "type": null, "bounds": null, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.894934"}}], "groundings": [{"grounding_text": "Sponsor-Investigator", "grounding_id": "ncit:C142695", "source": [], "score": 0.8060052990913391, "provenance": {"method": "SKEMA-TR-Embedding", "timestamp": "2023-07-04T01:15:56.894956"}}], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "E:1457212500"}, "names": [{"id": {"id": "T:1633812708"}, "name": "t1", "extraction_source": {"page": 0, "block": 0, "char_start": 2649, "char_end": 2651, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.895053"}}], "descriptions": [], "value_specs": [{"id": {"id": "T:-1303145619"}, "value": {"source": "days", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 2658, "char_end": 2662, "document_reference": {"id": "ijerph-18-09027.pdf"}}}, "units": null, "type": null, "bounds": null, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.895053"}}], "groundings": [], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "E:-2113012858"}, "names": [{"id": {"id": "T:1633812708"}, "name": "t1", "extraction_source": {"page": 0, "block": 0, "char_start": 2649, "char_end": 2651, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.895323"}}], "descriptions": [], "value_specs": [{"id": {"id": "T:-454782056"}, "value": {"source": "154", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 2654, "char_end": 2657, "document_reference": {"id": "ijerph-18-09027.pdf"}}}, "units": null, "type": null, "bounds": null, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.895323"}}], "groundings": [], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "E:1048219199"}, "names": [{"id": {"id": "T:1633812708"}, "name": "t1", "extraction_source": {"page": 0, "block": 0, "char_start": 2649, "char_end": 2651, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.895424"}}], "descriptions": [], "value_specs": [{"id": {"id": "T:-454782056"}, "value": {"source": "154", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 2654, "char_end": 2657, "document_reference": {"id": "ijerph-18-09027.pdf"}}}, "units": null, "type": null, "bounds": null, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.895424"}}, {"id": {"id": "T:-1303145619"}, "value": {"source": "days", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 2658, "char_end": 2662, "document_reference": {"id": "ijerph-18-09027.pdf"}}}, "units": null, "type": null, "bounds": null, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.895424"}}], "groundings": [], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "R:-1889118797"}, "names": [{"id": {"id": "T:-1776882638"}, "name": "occurring at about 100 days of delay", "extraction_source": {"page": 0, "block": 0, "char_start": 269, "char_end": 305, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.895562"}}], "descriptions": [], "value_specs": [{"id": {"id": "T:-2012470579"}, "value": {"source": "100", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 288, "char_end": 291, "document_reference": {"id": "ijerph-18-09027.pdf"}}}, "units": null, "type": null, "bounds": null, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.895562"}}], "groundings": [{"grounding_text": "rate of cases with at least one comorbidity", "grounding_id": "cemo:rate_of_cases_with_at_least_one_comorbidity", "source": [], "score": 0.7907813787460327, "provenance": {"method": "SKEMA-TR-Embedding", "timestamp": "2023-07-04T01:15:56.895583"}}], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "R:-1976612459"}, "names": [{"id": {"id": "T:1390128890"}, "name": "100 days of delay", "extraction_source": {"page": 0, "block": 0, "char_start": 1168, "char_end": 1185, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.895682"}}], "descriptions": [], "value_specs": [{"id": {"id": "T:-686780907"}, "value": {"source": "100", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 1168, "char_end": 1171, "document_reference": {"id": "ijerph-18-09027.pdf"}}}, "units": null, "type": null, "bounds": null, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.895682"}}], "groundings": [], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "E:-328410532"}, "names": [{"id": {"id": "T:811296232"}, "name": "potential window to take action", "extraction_source": {"page": 0, "block": 0, "char_start": 1869, "char_end": 1900, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.895801"}}], "descriptions": [], "value_specs": [{"id": {"id": "T:-2081340955"}, "value": {"source": "3", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 1910, "char_end": 1911, "document_reference": {"id": "ijerph-18-09027.pdf"}}}, "units": null, "type": null, "bounds": null, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.895801"}}], "groundings": [{"grounding_text": "simulation time step action specification", "grounding_id": "apollosv:00000068", "source": [], "score": 0.7523066997528076, "provenance": {"method": "SKEMA-TR-Embedding", "timestamp": "2023-07-04T01:15:56.895822"}}], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "E:1560241998"}, "names": [{"id": {"id": "T:811296232"}, "name": "potential window to take action", "extraction_source": {"page": 0, "block": 0, "char_start": 1869, "char_end": 1900, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.895896"}}], "descriptions": [], "value_specs": [{"id": {"id": "T:148982384"}, "value": {"source": "months", "grounding": [{"grounding_text": "persons aged 6 months--24 years", "grounding_id": "vo:0001100", "source": [], "score": 0.7775040864944458, "provenance": {"method": "SKEMA-TR-Embedding", "timestamp": "2023-07-04T01:15:56.895951"}}], "extraction_source": {"page": 0, "block": 0, "char_start": 1912, "char_end": 1918, "document_reference": {"id": "ijerph-18-09027.pdf"}}}, "units": null, "type": null, "bounds": null, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.895896"}}], "groundings": [{"grounding_text": "simulation time step action specification", "grounding_id": "apollosv:00000068", "source": [], "score": 0.7523066997528076, "provenance": {"method": "SKEMA-TR-Embedding", "timestamp": "2023-07-04T01:15:56.895918"}}], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "E:508161263"}, "names": [{"id": {"id": "T:811296232"}, "name": "potential window to take action", "extraction_source": {"page": 0, "block": 0, "char_start": 1869, "char_end": 1900, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.896013"}}, {"id": {"id": "v8"}, "name": "Noncompliance", "extraction_source": null, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}], "descriptions": [{"id": {"id": "v8"}, "source": " Lack of medical knowledge, wishful thinking, sel\ufb01sh behaviour, pandemic fatigue", "grounding": null, "extraction_source": null, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}, {"id": {"id": "v8"}, "source": " Level of people not following the policy.None", "grounding": null, "extraction_source": null, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}], "value_specs": [{"id": {"id": "T:-2081340955"}, "value": {"source": "3", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 1910, "char_end": 1911, "document_reference": {"id": "ijerph-18-09027.pdf"}}}, "units": null, "type": null, "bounds": null, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.896013"}}, {"id": {"id": "T:148982384"}, "value": {"source": "months", "grounding": [{"grounding_text": "persons aged 6 months--24 years", "grounding_id": "vo:0001100", "source": [], "score": 0.7775040864944458, "provenance": {"method": "SKEMA-TR-Embedding", "timestamp": "2023-07-04T01:15:56.896089"}}], "extraction_source": {"page": 0, "block": 0, "char_start": 1912, "char_end": 1918, "document_reference": {"id": "ijerph-18-09027.pdf"}}}, "units": null, "type": null, "bounds": null, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.896013"}}], "groundings": [{"grounding_text": "simulation time step action specification", "grounding_id": "apollosv:00000068", "source": [], "score": 0.7523066997528076, "provenance": {"method": "SKEMA-TR-Embedding", "timestamp": "2023-07-04T01:15:56.896034"}}, {"grounding_text": "diet noncompliance AE", "grounding_id": "oae:0006383", "source": [], "score": 1.0, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "R:2114716604"}, "names": [{"id": {"id": "T:403589220"}, "name": "90 days of time-limited immunity", "extraction_source": {"page": 0, "block": 0, "char_start": 1399, "char_end": 1431, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.896153"}}, {"id": {"id": "v9"}, "name": "Time-limited immunity", "extraction_source": null, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}], "descriptions": [{"id": {"id": "v9"}, "source": " Recovered individuals become susceptible again after a period of time", "grounding": null, "extraction_source": null, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}], "value_specs": [{"id": {"id": "T:-23771472"}, "value": {"source": "90", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 1399, "char_end": 1401, "document_reference": {"id": "ijerph-18-09027.pdf"}}}, "units": null, "type": null, "bounds": null, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.896153"}}], "groundings": [], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "E:591214166"}, "names": [{"id": {"id": "T:828578762"}, "name": "delay", "extraction_source": {"page": 0, "block": 0, "char_start": 2314, "char_end": 2319, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.896931"}}, {"id": {"id": "v26"}, "name": "Delay", "extraction_source": null, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}], "descriptions": [{"id": {"id": "v26"}, "source": " Amount of time between public masking enforcement and the first case.", "grounding": null, "extraction_source": null, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}], "value_specs": [{"id": {"id": "T:1820127059"}, "value": {"source": "days", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 2326, "char_end": 2330, "document_reference": {"id": "ijerph-18-09027.pdf"}}}, "units": null, "type": null, "bounds": null, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.896931"}}], "groundings": [{"grounding_text": "ascertainment delay", "grounding_id": "apollosv:00000134", "source": [], "score": 0.8018620610237122, "provenance": {"method": "SKEMA-TR-Embedding", "timestamp": "2023-07-04T01:15:56.896949"}}, {"grounding_text": "adermatoglyphia", "grounding_id": "doid:0111357", "source": [], "score": 1.0, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}, {"grounding_text": "SADDAN", "grounding_id": "doid:0111158", "source": [], "score": 1.0, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "E:-457015428"}, "names": [{"id": {"id": "T:325916915"}, "name": "delay", "extraction_source": {"page": 0, "block": 0, "char_start": 407, "char_end": 412, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.897309"}}], "descriptions": [], "value_specs": [{"id": {"id": "T:-252038506"}, "value": {"source": "days", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 420, "char_end": 424, "document_reference": {"id": "ijerph-18-09027.pdf"}}}, "units": null, "type": null, "bounds": null, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.897309"}}], "groundings": [{"grounding_text": "ascertainment delay", "grounding_id": "apollosv:00000134", "source": [], "score": 0.8018620610237122, "provenance": {"method": "SKEMA-TR-Embedding", "timestamp": "2023-07-04T01:15:56.897327"}}], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "R:1100301483"}, "names": [{"id": {"id": "T:-743119050"}, "name": "Laydon", "extraction_source": {"page": 0, "block": 0, "char_start": 1468, "char_end": 1474, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.897563"}}], "descriptions": [{"id": {"id": "T:1134338057"}, "source": "D.J.; Dabrera", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 1476, "char_end": 1489, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.897563"}}], "value_specs": [], "groundings": [], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "R:-1903420941"}, "names": [{"id": {"id": "T:2120170772"}, "name": "Chand", "extraction_source": {"page": 0, "block": 0, "char_start": 1398, "char_end": 1403, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.897694"}}], "descriptions": [{"id": {"id": "T:2044144852"}, "source": "m.; Barrett", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 1405, "char_end": 1416, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.897694"}}], "value_specs": [], "groundings": [{"grounding_text": "Zia", "grounding_id": "ncit:C44848", "source": [], "score": 0.792691707611084, "provenance": {"method": "SKEMA-TR-Embedding", "timestamp": "2023-07-04T01:15:56.897715"}}], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "E:1117338965"}, "names": [{"id": {"id": "T:2083120324"}, "name": "T.K", "extraction_source": {"page": 0, "block": 0, "char_start": 1656, "char_end": 1659, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.897828"}}], "descriptions": [{"id": {"id": "T:-1178846842"}, "source": "Tatapudi", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 1628, "char_end": 1636, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.897828"}}], "value_specs": [], "groundings": [], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "R:-302419759"}, "names": [{"id": {"id": "T:-1741898511"}, "name": "C.M", "extraction_source": {"page": 0, "block": 0, "char_start": 116, "char_end": 119, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.897975"}}], "descriptions": [{"id": {"id": "T:389472793"}, "source": "J.; Christ", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 104, "char_end": 114, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.897975"}}], "value_specs": [], "groundings": [], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "E:1784148891"}, "names": [{"id": {"id": "T:-1741898511"}, "name": "C.M", "extraction_source": {"page": 0, "block": 0, "char_start": 116, "char_end": 119, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.898181"}}], "descriptions": [{"id": {"id": "T:394151550"}, "source": "Gallaway", "grounding": [{"grounding_text": "Abdala", "grounding_id": "vo:0005082", "source": [], "score": 0.764650285243988, "provenance": {"method": "SKEMA-TR-Embedding", "timestamp": "2023-07-04T01:15:56.898233"}}], "extraction_source": {"page": 0, "block": 0, "char_start": 4, "char_end": 12, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.898181"}}], "value_specs": [], "groundings": [], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "R:459537029"}, "names": [{"id": {"id": "T:-1741898511"}, "name": "C.M", "extraction_source": {"page": 0, "block": 0, "char_start": 116, "char_end": 119, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.898382"}}], "descriptions": [{"id": {"id": "T:394151550"}, "source": "Gallaway", "grounding": [{"grounding_text": "Abdala", "grounding_id": "vo:0005082", "source": [], "score": 0.764650285243988, "provenance": {"method": "SKEMA-TR-Embedding", "timestamp": "2023-07-04T01:15:56.898438"}}], "extraction_source": {"page": 0, "block": 0, "char_start": 4, "char_end": 12, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.898382"}}], "value_specs": [], "groundings": [], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "R:73791469"}, "names": [{"id": {"id": "T:1617721042"}, "name": "Rigler", "extraction_source": {"page": 0, "block": 0, "char_start": 20, "char_end": 26, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.898606"}}], "descriptions": [{"id": {"id": "T:-1147340771"}, "source": "J.; Robinson", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 28, "char_end": 40, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.898606"}}], "value_specs": [], "groundings": [], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "E:885080843"}, "names": [{"id": {"id": "T:369500773"}, "name": "Livar", "extraction_source": {"page": 0, "block": 0, "char_start": 59, "char_end": 64, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.898846"}}], "descriptions": [{"id": {"id": "T:394151550"}, "source": "Gallaway", "grounding": [{"grounding_text": "Abdala", "grounding_id": "vo:0005082", "source": [], "score": 0.764650285243988, "provenance": {"method": "SKEMA-TR-Embedding", "timestamp": "2023-07-04T01:15:56.898879"}}], "extraction_source": {"page": 0, "block": 0, "char_start": 4, "char_end": 12, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.898846"}}], "value_specs": [], "groundings": [], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "E:193482118"}, "names": [{"id": {"id": "T:-374982932"}, "name": "Cunico", "extraction_source": {"page": 0, "block": 0, "char_start": 96, "char_end": 102, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.899032"}}], "descriptions": [{"id": {"id": "T:394151550"}, "source": "Gallaway", "grounding": [{"grounding_text": "Abdala", "grounding_id": "vo:0005082", "source": [], "score": 0.764650285243988, "provenance": {"method": "SKEMA-TR-Embedding", "timestamp": "2023-07-04T01:15:56.899085"}}], "extraction_source": {"page": 0, "block": 0, "char_start": 4, "char_end": 12, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.899032"}}], "value_specs": [], "groundings": [{"grounding_text": "Saxman", "grounding_id": "ncit:C44726", "source": [], "score": 0.8499902486801147, "provenance": {"method": "SKEMA-TR-Embedding", "timestamp": "2023-07-04T01:15:56.899052"}}], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "R:262749454"}, "names": [{"id": {"id": "T:-374982932"}, "name": "Cunico", "extraction_source": {"page": 0, "block": 0, "char_start": 96, "char_end": 102, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.899239"}}], "descriptions": [{"id": {"id": "T:389472793"}, "source": "J.; Christ", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 104, "char_end": 114, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.899239"}}], "value_specs": [], "groundings": [{"grounding_text": "Saxman", "grounding_id": "ncit:C44726", "source": [], "score": 0.8499902486801147, "provenance": {"method": "SKEMA-TR-Embedding", "timestamp": "2023-07-04T01:15:56.899259"}}], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "E:-236825794"}, "names": [{"id": {"id": "T:-374982932"}, "name": "Cunico", "extraction_source": {"page": 0, "block": 0, "char_start": 96, "char_end": 102, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.899439"}}], "descriptions": [{"id": {"id": "T:389472793"}, "source": "J.; Christ", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 104, "char_end": 114, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.899439"}}], "value_specs": [], "groundings": [{"grounding_text": "Saxman", "grounding_id": "ncit:C44726", "source": [], "score": 0.8499902486801147, "provenance": {"method": "SKEMA-TR-Embedding", "timestamp": "2023-07-04T01:15:56.899459"}}], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "R:1846198673"}, "names": [{"id": {"id": "T:-959173159"}, "name": "Korber", "extraction_source": {"page": 0, "block": 0, "char_start": 1085, "char_end": 1091, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.899672"}}], "descriptions": [{"id": {"id": "T:394238695"}, "source": "B.; Fischer", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 1093, "char_end": 1104, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.899672"}}], "value_specs": [], "groundings": [], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "R:-1747703505"}, "names": [{"id": {"id": "T:689408371"}, "name": "Giorgi", "extraction_source": {"page": 0, "block": 0, "char_start": 1183, "char_end": 1189, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.899807"}}], "descriptions": [{"id": {"id": "T:-324565088"}, "source": "E.E.; Bhattacharya", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 1191, "char_end": 1209, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.899807"}}], "value_specs": [], "groundings": [], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "R:1390890090"}, "names": [{"id": {"id": "T:-1614273080"}, "name": "Yoon", "extraction_source": {"page": 0, "block": 0, "char_start": 1128, "char_end": 1132, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.899958"}}, {"id": {"id": "v30"}, "name": "R0", "extraction_source": null, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}], "descriptions": [{"id": {"id": "T:365091242"}, "source": "h.; Theiler", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 1134, "char_end": 1145, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.899958"}}, {"id": {"id": "v30"}, "source": " Reproduction number of B117 variant", "grounding": null, "extraction_source": null, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}], "value_specs": [], "groundings": [{"grounding_text": "Almansour-001", "grounding_id": "vo:0005393", "source": [], "score": 1.0, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}, {"grounding_text": "Betacoronavirus BtCoV/Rhi_hip/R07-09/SPA/2010", "grounding_id": "ncbitaxon:1346307", "source": [], "score": 1.0, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "R:-114592353"}, "names": [{"id": {"id": "T:-1186590224"}, "name": "Lyu", "extraction_source": {"page": 0, "block": 0, "char_start": 2015, "char_end": 2018, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.900091"}}], "descriptions": [{"id": {"id": "T:1116483647"}, "source": "W.; Wehby", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 2020, "char_end": 2029, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.900091"}}], "value_specs": [], "groundings": [], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "E:697989061"}, "names": [{"id": {"id": "T:1151178142"}, "name": "J.", "extraction_source": {"page": 0, "block": 0, "char_start": 652, "char_end": 654, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.900201"}}], "descriptions": [{"id": {"id": "T:127756748"}, "source": "Reich", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 630, "char_end": 635, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.900201"}}], "value_specs": [], "groundings": [], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "R:-1658505651"}, "names": [{"id": {"id": "T:1151178142"}, "name": "J.", "extraction_source": {"page": 0, "block": 0, "char_start": 652, "char_end": 654, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.900378"}}], "descriptions": [{"id": {"id": "T:-743732172"}, "source": "N.G.; Lessler", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 637, "char_end": 650, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.900378"}}], "value_specs": [], "groundings": [], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "E:1679128071"}, "names": [{"id": {"id": "T:1151178142"}, "name": "J.", "extraction_source": {"page": 0, "block": 0, "char_start": 652, "char_end": 654, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.900555"}}], "descriptions": [{"id": {"id": "T:-743732172"}, "source": "N.G.; Lessler", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 637, "char_end": 650, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.900555"}}], "value_specs": [], "groundings": [], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "R:1255848250"}, "names": [{"id": {"id": "T:-189971178"}, "name": "Zheng", "extraction_source": {"page": 0, "block": 0, "char_start": 590, "char_end": 595, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.900733"}}], "descriptions": [{"id": {"id": "T:2101355726"}, "source": "Q.; Meredith", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 597, "char_end": 609, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.900733"}}], "value_specs": [], "groundings": [{"grounding_text": "Yao Chinese", "grounding_id": "ncit:C158170", "source": [], "score": 0.771730363368988, "provenance": {"method": "SKEMA-TR-Embedding", "timestamp": "2023-07-04T01:15:56.900752"}}], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "R:1043198099"}, "names": [{"id": {"id": "T:1003337774"}, "name": "Bi", "extraction_source": {"page": 0, "block": 0, "char_start": 569, "char_end": 571, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.900970"}}], "descriptions": [{"id": {"id": "T:-1195298001"}, "source": "Q.; Jones", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 573, "char_end": 582, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.900970"}}], "value_specs": [], "groundings": [], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "E:1349342732"}, "names": [{"id": {"id": "T:-988027874"}, "name": "delay threshold", "extraction_source": {"page": 0, "block": 0, "char_start": 738, "char_end": 753, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.901580"}}], "descriptions": [], "value_specs": [{"id": {"id": "T:296548306"}, "value": {"source": "days", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 767, "char_end": 771, "document_reference": {"id": "ijerph-18-09027.pdf"}}}, "units": null, "type": null, "bounds": null, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.901580"}}], "groundings": [{"grounding_text": "epidemic threshold", "grounding_id": "apollosv:00000531", "source": [], "score": 0.7768451571464539, "provenance": {"method": "SKEMA-TR-Embedding", "timestamp": "2023-07-04T01:15:56.901611"}}], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "R:1997357042"}, "names": [{"id": {"id": "T:974670954"}, "name": "9027 2 of 11", "extraction_source": {"page": 0, "block": 0, "char_start": 46, "char_end": 58, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.902125"}}], "descriptions": [], "value_specs": [{"id": {"id": "T:-1831305098"}, "value": {"source": "18", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 42, "char_end": 44, "document_reference": {"id": "ijerph-18-09027.pdf"}}}, "units": null, "type": null, "bounds": null, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.902125"}}], "groundings": [], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "R:-372736162"}, "names": [{"id": {"id": "T:-1753111254"}, "name": "9027 3 of 11", "extraction_source": {"page": 0, "block": 0, "char_start": 46, "char_end": 58, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.902310"}}], "descriptions": [], "value_specs": [{"id": {"id": "T:-40214986"}, "value": {"source": "18", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 42, "char_end": 44, "document_reference": {"id": "ijerph-18-09027.pdf"}}}, "units": null, "type": null, "bounds": null, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.902310"}}], "groundings": [], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "R:-62253497"}, "names": [{"id": {"id": "T:1881573139"}, "name": "T", "extraction_source": {"page": 0, "block": 0, "char_start": 18, "char_end": 19, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.902493"}}], "descriptions": [{"id": {"id": "T:1161401641"}, "source": "alpharhoI", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 8, "char_end": 17, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.902493"}}], "value_specs": [], "groundings": [], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "R:-166887039"}, "names": [{"id": {"id": "T:1977239128"}, "name": "dD(T)", "extraction_source": {"page": 0, "block": 0, "char_start": 0, "char_end": 5, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.902638"}}], "descriptions": [{"id": {"id": "T:1161401641"}, "source": "alpharhoI", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 8, "char_end": 17, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.902638"}}], "value_specs": [], "groundings": [], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "R:-954851593"}, "names": [{"id": {"id": "T:1085496056"}, "name": "dR(T)", "extraction_source": {"page": 0, "block": 0, "char_start": 0, "char_end": 5, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.902744"}}], "descriptions": [], "value_specs": [{"id": {"id": "T:1305401405"}, "value": {"source": "- Alpha", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 11, "char_end": 18, "document_reference": {"id": "ijerph-18-09027.pdf"}}}, "units": null, "type": null, "bounds": null, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.902744"}}], "groundings": [], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "R:-330794225"}, "names": [{"id": {"id": "T:832012800"}, "name": "T", "extraction_source": {"page": 0, "block": 0, "char_start": 53, "char_end": 54, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.902905"}}], "descriptions": [{"id": {"id": "T:116263679"}, "source": "alpharhoI", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 43, "char_end": 52, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.902905"}}], "value_specs": [], "groundings": [], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "R:-258647165"}, "names": [{"id": {"id": "T:-1036090467"}, "name": "dR(T)", "extraction_source": {"page": 0, "block": 0, "char_start": 0, "char_end": 5, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.902991"}}], "descriptions": [], "value_specs": [{"id": {"id": "T:-1829991090"}, "value": {"source": "- Alpha", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 11, "char_end": 18, "document_reference": {"id": "ijerph-18-09027.pdf"}}}, "units": null, "type": null, "bounds": null, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.902991"}}], "groundings": [], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "R:966372473"}, "names": [{"id": {"id": "T:-757585405"}, "name": "m(t)", "extraction_source": {"page": 0, "block": 0, "char_start": 87, "char_end": 91, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.903101"}}, {"id": {"id": "v7"}, "name": "Compliance", "extraction_source": null, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}], "descriptions": [{"id": {"id": "T:-737244778"}, "source": "compulsory mask wearing m", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 63, "char_end": 88, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.903101"}}, {"id": {"id": "v7"}, "source": " Complete compliance and gradual noncompliance of masking enforcement", "grounding": null, "extraction_source": null, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}], "value_specs": [], "groundings": [{"grounding_text": "antiviral compliance", "grounding_id": "apollosv:00000050", "source": [], "score": 1.0, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}, {"grounding_text": "vaccination compliance", "grounding_id": "apollosv:00000024", "source": [], "score": 1.0, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}], "data_columns": [{"id": {"id": "4-32"}, "name": "H6M_Facial Coverings", "dataset": {"id": {"id": "4"}, "name": "OxCGRT_nat_latest.csv", "metadata": "https://raw.githubusercontent.com/OxCGRT/covid-policy-tracker/master/data/OxCGRT_nat_latest.csv"}}, {"id": {"id": "4-33"}, "name": "H6M_Flag", "dataset": {"id": {"id": "4"}, "name": "OxCGRT_nat_latest.csv", "metadata": "https://raw.githubusercontent.com/OxCGRT/covid-policy-tracker/master/data/OxCGRT_nat_latest.csv"}}]}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "R:509396441"}, "names": [{"id": {"id": "T:-1745274392"}, "name": "9027 5 of 11", "extraction_source": {"page": 0, "block": 0, "char_start": 46, "char_end": 58, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.903220"}}], "descriptions": [], "value_specs": [{"id": {"id": "T:-791605677"}, "value": {"source": "18", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 42, "char_end": 44, "document_reference": {"id": "ijerph-18-09027.pdf"}}}, "units": null, "type": null, "bounds": null, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.903220"}}], "groundings": [], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "R:1741398158"}, "names": [{"id": {"id": "T:-1864370720"}, "name": "m(t)", "extraction_source": {"page": 0, "block": 0, "char_start": 87, "char_end": 91, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.903322"}}], "descriptions": [{"id": {"id": "T:-1709180673"}, "source": "compulsory mask wearing m", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 63, "char_end": 88, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.903322"}}], "value_specs": [], "groundings": [], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "R:-1265006642"}, "names": [{"id": {"id": "T:664078474"}, "name": "9027 6 of 11", "extraction_source": {"page": 0, "block": 0, "char_start": 46, "char_end": 58, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.903527"}}], "descriptions": [], "value_specs": [{"id": {"id": "T:-822735574"}, "value": {"source": "18", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 42, "char_end": 44, "document_reference": {"id": "ijerph-18-09027.pdf"}}}, "units": null, "type": null, "bounds": null, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.903527"}}], "groundings": [], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "E:-1755777161"}, "names": [{"id": {"id": "T:1019304466"}, "name": "c", "extraction_source": {"page": 0, "block": 0, "char_start": 61, "char_end": 62, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.903631"}}, {"id": {"id": "v27"}, "name": "Scenario 1", "extraction_source": null, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}], "descriptions": [{"id": {"id": "T:-211262112"}, "source": "SEIR Plots for delays", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 10, "char_end": 31, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.903631"}}, {"id": {"id": "v27"}, "source": " SEIR with no noncompliance", "grounding": null, "extraction_source": null, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}], "value_specs": [], "groundings": [{"grounding_text": "BoNT/C", "grounding_id": "vo:0004004", "source": [], "score": 0.7589514851570129, "provenance": {"method": "SKEMA-TR-Embedding", "timestamp": "2023-07-04T01:15:56.903651"}}], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "E:674716792"}, "names": [{"id": {"id": "T:-196066382"}, "name": "b", "extraction_source": {"page": 0, "block": 0, "char_start": 48, "char_end": 49, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.903738"}}, {"id": {"id": "v28"}, "name": "Scenario 2", "extraction_source": null, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}], "descriptions": [{"id": {"id": "T:-990885316"}, "source": "Plots for delays of (a) 0 days", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 15, "char_end": 45, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.903738"}}, {"id": {"id": "v28"}, "source": " SEIR with gradual noncompliance", "grounding": null, "extraction_source": null, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}], "value_specs": [], "groundings": [{"grounding_text": "AIDSVAX B/B", "grounding_id": "vo:0000405", "source": [], "score": 0.8989673256874084, "provenance": {"method": "SKEMA-TR-Embedding", "timestamp": "2023-07-04T01:15:56.903759"}}], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "E:-509339032"}, "names": [{"id": {"id": "T:565392455"}, "name": "Plots for delays", "extraction_source": {"page": 0, "block": 0, "char_start": 15, "char_end": 31, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.903847"}}, {"id": {"id": "v29"}, "name": "Scenario 3", "extraction_source": null, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}], "descriptions": [{"id": {"id": "v29"}, "source": " SEIRS with time-limited immunity", "grounding": null, "extraction_source": null, "provenance": {"method": "MIT extractor V1.0 - text, dataset, formula annotation (chunwei@mit.edu)", "timestamp": "2023-07-10T19:37:36.065099"}}], "value_specs": [{"id": {"id": "T:-233939232"}, "value": {"source": "days", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 41, "char_end": 45, "document_reference": {"id": "ijerph-18-09027.pdf"}}}, "units": null, "type": null, "bounds": null, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.903847"}}], "groundings": [], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "R:-2143043347"}, "names": [{"id": {"id": "T:141611462"}, "name": "results of different enforcement delay values and their corresponding maximum infected values", "extraction_source": {"page": 0, "block": 0, "char_start": 243, "char_end": 336, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.904018"}}], "descriptions": [], "value_specs": [{"id": {"id": "T:-1789777770"}, "value": {"source": "4", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 231, "char_end": 232, "document_reference": {"id": "ijerph-18-09027.pdf"}}}, "units": null, "type": null, "bounds": null, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.904018"}}], "groundings": [{"grounding_text": "average daily number of new infections generated per case (rt)", "grounding_id": "cemo:average_daily_number_of_new_infections_generated_per_case_rt", "source": [], "score": 0.816648542881012, "provenance": {"method": "SKEMA-TR-Embedding", "timestamp": "2023-07-04T01:15:56.904037"}}], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "R:-1149068522"}, "names": [{"id": {"id": "T:-1333322047"}, "name": "9027 7 of 11", "extraction_source": {"page": 0, "block": 0, "char_start": 46, "char_end": 58, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.904225"}}], "descriptions": [], "value_specs": [{"id": {"id": "T:-1841565533"}, "value": {"source": "18", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 42, "char_end": 44, "document_reference": {"id": "ijerph-18-09027.pdf"}}}, "units": null, "type": null, "bounds": null, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.904225"}}], "groundings": [], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "R:-1827577805"}, "names": [{"id": {"id": "T:-666880397"}, "name": "9027 8 of 11", "extraction_source": {"page": 0, "block": 0, "char_start": 46, "char_end": 58, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.904397"}}], "descriptions": [], "value_specs": [{"id": {"id": "T:1881433500"}, "value": {"source": "18", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 42, "char_end": 44, "document_reference": {"id": "ijerph-18-09027.pdf"}}}, "units": null, "type": null, "bounds": null, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.904397"}}], "groundings": [], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "R:1783882418"}, "names": [{"id": {"id": "T:539075481"}, "name": "9027 10 of 11", "extraction_source": {"page": 0, "block": 0, "char_start": 46, "char_end": 59, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.904601"}}], "descriptions": [], "value_specs": [{"id": {"id": "T:-61529253"}, "value": {"source": "18", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 42, "char_end": 44, "document_reference": {"id": "ijerph-18-09027.pdf"}}}, "units": null, "type": null, "bounds": null, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.904601"}}], "groundings": [], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "R:-719696986"}, "names": [{"id": {"id": "T:1485825475"}, "name": "9027 11 of 11", "extraction_source": {"page": 0, "block": 0, "char_start": 46, "char_end": 59, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.904701"}}], "descriptions": [], "value_specs": [{"id": {"id": "T:1390059971"}, "value": {"source": "18", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 42, "char_end": 44, "document_reference": {"id": "ijerph-18-09027.pdf"}}}, "units": null, "type": null, "bounds": null, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.904701"}}], "groundings": [], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "R:-102847579"}, "names": [{"id": {"id": "T:-588045234"}, "name": "C.M", "extraction_source": {"page": 0, "block": 0, "char_start": 116, "char_end": 119, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.904899"}}], "descriptions": [{"id": {"id": "T:1829482409"}, "source": "J.; Christ", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 104, "char_end": 114, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.904899"}}], "value_specs": [], "groundings": [], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "E:-728230378"}, "names": [{"id": {"id": "T:-588045234"}, "name": "C.M", "extraction_source": {"page": 0, "block": 0, "char_start": 116, "char_end": 119, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.905075"}}], "descriptions": [{"id": {"id": "T:592812818"}, "source": "Gallaway", "grounding": [{"grounding_text": "Abdala", "grounding_id": "vo:0005082", "source": [], "score": 0.764650285243988, "provenance": {"method": "SKEMA-TR-Embedding", "timestamp": "2023-07-04T01:15:56.905127"}}], "extraction_source": {"page": 0, "block": 0, "char_start": 4, "char_end": 12, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.905075"}}], "value_specs": [], "groundings": [], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "R:-1879785839"}, "names": [{"id": {"id": "T:-588045234"}, "name": "C.M", "extraction_source": {"page": 0, "block": 0, "char_start": 116, "char_end": 119, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.905254"}}], "descriptions": [{"id": {"id": "T:592812818"}, "source": "Gallaway", "grounding": [{"grounding_text": "Abdala", "grounding_id": "vo:0005082", "source": [], "score": 0.764650285243988, "provenance": {"method": "SKEMA-TR-Embedding", "timestamp": "2023-07-04T01:15:56.905306"}}], "extraction_source": {"page": 0, "block": 0, "char_start": 4, "char_end": 12, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.905254"}}], "value_specs": [], "groundings": [], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "E:2018394268"}, "names": [{"id": {"id": "T:-1901259997"}, "name": "Livar", "extraction_source": {"page": 0, "block": 0, "char_start": 59, "char_end": 64, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.905432"}}], "descriptions": [{"id": {"id": "T:592812818"}, "source": "Gallaway", "grounding": [{"grounding_text": "Abdala", "grounding_id": "vo:0005082", "source": [], "score": 0.764650285243988, "provenance": {"method": "SKEMA-TR-Embedding", "timestamp": "2023-07-04T01:15:56.905466"}}], "extraction_source": {"page": 0, "block": 0, "char_start": 4, "char_end": 12, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.905432"}}], "value_specs": [], "groundings": [], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "E:1563442282"}, "names": [{"id": {"id": "T:612539566"}, "name": "Cunico", "extraction_source": {"page": 0, "block": 0, "char_start": 96, "char_end": 102, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.905594"}}], "descriptions": [{"id": {"id": "T:592812818"}, "source": "Gallaway", "grounding": [{"grounding_text": "Abdala", "grounding_id": "vo:0005082", "source": [], "score": 0.764650285243988, "provenance": {"method": "SKEMA-TR-Embedding", "timestamp": "2023-07-04T01:15:56.905647"}}], "extraction_source": {"page": 0, "block": 0, "char_start": 4, "char_end": 12, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.905594"}}], "value_specs": [], "groundings": [{"grounding_text": "Saxman", "grounding_id": "ncit:C44726", "source": [], "score": 0.8499902486801147, "provenance": {"method": "SKEMA-TR-Embedding", "timestamp": "2023-07-04T01:15:56.905614"}}], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "R:1696945602"}, "names": [{"id": {"id": "T:612539566"}, "name": "Cunico", "extraction_source": {"page": 0, "block": 0, "char_start": 96, "char_end": 102, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.905809"}}], "descriptions": [{"id": {"id": "T:1829482409"}, "source": "J.; Christ", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 104, "char_end": 114, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.905809"}}], "value_specs": [], "groundings": [{"grounding_text": "Saxman", "grounding_id": "ncit:C44726", "source": [], "score": 0.8499902486801147, "provenance": {"method": "SKEMA-TR-Embedding", "timestamp": "2023-07-04T01:15:56.905830"}}], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "E:469395013"}, "names": [{"id": {"id": "T:612539566"}, "name": "Cunico", "extraction_source": {"page": 0, "block": 0, "char_start": 96, "char_end": 102, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.905993"}}], "descriptions": [{"id": {"id": "T:1829482409"}, "source": "J.; Christ", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 104, "char_end": 114, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.905993"}}], "value_specs": [], "groundings": [{"grounding_text": "Saxman", "grounding_id": "ncit:C44726", "source": [], "score": 0.8499902486801147, "provenance": {"method": "SKEMA-TR-Embedding", "timestamp": "2023-07-04T01:15:56.906013"}}], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "R:-2147315940"}, "names": [{"id": {"id": "T:-1541904158"}, "name": "Rigler", "extraction_source": {"page": 0, "block": 0, "char_start": 20, "char_end": 26, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.906175"}}], "descriptions": [{"id": {"id": "T:633224182"}, "source": "J.; Robinson", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 28, "char_end": 40, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.906175"}}], "value_specs": [], "groundings": [], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "E:1394798046"}, "names": [{"id": {"id": "T:1973270799"}, "name": "J.", "extraction_source": {"page": 0, "block": 0, "char_start": 114, "char_end": 116, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.906353"}}], "descriptions": [{"id": {"id": "T:-226455607"}, "source": "Reich", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 92, "char_end": 97, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.906353"}}], "value_specs": [], "groundings": [], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "R:-420570018"}, "names": [{"id": {"id": "T:1973270799"}, "name": "J.", "extraction_source": {"page": 0, "block": 0, "char_start": 114, "char_end": 116, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.906529"}}], "descriptions": [{"id": {"id": "T:-635682871"}, "source": "N.G.; Lessler", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 99, "char_end": 112, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.906529"}}], "value_specs": [], "groundings": [], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "E:-97894767"}, "names": [{"id": {"id": "T:1973270799"}, "name": "J.", "extraction_source": {"page": 0, "block": 0, "char_start": 114, "char_end": 116, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.906709"}}], "descriptions": [{"id": {"id": "T:-635682871"}, "source": "N.G.; Lessler", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 99, "char_end": 112, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.906709"}}], "value_specs": [], "groundings": [], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "R:731501372"}, "names": [{"id": {"id": "T:189626744"}, "name": "Zheng", "extraction_source": {"page": 0, "block": 0, "char_start": 52, "char_end": 57, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.906948"}}], "descriptions": [{"id": {"id": "T:-930326429"}, "source": "Q.; Meredith", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 59, "char_end": 71, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.906948"}}], "value_specs": [], "groundings": [{"grounding_text": "Yao Chinese", "grounding_id": "ncit:C158170", "source": [], "score": 0.771730363368988, "provenance": {"method": "SKEMA-TR-Embedding", "timestamp": "2023-07-04T01:15:56.906968"}}], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "R:1299812587"}, "names": [{"id": {"id": "T:172707489"}, "name": "Bi", "extraction_source": {"page": 0, "block": 0, "char_start": 31, "char_end": 33, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.907150"}}], "descriptions": [{"id": {"id": "T:-1157958033"}, "source": "Q.; Jones", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 35, "char_end": 44, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.907150"}}], "value_specs": [], "groundings": [], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "R:-521953121"}, "names": [{"id": {"id": "T:-1765836795"}, "name": "Korber", "extraction_source": {"page": 0, "block": 0, "char_start": 4, "char_end": 10, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.907394"}}], "descriptions": [{"id": {"id": "T:-848707910"}, "source": "B.; Fischer", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 12, "char_end": 23, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.907394"}}], "value_specs": [], "groundings": [], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "R:-992248734"}, "names": [{"id": {"id": "T:1487029779"}, "name": "Giorgi", "extraction_source": {"page": 0, "block": 0, "char_start": 102, "char_end": 108, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.907512"}}], "descriptions": [{"id": {"id": "T:44727886"}, "source": "E.E.; Bhattacharya", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 110, "char_end": 128, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.907512"}}], "value_specs": [], "groundings": [], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "R:-2051698457"}, "names": [{"id": {"id": "T:1089702946"}, "name": "Yoon", "extraction_source": {"page": 0, "block": 0, "char_start": 47, "char_end": 51, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.907646"}}], "descriptions": [{"id": {"id": "T:1315025306"}, "source": "h.; Theiler", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 53, "char_end": 64, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.907646"}}], "value_specs": [], "groundings": [], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "R:-735404315"}, "names": [{"id": {"id": "T:-1888291588"}, "name": "Laydon", "extraction_source": {"page": 0, "block": 0, "char_start": 96, "char_end": 102, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.907758"}}], "descriptions": [{"id": {"id": "T:-1887895213"}, "source": "D.J.; Dabrera", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 104, "char_end": 117, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.907758"}}], "value_specs": [], "groundings": [], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "R:1497961882"}, "names": [{"id": {"id": "T:-357419283"}, "name": "Chand", "extraction_source": {"page": 0, "block": 0, "char_start": 26, "char_end": 31, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.907889"}}], "descriptions": [{"id": {"id": "T:-1372797310"}, "source": "m.; Barrett", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 33, "char_end": 44, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.907889"}}], "value_specs": [], "groundings": [{"grounding_text": "Zia", "grounding_id": "ncit:C44848", "source": [], "score": 0.792691707611084, "provenance": {"method": "SKEMA-TR-Embedding", "timestamp": "2023-07-04T01:15:56.907909"}}], "data_columns": null}}, {"type": "anchored_extraction", "amr_element_id": null, "payload": {"id": {"id": "R:1093468671"}, "names": [{"id": {"id": "T:-6606364"}, "name": "Lyu", "extraction_source": {"page": 0, "block": 0, "char_start": 4, "char_end": 7, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.908021"}}], "descriptions": [{"id": {"id": "T:1537885333"}, "source": "W.; Wehby", "grounding": [], "extraction_source": {"page": 0, "block": 0, "char_start": 9, "char_end": 18, "document_reference": {"id": "ijerph-18-09027.pdf"}}, "provenance": {"method": "Skema TR Pipeline rules", "timestamp": "2023-07-04T01:15:56.908021"}}], "value_specs": [], "groundings": [], "data_columns": null}}, {"type": "document_collection", "amr_element_id": null, "payload": {"documents": [{"id": {"id": "ijerph-18-09027.pdf"}, "source_file": "ijerph-18-09027.pdf", "doi": ""}, {"id": {"id": "1"}, "source_file": "be122a7b0834dea144f41dbd06e7045a__text_ijerph-18-09027", "doi": ""}]}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "8191676147039559327"}, "extractions": [{"id": "E:-1621000196"}], "location": null, "time": {"datetime": "14 April 2020", "start_datetime": null, "end_datetime": null, "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.887296"}, "grounding": null}}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "1016400811037600199"}, "extractions": [{"id": "E:-1621000196"}], "location": {"location": "Singapore", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.887331"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "-3171073294860552492"}, "extractions": [{"id": "E:-1621000196"}], "location": {"location": "Taiwan", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.887358"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "2814658218382375354"}, "extractions": [{"id": "E:-1621000196"}], "location": {"location": "New York", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.887381"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "-8704112631809980577"}, "extractions": [{"id": "E:-1621000196"}], "location": {"location": "the states", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.887404"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "2030053119592084747"}, "extractions": [{"id": "E:-1621000196"}], "location": {"location": "Washington", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.887426"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "1262721062878511358"}, "extractions": [{"id": "E:-1621000196"}], "location": {"location": "USA", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.887448"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "-3501912739117260156"}, "extractions": [{"id": "R:1863362492"}], "location": {"location": "Germany", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.888921"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "-6115423083651620858"}, "extractions": [{"id": "R:1863362492"}], "location": {"location": "Arizona", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.888948"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "1016400811037600199"}, "extractions": [{"id": "R:1863362492"}], "location": {"location": "Singapore", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.888972"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "-3501912739117260156"}, "extractions": [{"id": "R:-2131818727"}], "location": {"location": "Germany", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.889104"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "-6115423083651620858"}, "extractions": [{"id": "R:-2131818727"}], "location": {"location": "Arizona", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.889129"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "1016400811037600199"}, "extractions": [{"id": "R:-2131818727"}], "location": {"location": "Singapore", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.889152"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "-3501912739117260156"}, "extractions": [{"id": "R:-136675206"}], "location": {"location": "Germany", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.889331"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "-6115423083651620858"}, "extractions": [{"id": "R:-136675206"}], "location": {"location": "Arizona", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.889356"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "1016400811037600199"}, "extractions": [{"id": "R:-136675206"}], "location": {"location": "Singapore", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.889379"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "-3501912739117260156"}, "extractions": [{"id": "E:-375195508"}], "location": {"location": "Germany", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.889476"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "-6115423083651620858"}, "extractions": [{"id": "E:-375195508"}], "location": {"location": "Arizona", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.889502"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "1016400811037600199"}, "extractions": [{"id": "E:-375195508"}], "location": {"location": "Singapore", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.889525"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "-3501912739117260156"}, "extractions": [{"id": "E:-227734974"}], "location": {"location": "Germany", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.889623"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "-6115423083651620858"}, "extractions": [{"id": "E:-227734974"}], "location": {"location": "Arizona", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.889648"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "1016400811037600199"}, "extractions": [{"id": "E:-227734974"}], "location": {"location": "Singapore", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.889671"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "-3501912739117260156"}, "extractions": [{"id": "R:2011356353"}], "location": {"location": "Germany", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.889860"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "-6115423083651620858"}, "extractions": [{"id": "R:2011356353"}], "location": {"location": "Arizona", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.889886"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "1016400811037600199"}, "extractions": [{"id": "R:2011356353"}], "location": {"location": "Singapore", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.889910"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "-3501912739117260156"}, "extractions": [{"id": "E:1157924531"}], "location": {"location": "Germany", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.890044"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "-6115423083651620858"}, "extractions": [{"id": "E:1157924531"}], "location": {"location": "Arizona", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.890069"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "1016400811037600199"}, "extractions": [{"id": "E:1157924531"}], "location": {"location": "Singapore", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.890091"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "-3501912739117260156"}, "extractions": [{"id": "R:526915523"}], "location": {"location": "Germany", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.890221"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "-6115423083651620858"}, "extractions": [{"id": "R:526915523"}], "location": {"location": "Arizona", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.890245"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "1016400811037600199"}, "extractions": [{"id": "R:526915523"}], "location": {"location": "Singapore", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.890268"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "-3501912739117260156"}, "extractions": [{"id": "R:-328739983"}], "location": {"location": "Germany", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.890399"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "-6115423083651620858"}, "extractions": [{"id": "R:-328739983"}], "location": {"location": "Arizona", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.890424"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "-3501912739117260156"}, "extractions": [{"id": "E:1248386289"}], "location": {"location": "Germany", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.890557"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "-6115423083651620858"}, "extractions": [{"id": "E:1248386289"}], "location": {"location": "Arizona", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.890582"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "1016400811037600199"}, "extractions": [{"id": "E:1248386289"}], "location": {"location": "Singapore", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.890606"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "1016400811037600199"}, "extractions": [{"id": "R:46512816"}], "location": {"location": "Singapore", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.890723"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "1016400811037600199"}, "extractions": [{"id": "R:-407044703"}], "location": {"location": "Singapore", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.890900"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "-3501912739117260156"}, "extractions": [{"id": "R:-1111531285"}], "location": {"location": "Germany", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.891015"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "-6115423083651620858"}, "extractions": [{"id": "R:-1111531285"}], "location": {"location": "Arizona", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.891040"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "1016400811037600199"}, "extractions": [{"id": "E:-445420568"}], "location": {"location": "Singapore", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.891337"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "1016400811037600199"}, "extractions": [{"id": "E:-1296333892"}], "location": {"location": "Singapore", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.891432"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "1016400811037600199"}, "extractions": [{"id": "R:-2064009007"}], "location": {"location": "Singapore", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.891664"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "1016400811037600199"}, "extractions": [{"id": "E:-98926741"}], "location": {"location": "Singapore", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.891940"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "6910792101217074898"}, "extractions": [{"id": "E:-98926741"}], "location": {"location": "National Centre of Disease Control Singapore", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.891966"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "1016400811037600199"}, "extractions": [{"id": "E:1374298884"}], "location": {"location": "Singapore", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.892106"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "6910792101217074898"}, "extractions": [{"id": "E:1374298884"}], "location": {"location": "National Centre of Disease Control Singapore", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.892131"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "1016400811037600199"}, "extractions": [{"id": "E:1028710751"}], "location": {"location": "Singapore", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.892268"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "6910792101217074898"}, "extractions": [{"id": "E:1028710751"}], "location": {"location": "National Centre of Disease Control Singapore", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.892293"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "1016400811037600199"}, "extractions": [{"id": "E:1157335987"}], "location": {"location": "Singapore", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.892408"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "6910792101217074898"}, "extractions": [{"id": "E:1157335987"}], "location": {"location": "National Centre of Disease Control Singapore", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.892433"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "6910792101217074898"}, "extractions": [{"id": "E:910795188"}], "location": {"location": "National Centre of Disease Control Singapore", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.892549"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "1016400811037600199"}, "extractions": [{"id": "E:910795188"}], "location": {"location": "Singapore", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.892573"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "6910792101217074898"}, "extractions": [{"id": "E:-1286804828"}], "location": {"location": "National Centre of Disease Control Singapore", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.892689"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "1016400811037600199"}, "extractions": [{"id": "E:-1286804828"}], "location": {"location": "Singapore", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.892714"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "1016400811037600199"}, "extractions": [{"id": "E:-325311557"}], "location": {"location": "Singapore", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.892848"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "1016400811037600199"}, "extractions": [{"id": "R:-1134010888"}], "location": {"location": "Singapore", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.893535"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "1016400811037600199"}, "extractions": [{"id": "R:-208609464"}], "location": {"location": "Singapore", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.895029"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "1016400811037600199"}, "extractions": [{"id": "R:-1889118797"}], "location": {"location": "Singapore", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.895658"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "1016400811037600199"}, "extractions": [{"id": "R:-1976612459"}], "location": {"location": "Singapore", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.895777"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "1016400811037600199"}, "extractions": [{"id": "R:2114716604"}], "location": {"location": "Singapore", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.896248"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "1016400811037600199"}, "extractions": [{"id": "E:591214166"}], "location": {"location": "Singapore", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.897044"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "6997079734403945466"}, "extractions": [{"id": "R:1100301483"}], "location": {"location": "England", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.897670"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "6997079734403945466"}, "extractions": [{"id": "R:-1903420941"}], "location": {"location": "England", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.897805"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "6997079734403945466"}, "extractions": [{"id": "E:1117338965"}], "location": {"location": "England", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.897917"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "-8019536423268241387"}, "extractions": [{"id": "R:-302419759"}], "location": {"location": "Komatsu", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.898088"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "-5329764265752713300"}, "extractions": [{"id": "R:-302419759"}], "location": {"location": "K.K", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.898114"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "8108698055925566728"}, "extractions": [{"id": "R:-302419759"}], "location": {"location": "January 22-August 7", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.898137"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "-6115423083651620858"}, "extractions": [{"id": "R:-302419759"}], "location": {"location": "Arizona", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.898160"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "-8019536423268241387"}, "extractions": [{"id": "E:1784148891"}], "location": {"location": "Komatsu", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.898291"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "-5329764265752713300"}, "extractions": [{"id": "E:1784148891"}], "location": {"location": "K.K", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.898315"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "8108698055925566728"}, "extractions": [{"id": "E:1784148891"}], "location": {"location": "January 22-August 7", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.898338"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "-6115423083651620858"}, "extractions": [{"id": "E:1784148891"}], "location": {"location": "Arizona", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.898361"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "-8019536423268241387"}, "extractions": [{"id": "R:459537029"}], "location": {"location": "Komatsu", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.898509"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "-5329764265752713300"}, "extractions": [{"id": "R:459537029"}], "location": {"location": "K.K", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.898536"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "8108698055925566728"}, "extractions": [{"id": "R:459537029"}], "location": {"location": "January 22-August 7", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.898560"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "-6115423083651620858"}, "extractions": [{"id": "R:459537029"}], "location": {"location": "Arizona", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.898584"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "-8019536423268241387"}, "extractions": [{"id": "R:73791469"}], "location": {"location": "Komatsu", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.898713"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "-5329764265752713300"}, "extractions": [{"id": "R:73791469"}], "location": {"location": "K.K", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.898738"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "8108698055925566728"}, "extractions": [{"id": "R:73791469"}], "location": {"location": "January 22-August 7", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.898786"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "-6115423083651620858"}, "extractions": [{"id": "R:73791469"}], "location": {"location": "Arizona", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.898825"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "-8019536423268241387"}, "extractions": [{"id": "E:885080843"}], "location": {"location": "Komatsu", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.898937"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "-5329764265752713300"}, "extractions": [{"id": "E:885080843"}], "location": {"location": "K.K", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.898963"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "8108698055925566728"}, "extractions": [{"id": "E:885080843"}], "location": {"location": "January 22-August 7", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.898987"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "-6115423083651620858"}, "extractions": [{"id": "E:885080843"}], "location": {"location": "Arizona", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.899010"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "-8019536423268241387"}, "extractions": [{"id": "E:193482118"}], "location": {"location": "Komatsu", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.899147"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "-5329764265752713300"}, "extractions": [{"id": "E:193482118"}], "location": {"location": "K.K", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.899172"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "8108698055925566728"}, "extractions": [{"id": "E:193482118"}], "location": {"location": "January 22-August 7", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.899196"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "-6115423083651620858"}, "extractions": [{"id": "E:193482118"}], "location": {"location": "Arizona", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.899218"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "-8019536423268241387"}, "extractions": [{"id": "R:262749454"}], "location": {"location": "Komatsu", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.899348"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "-5329764265752713300"}, "extractions": [{"id": "R:262749454"}], "location": {"location": "K.K", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.899372"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "8108698055925566728"}, "extractions": [{"id": "R:262749454"}], "location": {"location": "January 22-August 7", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.899395"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "-6115423083651620858"}, "extractions": [{"id": "R:262749454"}], "location": {"location": "Arizona", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.899418"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "-8019536423268241387"}, "extractions": [{"id": "E:-236825794"}], "location": {"location": "Komatsu", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.899581"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "-5329764265752713300"}, "extractions": [{"id": "E:-236825794"}], "location": {"location": "K.K", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.899606"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "8108698055925566728"}, "extractions": [{"id": "E:-236825794"}], "location": {"location": "January 22-August 7", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.899630"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "-6115423083651620858"}, "extractions": [{"id": "E:-236825794"}], "location": {"location": "Arizona", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.899652"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "1016400811037600199"}, "extractions": [{"id": "R:1846198673"}], "location": {"location": "Singapore", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.899761"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "8191676147039559327"}, "extractions": [{"id": "R:1846198673"}], "location": null, "time": {"datetime": "29 January 2021", "start_datetime": null, "end_datetime": null, "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.899785"}, "grounding": null}}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "1016400811037600199"}, "extractions": [{"id": "R:-1747703505"}], "location": {"location": "Singapore", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.899912"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "8191676147039559327"}, "extractions": [{"id": "R:-1747703505"}], "location": null, "time": {"datetime": "29 January 2021", "start_datetime": null, "end_datetime": null, "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.899937"}, "grounding": null}}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "1016400811037600199"}, "extractions": [{"id": "R:1390890090"}], "location": {"location": "Singapore", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.900044"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "8191676147039559327"}, "extractions": [{"id": "R:1390890090"}], "location": null, "time": {"datetime": "29 January 2021", "start_datetime": null, "end_datetime": null, "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.900069"}, "grounding": null}}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "5245253148795271646"}, "extractions": [{"id": "R:-114592353"}], "location": {"location": "US", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.900179"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "344867900633503813"}, "extractions": [{"id": "E:697989061"}], "location": {"location": "Academy of Medicine", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.900288"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "-1833220793972450760"}, "extractions": [{"id": "E:697989061"}], "location": {"location": "National Centre for Infectious Diseases", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.900312"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "1016400811037600199"}, "extractions": [{"id": "E:697989061"}], "location": {"location": "Singapore", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.900335"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "579567977094200065"}, "extractions": [{"id": "E:697989061"}], "location": {"location": "Meredith", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.900358"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "344867900633503813"}, "extractions": [{"id": "R:-1658505651"}], "location": {"location": "Academy of Medicine", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.900466"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "-1833220793972450760"}, "extractions": [{"id": "R:-1658505651"}], "location": {"location": "National Centre for Infectious Diseases", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.900490"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "1016400811037600199"}, "extractions": [{"id": "R:-1658505651"}], "location": {"location": "Singapore", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.900513"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "579567977094200065"}, "extractions": [{"id": "R:-1658505651"}], "location": {"location": "Meredith", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.900535"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "344867900633503813"}, "extractions": [{"id": "E:1679128071"}], "location": {"location": "Academy of Medicine", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.900642"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "-1833220793972450760"}, "extractions": [{"id": "E:1679128071"}], "location": {"location": "National Centre for Infectious Diseases", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.900667"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "1016400811037600199"}, "extractions": [{"id": "E:1679128071"}], "location": {"location": "Singapore", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.900690"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "579567977094200065"}, "extractions": [{"id": "E:1679128071"}], "location": {"location": "Meredith", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.900712"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "344867900633503813"}, "extractions": [{"id": "R:1255848250"}], "location": {"location": "Academy of Medicine", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.900862"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "-1833220793972450760"}, "extractions": [{"id": "R:1255848250"}], "location": {"location": "National Centre for Infectious Diseases", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.900888"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "1016400811037600199"}, "extractions": [{"id": "R:1255848250"}], "location": {"location": "Singapore", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.900919"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "579567977094200065"}, "extractions": [{"id": "R:1255848250"}], "location": {"location": "Meredith", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.900942"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "344867900633503813"}, "extractions": [{"id": "R:1043198099"}], "location": {"location": "Academy of Medicine", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.901126"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "-1833220793972450760"}, "extractions": [{"id": "R:1043198099"}], "location": {"location": "National Centre for Infectious Diseases", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.901165"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "1016400811037600199"}, "extractions": [{"id": "R:1043198099"}], "location": {"location": "Singapore", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.901203"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "579567977094200065"}, "extractions": [{"id": "R:1043198099"}], "location": {"location": "Meredith", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.901238"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "1016400811037600199"}, "extractions": [{"id": "E:1349342732"}], "location": {"location": "Singapore", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.901778"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "307865811701786012"}, "extractions": [{"id": "E:1349342732"}], "location": {"location": "D.Y", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.901821"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "1016400811037600199"}, "extractions": [{"id": "R:1741398158"}], "location": {"location": "Singapore", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.903429"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "6910792101217074898"}, "extractions": [{"id": "R:1741398158"}], "location": {"location": "National Centre of Disease Control Singapore", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.903456"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "1016400811037600199"}, "extractions": [{"id": "R:-1149068522"}], "location": {"location": "Singapore", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.904324"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "-8019536423268241387"}, "extractions": [{"id": "R:-719696986"}], "location": {"location": "Komatsu", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.904792"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "-5329764265752713300"}, "extractions": [{"id": "R:-719696986"}], "location": {"location": "K.K", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.904819"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "8108698055925566728"}, "extractions": [{"id": "R:-719696986"}], "location": {"location": "January 22-August 7", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.904843"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "-6115423083651620858"}, "extractions": [{"id": "R:-719696986"}], "location": {"location": "Arizona", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.904866"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "-8019536423268241387"}, "extractions": [{"id": "R:-102847579"}], "location": {"location": "Komatsu", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.905006"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "-5329764265752713300"}, "extractions": [{"id": "R:-102847579"}], "location": {"location": "K.K", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.905031"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "579567977094200065"}, "extractions": [{"id": "R:-102847579"}], "location": {"location": "Meredith", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.905054"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "-8019536423268241387"}, "extractions": [{"id": "E:-728230378"}], "location": {"location": "Komatsu", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.905184"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "-5329764265752713300"}, "extractions": [{"id": "E:-728230378"}], "location": {"location": "K.K", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.905209"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "579567977094200065"}, "extractions": [{"id": "E:-728230378"}], "location": {"location": "Meredith", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.905233"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "-8019536423268241387"}, "extractions": [{"id": "R:-1879785839"}], "location": {"location": "Komatsu", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.905362"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "-5329764265752713300"}, "extractions": [{"id": "R:-1879785839"}], "location": {"location": "K.K", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.905387"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "579567977094200065"}, "extractions": [{"id": "R:-1879785839"}], "location": {"location": "Meredith", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.905411"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "-8019536423268241387"}, "extractions": [{"id": "E:2018394268"}], "location": {"location": "Komatsu", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.905523"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "-5329764265752713300"}, "extractions": [{"id": "E:2018394268"}], "location": {"location": "K.K", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.905549"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "579567977094200065"}, "extractions": [{"id": "E:2018394268"}], "location": {"location": "Meredith", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.905572"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "-8019536423268241387"}, "extractions": [{"id": "E:1563442282"}], "location": {"location": "Komatsu", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.905706"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "-5329764265752713300"}, "extractions": [{"id": "E:1563442282"}], "location": {"location": "K.K", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.905731"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "579567977094200065"}, "extractions": [{"id": "E:1563442282"}], "location": {"location": "Meredith", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.905786"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "-8019536423268241387"}, "extractions": [{"id": "R:1696945602"}], "location": {"location": "Komatsu", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.905923"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "-5329764265752713300"}, "extractions": [{"id": "R:1696945602"}], "location": {"location": "K.K", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.905948"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "579567977094200065"}, "extractions": [{"id": "R:1696945602"}], "location": {"location": "Meredith", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.905972"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "-8019536423268241387"}, "extractions": [{"id": "E:469395013"}], "location": {"location": "Komatsu", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.906103"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "-5329764265752713300"}, "extractions": [{"id": "E:469395013"}], "location": {"location": "K.K", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.906128"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "579567977094200065"}, "extractions": [{"id": "E:469395013"}], "location": {"location": "Meredith", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.906152"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "-8019536423268241387"}, "extractions": [{"id": "R:-2147315940"}], "location": {"location": "Komatsu", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.906284"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "-5329764265752713300"}, "extractions": [{"id": "R:-2147315940"}], "location": {"location": "K.K", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.906309"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "579567977094200065"}, "extractions": [{"id": "R:-2147315940"}], "location": {"location": "Meredith", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.906332"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "-8019536423268241387"}, "extractions": [{"id": "E:1394798046"}], "location": {"location": "Komatsu", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.906439"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "-5329764265752713300"}, "extractions": [{"id": "E:1394798046"}], "location": {"location": "K.K", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.906464"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "579567977094200065"}, "extractions": [{"id": "E:1394798046"}], "location": {"location": "Meredith", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.906486"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "5184780106981504324"}, "extractions": [{"id": "E:1394798046"}], "location": {"location": "H.M", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.906509"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "-8019536423268241387"}, "extractions": [{"id": "R:-420570018"}], "location": {"location": "Komatsu", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.906617"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "-5329764265752713300"}, "extractions": [{"id": "R:-420570018"}], "location": {"location": "K.K", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.906641"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "579567977094200065"}, "extractions": [{"id": "R:-420570018"}], "location": {"location": "Meredith", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.906665"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "5184780106981504324"}, "extractions": [{"id": "R:-420570018"}], "location": {"location": "H.M", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.906688"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "-8019536423268241387"}, "extractions": [{"id": "E:-97894767"}], "location": {"location": "Komatsu", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.906858"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "-5329764265752713300"}, "extractions": [{"id": "E:-97894767"}], "location": {"location": "K.K", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.906882"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "579567977094200065"}, "extractions": [{"id": "E:-97894767"}], "location": {"location": "Meredith", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.906905"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "5184780106981504324"}, "extractions": [{"id": "E:-97894767"}], "location": {"location": "H.M", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.906928"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "-8019536423268241387"}, "extractions": [{"id": "R:731501372"}], "location": {"location": "Komatsu", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.907057"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "-5329764265752713300"}, "extractions": [{"id": "R:731501372"}], "location": {"location": "K.K", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.907082"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "579567977094200065"}, "extractions": [{"id": "R:731501372"}], "location": {"location": "Meredith", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.907106"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "5184780106981504324"}, "extractions": [{"id": "R:731501372"}], "location": {"location": "H.M", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.907129"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "-8019536423268241387"}, "extractions": [{"id": "R:1299812587"}], "location": {"location": "Komatsu", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.907268"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "-5329764265752713300"}, "extractions": [{"id": "R:1299812587"}], "location": {"location": "K.K", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.907293"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "579567977094200065"}, "extractions": [{"id": "R:1299812587"}], "location": {"location": "Meredith", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.907316"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "5184780106981504324"}, "extractions": [{"id": "R:1299812587"}], "location": {"location": "H.M", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.907370"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "5184780106981504324"}, "extractions": [{"id": "R:-521953121"}], "location": {"location": "H.M", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.907488"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "5184780106981504324"}, "extractions": [{"id": "R:-992248734"}], "location": {"location": "H.M", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.907622"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "5184780106981504324"}, "extractions": [{"id": "R:-2051698457"}], "location": {"location": "H.M", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.907736"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "-3143768132050437202"}, "extractions": [{"id": "R:-735404315"}], "location": {"location": "M.C", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.907866"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "-3143768132050437202"}, "extractions": [{"id": "R:1497961882"}], "location": {"location": "M.C", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.907998"}, "grounding": null, "extraction_source": null}, "time": null}}, {"type": "scenario_context", "amr_element_id": null, "payload": {"id": {"id": "3450612483642983903"}, "extractions": [{"id": "R:1093468671"}], "location": {"location": "S.Y", "provenance": {"method": "SKEMA-TR-Context-1.0", "timestamp": "2023-07-04T01:15:56.908109"}, "grounding": null, "extraction_source": null}, "time": null}}]}, "errors": null}], "generalized_errors": null} \ No newline at end of file diff --git a/skema/rest/tests/test_integrated_text_reading_proxy.py b/skema/rest/tests/test_integrated_text_reading_proxy.py index 50eaacffe78..a0b05a38137 100644 --- a/skema/rest/tests/test_integrated_text_reading_proxy.py +++ b/skema/rest/tests/test_integrated_text_reading_proxy.py @@ -12,14 +12,14 @@ # TODO Add a unit test with a small document -# Commented out for now # Test the cosmos endpoint -# def test_cosmos(): -# """Test that we are able to fetch COSMOS data correctly""" -# path = Path(__file__).parents[0] / "data" / "CHIME_SVIIvR_model.pdf" -# with path.open("rb") as pdf: -# ret = cosmos_client(path.name, pdf) -# assert ret is not None and len(ret) > 0 +def test_cosmos(): + """Test that we are able to fetch COSMOS data correctly""" + path = Path(__file__).parents[0] / "data" / "integrated_text_reading" / "CHIME_SVIIvR_model.pdf" + print(path) + with path.open("rb") as pdf: + ret = cosmos_client(path.name, pdf) + assert ret is not None and len(ret) > 0 def test_healthcheck(): @@ -30,7 +30,3 @@ def test_healthcheck(): status.HTTP_502_BAD_GATEWAY, status.HTTP_500_INTERNAL_SERVER_ERROR } - - -if __name__ == "__main__": - test_cosmos() diff --git a/skema/rest/tests/test_metal_proxy.py b/skema/rest/tests/test_metal_proxy.py new file mode 100644 index 00000000000..aafc0cc9648 --- /dev/null +++ b/skema/rest/tests/test_metal_proxy.py @@ -0,0 +1,48 @@ +from pathlib import Path + +from askem_extractions.data_model import AttributeCollection +from fastapi import status + +from skema.rest.metal_proxy import app +from fastapi.testclient import TestClient + +client = TestClient(app) +def test_link_amr(): + """Test that we are able to link and AMR to text extractions correctly""" + amr_path = Path(__file__).parents[0] / "data" / "metal" / "fixed_scenario1_amr_eq.json" + extractions_path = Path(__file__).parents[0] / "data" / "metal" / "tr_document_results.json" + + params = { + "amr_type": "petrinet", + "similarity_model": "sentence-transformers/all-MiniLM-L6-v2", + "similarity_threshold": 0.5 + } + + files = { + "amr_file": amr_path.open("rb"), + "text_extractions_file": extractions_path.open("rb") + } + + response = client.post("/link_amr", params=params, files=files) + + assert response.status_code == 200, f"The response code for /link_amr was {response.status_code}" + + linked_amr = response.json() + + # There should be more than 5 linked AMR elements + metadata = AttributeCollection(**linked_amr["metadata"]) + num_linked_elements = sum([isinstance(md.amr_element_id, str) for md in metadata.attributes]) + assert num_linked_elements > 5, f"Only {num_linked_elements}, should be close to 17 with the testing configuration" + + + +def test_healthcheck(): + """Test case for /healthcheck endpoint.""" + response = client.get("/healthcheck") + assert response.status_code in { + status.HTTP_200_OK, + status.HTTP_500_INTERNAL_SERVER_ERROR + } + +if __name__ == "__main__": + test_link_amr() \ No newline at end of file From 9f4c8e1defea8273d1082a14e2fdcc32ee1cc050 Mon Sep 17 00:00:00 2001 From: Justin Lieffers <76677555+Free-Quarks@users.noreply.github.com> Date: Fri, 14 Jul 2023 07:56:11 -0700 Subject: [PATCH 3/4] Hackathon2 (#333) This is a quick and hacky PR to expand the coverage of our EQ2AMR endpoints but using the new MathExpressionTree data structure and all the coverage additions it comes with. It also includes updates to the AMR spec requested by TA-4. (I am aware the get_terms() function in first_order_ode.rs is in desperate need of a refactoring.) --- data/mml2pn_inputs/testing_eqns/mml_list.txt | 5 + data/mml2pn_inputs/testing_eqns/mml_list2.txt | 5 + data/mml2pn_inputs/testing_eqns/mml_list3.txt | 5 + skema/skema-rs/mathml/src/acset.rs | 176 +++++- .../mathml/src/parsers/first_order_ode.rs | 520 ++++++++++++++++++ .../mathml/src/parsers/generic_mathml.rs | 8 +- skema/skema-rs/skema/src/bin/morae.rs | 23 +- skema/skema-rs/skema/src/database.rs | 2 +- skema/skema-rs/skema/src/lib.rs | 4 +- skema/skema-rs/skema/src/model_extraction.rs | 6 + skema/skema-rs/skema/src/services/mathml.rs | 29 +- 11 files changed, 764 insertions(+), 19 deletions(-) create mode 100644 data/mml2pn_inputs/testing_eqns/mml_list.txt create mode 100644 data/mml2pn_inputs/testing_eqns/mml_list2.txt create mode 100644 data/mml2pn_inputs/testing_eqns/mml_list3.txt diff --git a/data/mml2pn_inputs/testing_eqns/mml_list.txt b/data/mml2pn_inputs/testing_eqns/mml_list.txt new file mode 100644 index 00000000000..305731d14c4 --- /dev/null +++ b/data/mml2pn_inputs/testing_eqns/mml_list.txt @@ -0,0 +1,5 @@ +dEdt=βISδE +dRdt=(1−α)γI +dIdt=δE(1−α)γIαρI +dDdt=αρI +dSdt=βIS \ No newline at end of file diff --git a/data/mml2pn_inputs/testing_eqns/mml_list2.txt b/data/mml2pn_inputs/testing_eqns/mml_list2.txt new file mode 100644 index 00000000000..80bc1e561eb --- /dev/null +++ b/data/mml2pn_inputs/testing_eqns/mml_list2.txt @@ -0,0 +1,5 @@ +dS(t)dt=βI(t)S(t) +dE(t)dt=βI(t)S(t)δE(t) +dD(t)dt=αρI(t) +dR(t)dt=(1−α)γI(t) +dI(t)dt=δE(t)(1−α)γI(t)αρI(t) \ No newline at end of file diff --git a/data/mml2pn_inputs/testing_eqns/mml_list3.txt b/data/mml2pn_inputs/testing_eqns/mml_list3.txt new file mode 100644 index 00000000000..f9fd51422ee --- /dev/null +++ b/data/mml2pn_inputs/testing_eqns/mml_list3.txt @@ -0,0 +1,5 @@ +dS(t)dt=βI(t)S(t)N +dE(t)dt=βI(t)S(t)NδE(t) +dI(t)dt=δE(t)(1α)γI(t)αρI(t) +dR(t)dt=(1α)γI(t) +dD(t)dt=αρI(t) \ No newline at end of file diff --git a/skema/skema-rs/mathml/src/acset.rs b/skema/skema-rs/mathml/src/acset.rs index eabe1999063..1670d00bcf1 100644 --- a/skema/skema-rs/mathml/src/acset.rs +++ b/skema/skema-rs/mathml/src/acset.rs @@ -1,12 +1,12 @@ //! Structs to represent elements of ACSets (Annotated C-Sets, a concept from category theory). //! JSON-serialized ACSets are the form of model exchange between TA1 and TA2. +use crate::parsers::first_order_ode::{get_terms, FirstOrderODE, PnTerm}; use crate::{ ast::{Math, MathExpression, Mi}, mml2pn::{group_by_operators, Term}, petri_net::{Polarity, Var}, }; use serde::{Deserialize, Serialize}; - use std::collections::{BTreeSet, HashMap, HashSet}; use utoipa; use utoipa::ToSchema; @@ -60,6 +60,8 @@ pub struct PetriNet { pub model_version: String, pub model: ModelPetriNet, #[serde(skip_serializing_if = "Option::is_none")] + pub semantics: Option, + #[serde(skip_serializing_if = "Option::is_none")] pub metadata: Option, } #[derive(Debug, PartialEq, Eq, Clone, Serialize, Deserialize, ToSchema)] @@ -90,8 +92,6 @@ pub struct ModelPetriNet { /// Note: parameters is a required field in the schema, but we make it optional since we want /// to reuse this schema for partial extractions as well. #[serde(skip_serializing_if = "Option::is_none")] - pub semantics: Option, - #[serde(skip_serializing_if = "Option::is_none")] pub metadata: Option, } @@ -373,7 +373,7 @@ impl From for PetriNet { } let transitions = Transition { - id: trans.tname.clone(), + id: format!("t{}", i.clone()), input: Some(string_vec1.clone()), output: Some(string_vec2.clone()), ..Default::default() @@ -392,7 +392,7 @@ impl From for PetriNet { } let rate = Rate { - target: trans.tname.clone(), + target: format!("t{}", i.clone()), expression: format!("{}{}", trans.tname.clone(), terms.clone()), // the second term needs to be the product of the inputs ..Default::default() }; @@ -416,7 +416,6 @@ impl From for PetriNet { let model = ModelPetriNet { states: states_vec, transitions: transitions_vec, - semantics: Some(semantics), metadata: None, }; @@ -427,6 +426,171 @@ impl From for PetriNet { description: "This is a model from mathml equations".to_string(), model_version: "0.1".to_string(), model, + semantics: Some(semantics), + metadata: None, + } + } +} + +impl From> for PetriNet { + fn from(ode_vec: Vec) -> PetriNet { + // initialize vecs + let mut states_vec = BTreeSet::::new(); + let mut transitions_vec = BTreeSet::::new(); + let mut initial_vec = Vec::::new(); + let mut parameter_vec = Vec::::new(); + let mut rate_vec = Vec::::new(); + let mut state_string_list = Vec::::new(); + let mut terms = Vec::::new(); + + // this first for loop is for the creation state related parameters in the AMR + for ode in ode_vec.iter() { + let states = State { + id: ode.lhs_var.to_string().clone(), + name: ode.lhs_var.to_string().clone(), + ..Default::default() + }; + let initials = Initial { + target: ode.lhs_var.to_string().clone(), + expression: format!("{}0", ode.lhs_var.to_string().clone()), + ..Default::default() + }; + let parameters = Parameter { + id: initials.expression.clone(), + name: Some(initials.expression.clone()), + description: Some(format!( + "The total {} population at timestep 0", + ode.lhs_var.to_string().clone() + )), + ..Default::default() + }; + parameter_vec.push(parameters.clone()); + initial_vec.push(initials.clone()); + states_vec.insert(states.clone()); + state_string_list.push(ode.lhs_var.to_string().clone()); // used later for transition parsing + } + + // now for the construction of the transitions and their results + + // this collects all the terms from the equations + for ode in ode_vec.iter() { + terms.append(&mut get_terms(state_string_list.clone(), ode.clone())); + } + + for term in terms.iter() { + println!("term: {:?}\n", term.clone()); + } + + // now for polarity pairs of terms we need to construct the transistions + let mut transition_pair = Vec::<(PnTerm, PnTerm)>::new(); + for term1 in terms.clone().iter() { + for term2 in terms.clone().iter() { + if term1.polarity != term2.polarity + && term1.parameters == term2.parameters + && term1.polarity + { + let temp_pair = (term1.clone(), term2.clone()); + transition_pair.push(temp_pair); + } + } + } + + for (i, t) in transition_pair.iter().enumerate() { + println!("t-pair: {:?}\n", t.clone()); + if t.0.exp_states.len() == 1 { + // construct transtions for simple transtions + let transitions = Transition { + id: format!("t{}", i.clone()), + input: Some([t.1.dyn_state.clone()].to_vec()), + output: Some([t.0.dyn_state.clone()].to_vec()), + ..Default::default() + }; + transitions_vec.insert(transitions.clone()); + + let rate = Rate { + target: transitions.id.clone(), + expression: "".to_string(), // the second term needs to be the product of the inputs + expression_mathml: Some(t.0.expression.clone()), + }; + rate_vec.push(rate.clone()); + + for param in &t.0.parameters { + let parameters = Parameter { + id: param.clone(), + name: Some(param.clone()), + description: Some(format!("{} rate", param.clone())), + ..Default::default() + }; + parameter_vec.push(parameters.clone()); + } + } else { + // construct transitions for complicated transitions + // mainly need to construct the output specially, + // run by clay + let mut output = [t.0.dyn_state.clone()].to_vec(); + + for state in t.0.exp_states.iter() { + if *state != t.1.dyn_state { + output.push(state.clone()); + } + } + + let transitions = Transition { + id: format!("t{}", i.clone()), + input: Some(t.1.exp_states.clone()), + output: Some(output.clone()), + ..Default::default() + }; + transitions_vec.insert(transitions.clone()); + + let rate = Rate { + target: transitions.id.clone(), + expression: "".to_string(), // the second term needs to be the product of the inputs + expression_mathml: Some(t.0.expression.clone()), + }; + rate_vec.push(rate.clone()); + + for param in &t.0.parameters { + let parameters = Parameter { + id: param.clone(), + name: Some(param.clone()), + description: Some(format!("{} rate", param.clone())), + ..Default::default() + }; + parameter_vec.push(parameters.clone()); + } + } + } + + // trim duplicate parameters and remove integer parameters + + parameter_vec.sort(); + parameter_vec.dedup(); + + // construct the PetriNet + let ode = Ode { + rates: Some(rate_vec), + initials: Some(initial_vec), + parameters: Some(parameter_vec), + ..Default::default() + }; + + let semantics = Semantics { ode }; + + let model = ModelPetriNet { + states: states_vec, + transitions: transitions_vec, + metadata: None, + }; + + PetriNet { + name: "mathml model".to_string(), + schema: "https://github.com/DARPA-ASKEM/Model-Representations/blob/main/petrinet/petrinet_schema.json".to_string(), + schema_name: "PetriNet".to_string(), + description: "This is a model from mathml equations".to_string(), + model_version: "0.1".to_string(), + model, + semantics: Some(semantics), metadata: None, } } diff --git a/skema/skema-rs/mathml/src/parsers/first_order_ode.rs b/skema/skema-rs/mathml/src/parsers/first_order_ode.rs index a457d811bdf..430477b3409 100644 --- a/skema/skema-rs/mathml/src/parsers/first_order_ode.rs +++ b/skema/skema-rs/mathml/src/parsers/first_order_ode.rs @@ -1,3 +1,6 @@ +use crate::ast::operator::Operator::{Add, Divide, Multiply, Subtract}; +use crate::parsers::math_expression_tree::MathExpressionTree::Atom; +use crate::parsers::math_expression_tree::MathExpressionTree::Cons; use crate::{ ast::{ operator::{Derivative, Operator}, @@ -22,6 +25,8 @@ use nom::{ multi::{many0, many1}, sequence::{delimited, tuple}, }; +use std::fs::File; +use std::io::{BufRead, BufReader}; use std::str::FromStr; #[cfg(test)] @@ -102,6 +107,521 @@ impl FromStr for FirstOrderODE { } } +//-------------------------------------- +// Methods for extraction of PN AMR from ODE's +//-------------------------------------- +pub fn get_FirstOrderODE_vec_from_file(filepath: &str) -> Vec { + let f = File::open(filepath).unwrap(); + let lines = BufReader::new(f).lines(); + + let mut ode_vec = Vec::::new(); + + for line in lines.flatten() { + if let Some('#') = &line.chars().next() { + // Ignore lines starting with '#' + } else { + // Parse MathML into FirstOrderODE + let mut ode = line + .parse::() + .unwrap_or_else(|_| panic!("Unable to parse line {}!", line)); + ode.rhs = flatten_mults(ode.rhs.clone()); + println!( + "ode_line rhs string after: {:?}\n", + ode.rhs.to_string().clone() + ); + println!("ode_line rhs object: {:?}\n", ode.rhs.clone()); + ode_vec.push(ode); + } + } + ode_vec +} + +// this struct is for representing terms in an ODE system on equations +#[derive(Debug, Default, PartialEq, Eq, Clone, PartialOrd, Ord)] +pub struct PnTerm { + pub dyn_state: String, + pub exp_states: Vec, // list of state variables in term + pub polarity: bool, // polarity of term + pub expression: String, // content mathml for the expression + pub parameters: Vec, // list of parameters in term +} + +// this function takes in one ode equations and returns a vector of the terms in it +pub fn get_terms(sys_states: Vec, ode: FirstOrderODE) -> Vec { + let mut terms = Vec::::new(); + let _exp_states = Vec::::new(); + let _parameters = Vec::::new(); + + let dyn_state = ode.lhs_var.to_string(); + + match ode.rhs { + Cons(ref x, ref y) => { + match &x { + Multiply => { + let mut temp_term = get_term_mult(sys_states, y.clone()); + temp_term.dyn_state = dyn_state; + terms.push(temp_term.clone()); + println!("mult temp_term: {:?}\n", temp_term) + } + Subtract => { + /* found multiple terms */ + if y.len() == 1 { + // unary sub, so much be mult inside + match &y[0] { + Cons(_x1, ref y1) => { + let mut temp_term = get_term_mult(sys_states, y1.clone()); + temp_term.dyn_state = dyn_state; + if temp_term.polarity { + temp_term.polarity = false; + } else { + temp_term.polarity = true; + } + terms.push(temp_term.clone()); + println!("Unary Sub temp_term: {:?}\n", temp_term) + } + Atom(_x1) => { + println!("Not valid term in PN") + } + } + } else { + /* this is the same as Add, but with a polarity swap on the second term */ + /* this actually need to support an entire binary sub inside it again :( */ + match &y[0] { + Cons(x1, ref y1) => match &x1 { + Multiply => { + let mut temp_term = + get_term_mult(sys_states.clone(), y1.clone()); + temp_term.dyn_state = dyn_state.clone(); + terms.push(temp_term.clone()); + println!( + "binary sub1 mult temp_term: {:?}\n", + temp_term + ) + } + Subtract => { + match &y1[0] { + Cons(x2, ref y2) => { + if y2.len() == 1 { + let mut temp_term = + get_term_mult(sys_states.clone(), y2.clone()); + temp_term.dyn_state = dyn_state.clone(); + if temp_term.polarity { + temp_term.polarity = false; + } else { + temp_term.polarity = true; + } + terms.push(temp_term.clone()); + println!( + "binary sub1 unarysub temp_term: {:?}\n", + temp_term + ) + } else { + match &x2 { + Subtract => { + println!("to do") + } + Add => { + println!("to do") + } + Divide => { + println!("to do") + } + Multiply => { + let mut temp_term = get_term_mult( + sys_states.clone(), + y2.clone(), + ); + temp_term.dyn_state = dyn_state.clone(); + terms.push(temp_term.clone()); + println!("binary sub1 binary sub1 mult temp_term: {:?}\n", temp_term) + } + _ => println!("Not supported equation type"), + } + } + } + _ => { + println!("Not valid term for PN") + } + } + match &y1[1] { + Cons(x2, ref y2) => { + if y2.len() == 1 { + let mut temp_term = + get_term_mult(sys_states.clone(), y2.clone()); + temp_term.dyn_state = dyn_state.clone(); + terms.push(temp_term.clone()); + println!( + "binary sub1 unarysub temp_term: {:?}\n", + temp_term + ) + } else { + match &x2 { + Subtract => { + println!("to do") + } + Add => { + println!("to do") + } + Divide => { + println!("to do") + } + Multiply => { + let mut temp_term = get_term_mult( + sys_states.clone(), + y2.clone(), + ); + temp_term.dyn_state = dyn_state.clone(); + if temp_term.polarity { + temp_term.polarity = false; + } else { + temp_term.polarity = true; + } + terms.push(temp_term.clone()); + println!("binary sub1 binary sub2 mult temp_term: {:?}\n", temp_term) + } + _ => println!("Not supported equation type"), + } + } + } + _ => { + println!("Not valid term for PN") + } + } + } + // new edge case to handle + Divide => match &y1[0] { + Cons(_x2, ref y2) => { + let mut temp_term = + get_term_mult(sys_states.clone(), y2.clone()); + temp_term.dyn_state = dyn_state.clone(); + temp_term.parameters.push(y1[1].to_string()); + temp_term.expression = + MathExpressionTree::Cons(Divide, y1.clone()).to_cmml(); + terms.push(temp_term.clone()); + println!( + "binary sub1 div temp_term: {:?}\n", + temp_term.clone() + ) + } + _ => { + println!("dont support this") + } + }, + _ => { + println!("Error unsupported operation") + } + }, + Atom(_x1) => { + println!("Not valid term for PN") + } + } + match &y[1] { + Cons(x1, ref y1) => match x1 { + Multiply => { + let mut temp_term = + get_term_mult(sys_states, y1.clone()); + temp_term.dyn_state = dyn_state; + if temp_term.polarity { + temp_term.polarity = false; + } else { + temp_term.polarity = true; + } + terms.push(temp_term.clone()); + println!( + "binary sub2 mult temp_term: {:?}\n", + temp_term + ) + } + Subtract => match &y1[0] { + Cons(_x2, ref y2) => { + let mut temp_term = + get_term_mult(sys_states, y2.clone()); + temp_term.dyn_state = dyn_state; + terms.push(temp_term.clone()); + println!( + "binary sub2 unarysub temp_term: {:?}\n", + temp_term + ) + } + _ => { + println!("Not valid term for PN") + } + }, + _ => { + println!("Error unsupported operation") + } + }, + Atom(_x1) => { + println!("Not valid term for PN") + } + } + } + } // unary or binary + Add => { + /* found multiple terms */ + match &y[0] { + Cons(x1, ref y1) => match x1 { + Multiply => { + let mut temp_term = get_term_mult(sys_states.clone(), y1.clone()); + temp_term.dyn_state = dyn_state.clone(); + terms.push(temp_term); + } + Subtract => match &y1[0] { + Cons(_x2, ref y2) => { + let mut temp_term = + get_term_mult(sys_states.clone(), y2.clone()); + temp_term.dyn_state = dyn_state.clone(); + if temp_term.polarity { + temp_term.polarity = false; + } else { + temp_term.polarity = true; + } + terms.push(temp_term); + } + _ => { + println!("Not valid term for PN") + } + }, + _ => { + println!("Error unsupported operation") + } + }, + Atom(_x1) => { + println!("Not valid term for PN") + } + } + match &y[1] { + Cons(x1, ref y1) => match x1 { + Multiply => { + let mut temp_term = get_term_mult(sys_states, y1.clone()); + temp_term.dyn_state = dyn_state; + terms.push(temp_term); + } + Subtract => match &y1[0] { + Cons(_x2, ref y2) => { + let mut temp_term = + get_term_mult(sys_states, y2.clone()); + temp_term.dyn_state = dyn_state; + if temp_term.polarity { + temp_term.polarity = false; + } else { + temp_term.polarity = true; + } + terms.push(temp_term); + } + _ => { + println!("Not valid term for PN") + } + }, + _ => { + println!("Error unsupported operation") + } + }, + Atom(_x1) => { + println!("Not valid term for PN") + } + } + } + Divide => match &y[0] { + Cons(x1, ref y1) => match &x1 { + Multiply => { + let mut temp_term = get_term_mult(sys_states, y1.clone()); + temp_term.dyn_state = dyn_state; + temp_term.parameters.push(y[1].to_string()); + temp_term.expression = + MathExpressionTree::Cons(Divide, y.clone()).to_cmml(); + terms.push(temp_term.clone()) + } + Subtract => { + /* now to support unary subtract as numerator y[0] */ + match &y1[0] { + Cons(_x2, ref y2) => { + /* unary to mult */ + /* This has to be a unary sub into a mult (unless really stupid equation) */ + let mut temp_term = + get_term_mult(sys_states, y2.clone()); + // swap polarity of temp term + if temp_term.polarity { + temp_term.polarity = false; + } else { + temp_term.polarity = true; + } + temp_term.parameters.push(y[1].to_string()); + temp_term.expression = + MathExpressionTree::Cons(Divide, y.clone()).to_cmml(); + terms.push(temp_term.clone()) + } + Atom(_x2) => { + /* This is only the case of a parameter being 1/param and the top being a + negative of the state variable, since no mult */ + let temp_term = PnTerm { + dyn_state, + exp_states: [y1[0].to_string()].to_vec(), + polarity: false, + expression: ode.rhs.clone().to_cmml(), + parameters: [y[1].to_string()].to_vec(), + }; + terms.push(temp_term) + } + } + } + _ => { + println!("Error expected only Multiply or Unary subtract for numerator") + } + }, + Atom(_x1) => { + println!("Error, expected numerator terms to be a Multiplication") + } + }, // divide seem to be in front of mult always, will make that assumption. + _ => { + println!("Warning unsupported operator on expression") + } + } + } + Atom(_x) => { + println!("Warning unexpected RHS structure") + } + } + terms +} + +// this takes in the arguments of a multiply term and returns the PnTerm for it +// we do expect at most only one unary subtraction +pub fn get_term_mult(sys_states: Vec, eq: Vec) -> PnTerm { + let _terms = Vec::::new(); + let mut variables = Vec::::new(); + let mut exp_states = Vec::::new(); + let mut parameters = Vec::::new(); + let mut polarity = true; + + for obj in eq.iter() { + match obj { + Cons(x, y) => { + match &x { + Subtract => { + if y.len() == 1 { + polarity = false; + variables.push(y[0].to_string()); + } else { + for var in y.iter() { + variables.push(var.to_string().clone()); + } + } + } + Divide => { + match &y[0] { + Cons(_x1, y1) => { + // assumption only unary sub is possible + polarity = false; + variables.push(y1[0].to_string()) + } + Atom(_x) => variables.push(y[0].to_string()), + } + match &y[1] { + Cons(_x1, y1) => { + // assumption only unary sub is possible + polarity = false; + variables.push(y1[1].to_string()) + } + Atom(_x) => variables.push(y[1].to_string()), + } + } + _ => { + println!("Not expected operation inside Multiply") + } + } + } + Atom(x) => variables.push(x.to_string()), + } + } + + let mut ind = Vec::::new(); + for (i, var) in variables.iter().enumerate() { + for sys_var in sys_states.iter() { + if var == sys_var { + exp_states.push(var.clone()); + ind.push(i); + } + } + } + + for i in ind.iter().rev() { + variables.remove(*i); + } + + for var in variables.iter() { + parameters.push(var.clone()); + } + + + + PnTerm { + dyn_state: "temp".to_string(), + exp_states, + polarity, + expression: MathExpressionTree::Cons(Multiply, eq).to_cmml(), + parameters, + } +} + +pub fn flatten_mults(mut equation: MathExpressionTree) -> MathExpressionTree { + match equation { + Cons(ref x, ref mut y) => match x { + Multiply => { + match y[1].clone() { + Cons(x1, y1) => match x1 { + Multiply => { + let temp1 = flatten_mults(y1[0].clone()); + let temp2 = flatten_mults(y1[1].clone()); + y.remove(1); + y.append(&mut [temp1, temp2].to_vec()) + } + _ => { + let temp1 = y1[0].clone(); + let temp2 = y1[1].clone(); + y.remove(1); + y.append(&mut [temp1, temp2].to_vec()) + } + }, + Atom(_x1) => {} + } + match y[0].clone() { + Cons(x0, y0) => match x0 { + Multiply => { + let temp1 = flatten_mults(y0[0].clone()); + let temp2 = flatten_mults(y0[1].clone()); + y.remove(0); + y.append(&mut [temp1, temp2].to_vec()); + } + _ => { + let temp1 = y0[0].clone(); + let temp2 = y0[1].clone(); + y.remove(0); + y.append(&mut [temp1, temp2].to_vec()) + } + }, + Atom(_x0) => {} + } + } + _ => { + if y.len() > 1 { + let temp1 = flatten_mults(y[1].clone()); + let temp0 = flatten_mults(y[0].clone()); + y.remove(1); + y.remove(0); + y.append(&mut [temp0, temp1].to_vec()) + } else { + let temp0 = flatten_mults(y[0].clone()); + y.remove(0); + y.append(&mut [temp0].to_vec()) + } + } + }, + Atom(ref _x) => {} + } + equation +} + #[test] fn test_ci_univariate_func() { test_parser( diff --git a/skema/skema-rs/mathml/src/parsers/generic_mathml.rs b/skema/skema-rs/mathml/src/parsers/generic_mathml.rs index 9b7c3d605ba..e532cc9e02e 100644 --- a/skema/skema-rs/mathml/src/parsers/generic_mathml.rs +++ b/skema/skema-rs/mathml/src/parsers/generic_mathml.rs @@ -6,10 +6,11 @@ use crate::ast::{ }, Mi, Mrow, }; + use nom::{ branch::alt, bytes::complete::{tag, take_until}, - character::complete::{alphanumeric1, multispace0, not_line_ending, one_of}, + character::complete::{alphanumeric1, multispace0, not_line_ending}, combinator::{map, map_parser, opt, recognize, value}, error::Error, multi::many0, @@ -180,7 +181,10 @@ pub fn add(input: Span) -> IResult { } pub fn subtract(input: Span) -> IResult { - let (s, op) = value(Operator::Subtract, ws(one_of("-−")))(input)?; + let (s, op) = value( + Operator::Subtract, + alt((tag("-"), tag("−"), tag("−"))), + )(input)?; Ok((s, op)) } diff --git a/skema/skema-rs/skema/src/bin/morae.rs b/skema/skema-rs/skema/src/bin/morae.rs index fc3f543f9c3..178711cdc38 100644 --- a/skema/skema-rs/skema/src/bin/morae.rs +++ b/skema/skema-rs/skema/src/bin/morae.rs @@ -1,10 +1,17 @@ use clap::Parser; + use mathml::mml2pn::get_mathml_asts_from_file; pub use mathml::mml2pn::{ACSet, Term}; +use mathml::parsers::first_order_ode::{get_FirstOrderODE_vec_from_file}; + + #[cfg(test)] use std::fs; + + + // new imports use mathml::acset::{PetriNet, RegNet}; @@ -41,16 +48,22 @@ fn main() { let math_content = module_id2mathml_ast(module_id, host); + let input_src = "../../data/mml2pn_inputs/testing_eqns/mml_list4.txt"; + // This does get a panic with a message, so need to figure out how to forward it - let mathml_ast = - get_mathml_asts_from_file("../../data/mml2pn_inputs/simple_sir_v1/mml_list.txt"); + let _mathml_ast = get_mathml_asts_from_file(input_src.clone()); + + let odes = get_FirstOrderODE_vec_from_file(input_src.clone()); println!("\nmath_content: {:?}", math_content); - println!("\nmathml_ast: {:?}", mathml_ast); + println!("\nmathml_ast: {:?}", odes); println!("\nPN from code: {:?}", ACSet::from(math_content.clone())); - println!("\nPN from mathml: {:?}\n", RegNet::from(mathml_ast.clone())); + println!( + "\nAMR from mathml: {}\n", + serde_json::to_string(&PetriNet::from(odes)).unwrap() + ); println!( "\nAMR from code: {:?}", PetriNet::from(ACSet::from(math_content)) @@ -77,7 +90,7 @@ fn main() { let mathml_asts = get_mathml_asts_from_file("../../data/mml2pn_inputs/lotka_voltera/mml_list.txt"); let regnet = RegNet::from(mathml_asts); - println!("\nRegnet AMR: {:?}\n", regnet.clone()); + println!("\nRegnet AMR: {:?}\n", regnet); let regnet_serial = serde_json::to_string(®net).unwrap(); println!("For serialization test:\n\n {}", regnet_serial); diff --git a/skema/skema-rs/skema/src/database.rs b/skema/skema-rs/skema/src/database.rs index de09811f1ba..087a1f9f343 100644 --- a/skema/skema-rs/skema/src/database.rs +++ b/skema/skema-rs/skema/src/database.rs @@ -1628,7 +1628,7 @@ pub fn create_function( // now we add a check for if this is an imported function match eboxf.b.clone().unwrap()[0].function_type.clone() { - FunctionType::Import => { + FunctionType::Imported => { (nodes, edges, start, meta_nodes) = create_import( &gromet.clone(), function_net, diff --git a/skema/skema-rs/skema/src/lib.rs b/skema/skema-rs/skema/src/lib.rs index bcc9b6ba7af..c7dcdf703bc 100644 --- a/skema/skema-rs/skema/src/lib.rs +++ b/skema/skema-rs/skema/src/lib.rs @@ -32,7 +32,9 @@ pub enum FunctionType { Module, Expression, Literal, - Import, + Imported, + #[serde(rename = "IMPORTED_METHOD")] + ImportedMethod, } #[derive(Deserialize, Serialize, Clone, Debug, ToSchema)] diff --git a/skema/skema-rs/skema/src/model_extraction.rs b/skema/skema-rs/skema/src/model_extraction.rs index 040d5166737..3a7f8be3fac 100644 --- a/skema/skema-rs/skema/src/model_extraction.rs +++ b/skema/skema-rs/skema/src/model_extraction.rs @@ -187,6 +187,10 @@ pub fn subgraph2_core_dyn_ast( let mut expressions = Vec::>::new(); for i in 0..expression_nodes.len() { // grab the subgraph of the given expression + /*println!( + "These are the nodes for expressions: {:?}", + graph[expression_nodes[i]].id.clone() + );*/ expressions.push(subgraph2petgraph(graph[expression_nodes[i]].id, host)); } @@ -204,6 +208,8 @@ pub fn subgraph2_core_dyn_ast( for i in 0..expressions_wiring.clone().len() { let (nodes1, _edges1) = expressions_wiring[i].clone().into_nodes_edges(); if nodes1.len() > 3 { + //println!("\n{:?}\n", nodes1.clone()); + // SINCE THE POF'S ARE THE SOURCE OF THE STATE VARIABLES, NOT THE OPI'S. THEY'RE NOT BEING WIRED IN PROPERLY trimmed_expressions_wiring.push(trim_un_named(expressions_wiring[i].clone())); } } diff --git a/skema/skema-rs/skema/src/services/mathml.rs b/skema/skema-rs/skema/src/services/mathml.rs index bb82192b1f6..43dd4e8e274 100644 --- a/skema/skema-rs/skema/src/services/mathml.rs +++ b/skema/skema-rs/skema/src/services/mathml.rs @@ -1,6 +1,7 @@ use actix_web::{put, web, HttpResponse}; +use mathml::parsers::first_order_ode::flatten_mults; use mathml::{ - acset::{ACSet, AMRmathml, PetriNet, RegNet}, + acset::{AMRmathml, PetriNet, RegNet}, ast::Math, expression::{preprocess_content, wrap_math}, parsers::first_order_ode::FirstOrderODE, @@ -80,8 +81,16 @@ pub async fn get_content_mathml(payload: String) -> String { )] #[put("/mathml/petrinet")] pub async fn get_acset(payload: web::Json>) -> HttpResponse { - let asts: Vec = payload.iter().map(|x| x.parse::().unwrap()).collect(); - HttpResponse::Ok().json(web::Json(PetriNet::from(ACSet::from(asts)))) + let asts: Vec = payload + .iter() + .map(|x| x.parse::().unwrap()) + .collect(); + let mut flattened_asts = Vec::::new(); + for mut eq in asts { + eq.rhs = flatten_mults(eq.rhs.clone()); + flattened_asts.push(eq.clone()); + } + HttpResponse::Ok().json(web::Json(PetriNet::from(flattened_asts))) } /// Return a JSON representation of a RegNet ModelRep constructed from an array of MathML strings. @@ -113,8 +122,20 @@ pub async fn get_regnet(payload: web::Json>) -> HttpResponse { )] #[put("/mathml/amr")] pub async fn get_amr(payload: web::Json) -> HttpResponse { + let mt_asts: Vec = payload + .clone() + .mathml + .iter() + .map(|x| x.parse::().unwrap()) + .collect(); + let mut flattened_asts = Vec::::new(); + for mut eq in mt_asts { + eq.rhs = flatten_mults(eq.rhs.clone()); + flattened_asts.push(eq.clone()); + } let asts: Vec = payload .mathml + .clone() .iter() .map(|x| x.parse::().unwrap()) .collect(); @@ -122,7 +143,7 @@ pub async fn get_amr(payload: web::Json) -> HttpResponse { if model_type == *"regnet" { HttpResponse::Ok().json(web::Json(RegNet::from(asts))) } else if model_type == *"petrinet" { - HttpResponse::Ok().json(PetriNet::from(ACSet::from(asts))) + HttpResponse::Ok().json(web::Json(PetriNet::from(flattened_asts))) } else { HttpResponse::BadRequest().into() } From abef48f5e8ca90b2336bbe84477a0c0fa031479a Mon Sep 17 00:00:00 2001 From: ualiangzhang <68933075+ualiangzhang@users.noreply.github.com> Date: Fri, 14 Jul 2023 10:52:54 -0700 Subject: [PATCH 4/4] Fix a bug in retrieve model (#331) If the model path is None or doesn't exist when calling the retrieve_model function, download the default model from the server. --- skema/img2mml/api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/skema/img2mml/api.py b/skema/img2mml/api.py index 07b74ede5a6..501fe1fabe6 100644 --- a/skema/img2mml/api.py +++ b/skema/img2mml/api.py @@ -25,8 +25,8 @@ def retrieve_model(model_path=None) -> str: cwd = Path(__file__).parents[0] MODEL_BASE_ADDRESS = "https://artifacts.askem.lum.ai/skema/img2mml/models" MODEL_NAME = "cnn_xfmer_arxiv_im2mml_with_fonts_boldface_best.pt" - - if model_path is None: + # If the model path is none or doesn't exist, the default model will be downloaded from server. + if model_path is None or not os.path.exists(model_path): model_path = cwd / "trained_models" / MODEL_NAME # Check if the model file already exists