id: http://w3id.org/ontogpt/wetRest
name: wetland-template
title: Wetland Restoration Template
description: >-
  A template for data extraction wetland Restoration Research papers to be used on OntoGPT. 
  Product was made towards the completion of BIOL 5512 - Advances in Applied Ecology at 
  Carleton University. 
license: https://creativecommons.org/publicdomain/zero/1.0/
prefixes:
  linkml: https://w3id.org/linkml/
  schema: http://schema.org/
  ENVO: http://purl.obolibrary.org/obo/ENVO_                                                                                            # Repoository for Enviornmental Ontology
  SWEET: http://sweetontology.net/                                                                                                      # Repository for Semantic Web for Earth and Environmental Terminology Ontologies
  # NCBITaxon: http://purl.obolibrary.org/obo/NCBITAXON_
  # OBI: http://purl.obolibrary.org/obo/OBI_
  # STATO: http://purl.obolibrary.org/obo/STATO_

default_range: string                                                                                                                   # Default data type 

imports:                                                                                                                                # List of other schemas to import types from
  - linkml:types
  - core

keywords:
  - Coastal Wetland
  - Restoration Methods
  - Monitoring Methods

# ============================================================== 
# Note: 
# - To Run this Code You need Bioportal API Key, and OpenAI API Key
# Template for API Keys:
#   runoak set-apikey -e openai <openai api key>
#   runoak set-apikey -e bioportal <your bioportal api key>
#   runoak set-apikey -e ncbi-email <your email address>
#   runoak set-apikey -e ncbi-key <your NCBI api key>
# ============================================================== 

# ============================================================== 
# Template to extract Data: replace <____> with your file paths
# ontogpt extract -t <YAML Path> --use-pdf --output-format csv -i <pdf Path> -o <Output path including file name>
# 
# Example: 
# ontogpt extract -t C:\Users\ArcGis\Documents\FelixWorkingFiles\BIOL5512\wetRestReWrite2.yaml --use-pdf --output-format csv  -i C:\Users\ArcGis\Documents\FelixWorkingFiles\BIOL5512_Papers\fevo-11-994533.pdf -o C:\Users\ArcGis\Documents\FelixWorkingFiles\BIOL5512_output\wetRestTest2.csv
# 
# ============================================================== 

classes:
  WetlandAnn:
    tree_root: true
    is_a: NamedEntity
    description: >-                                                                                                                     # To ensure extracted objects of this class have both Unique ID and human readable labels.
      A semicolon-delimited list of statements, from Coastal Wetland Restoration articles.
      This includes the restoration actions and monitoring methods (including their start 
      and end dates), focal species, study site(s), ecosystem type, and response variables 
      (including response measure). 
    attributes:                                                                                                                         # Defining all class attributes. Each will be included in a prompt for the LLM.
      dois:                                                                                                                             # 
        description: permanent identifier for the article.                                                                              # Used to pass as part of the prompt. Describes the attribute and how it is formated.
        range: DOI                                                                                                                      # restricting the class to the DOI object
        annotations: 
          prompt: extract the DOI related to the article.
      
      # About Study Site
      study_sites_names: 
        description: >-
          A semicolon-separated list of the names of sites that were monitored or sampled as part of the study.
          Include the precise location name of the municipality, city or town where the project is located.
          Include Region, Province and Country, space separated, when possible.
        range: Site
        multivalued: true
        annotations:
          prompt: >-
            A semicolon-separated list of the names of sites that were monitored or sampled as part of the study.
            Include the precise location name of the municipality, city or town where the project is located.
            Include Region, Province and Country, space separated, when possible.
          prompt.examples: >-
            Saint John New Brunswick Canada; Toronto Ontario Canada; Holland Marsh; Bois des Bel Peatlands
      
      study_sites_coords:
        description: >-
          A list of the coordinate locations of the sites that were monitored or sampled as part of the study.
          Include longitude and latitude in decimal degrees or hours, minutes seconds, or some other valid geospatial format.
        range: string
        multivalued: true
        annotations:
          prompt: >-
            A list of the coordinate locations of the sites that were monitored or sampled as part of the study.
            Include longitude and latitude in decimal degrees or hours, minutes seconds, or some other valid geospatial format.
          prompt.examples: >-
            43.447656078247455, -80.5214024386262; 53.74673979119229, -113.07405047872547;
            40° 26′ 46″ N 79° 58′ 56″ W 
            
      ecosystem_types: 
        description: >- 
          A semicolon-separated list of the types of ecosystem the restoration is taking place in. Please include the specific
          ecozone, bioregion or biome label that best describes the ecosystem where the restoration is taking place. 
        range: Ecosystem
        multivalued: true
        annotations:
          prompt: >- 
            A semicolon-separated list of the types of ecosystem the restoration is taking place in. Please include the specific
            ecozone, bioregion or biome label that best describes the ecosystem where the restoration is taking place. 
          prompt.examples: >- 
            mangrove forest; salt marshes; estuaries; wetland; coastal wetland

      # Restoration Data Parameters
      restoration_actions:      
        description: >-                                                                                                                 # Used to pass as part of the prompt. Describes the attribute and how it is formatted.
          A semicolon-separated list of ecosystem restoration actions, methods or type done 
          at the study site. Please include both the nature of the action (e.g. planting) and the target of 
          the action (e.g. grasses) as a single term. Do not split up compound terms like "planting grasses" or "dam removal."                    
        range: RestorationAction                                                                                                        # Restricting this object to a class (Data type or custom class -> ex. RestorationAction)
        multivalued: true                                                                                                               # Allows for multiple values to be extracted as a list separated by ";" (mentioned in description and prompt)
        annotations:                                                                                                                    # Header for specific instructions for OntoGPT 
          prompt: >-                                                                                                                    # What OntoGPT uses as a prompt for data Extraction within texts.
            A semicolon-separated list of ecosystem restoration actions, methods or type done 
            at the study site. Please include both the nature of the action (e.g. planting) and the target of 
            the action (e.g. grasses) as a single term. Do not split up compound terms like "planting grasses" or "dam removal."                    
          prompt.examples: >-                                                                                                           # Examples for OntoGPT to build off of. Basically what to look for and what "might" be in the text.
            removing invasive species; removing dams; planting; species introduction; 
            excavation; policy interventions; land rezoning

      restoration_start_date: 
        description: >-
          A semicolon-separated list of dates, formatted to "mm-dd-yyyy", of when restoration started 
          at the study site. Please use the first date when restoration actions were implemented. Where day of the month is not available, list month and year.
        range: string
        multivalued: true
        annotations:
          prompt: >-
            A semicolon-separated list of dates, formatted to "mm-dd-yyyy", of when restoration started 
            at the study site. Please use the first date when restoration actions were implemented. Where day of the month is not available, list month and year.
      
      restoration_end_date: 
        description: >-
          A semicolon-separated list of dates, formatted to "mm-dd-yyyy", of when restoration ended 
          at the study site. Please use the last date when restoration actions were implemented. Where day of the month is not available, list month and year.
        range: string
        multivalued: true
        annotations:
          prompt: >-
            A semicolon-separated list of dates, formatted to "mm-dd-yyyy", of when restoration 
            ended at the study site. Please use the last date when restoration actions were implemented. Where day of the month is not available, list month and year.

      # Monitoring Data Parameters
      monitoring_methods: 
        description: >-
          A semicolon-separated list of monitoring and sampling method types done at the study site. Please include any
          method used for field sampling of vegetation, wildlife or other biotic and abiotic factors. Include the name
          of the monitoring method as reported in the study. Do not split up terms that should remain together. For instance, "vegetation monitoring" should
          be reported as a single term.
        range: MonitoringMethod
        multivalued: true
        annotations:
          prompt: >-
            A semicolon-separated list of monitoring and sampling method types done at the study site. Please include any
            method used for field sampling of vegetation, wildlife or other biotic and abiotic factors. Include the name
            of the monitoring method as reported in the study. Do not split up compound terms.
          prompt.examples: >-
            remote sensing; specimen collection; field surveys; focus groups; statistical indices; 
            invertebrate sampling; soil sampling
      
      statistical_methods:
        description: >-
          A semicolon-separated list of statistical analysis methods conducted with the data collected during 
          monitoring at the study site. Please include any methods used to analyze quantitative or qualitative 
          data in the study. Do not split up compound terms.
        range: StatisticalMethods
        multivalued: true
        annotations:
          prompt: >- 
            A semicolon-separated list of statistical analysis methods conducted with the data collected during 
            monitoring at the study site. Please include any methods used to analyze quantitative or qualitative 
            data in the study. Do not split up compound terms.
          prompt.examples: >-
            Analysis of Variance; ANOVA; Non-Metric Multidimensional Scaling; NMDS; Simper analysis; t-test;
            PERMANOVA; Permutational multivariate analysis of variance; multivariate ANOVA; MANOVA; 
            Shannon-Wiener index; Simpson index
      
      monitoring_start_date:
        description: >-
          A semicolon-separated list of dates, formatted to "mm-dd-yyyy", of when monitoring started 
          at the study site. Please report the date when the first monitoring was conducted. Where day of the month is not available, list month and year.
        range: string
        multivalued: true
        annotations: 
          prompt: >-
            A semicolon-separated list of dates, formatted to "mm-dd-yyyy", of when monitoring started 
            at the study site. Please report the date when the first monitoring was conducted. Where day of the month is not available, list month and year.
      monitoring_end_date:
        description: >-
          A semicolon-separated list of dates, formatted to "mm-dd-yyyy", of when monitoring ended at 
          the study site. Please report the date of the last monitoring activity. Where day of the month is not available, list month and year.
        range: string
        multivalued: true
        annotations: 
          prompt: >-
            A semicolon-separated list of dates, formatted to "mm-dd-yyyy", of when monitoring ended 
            at the study site. Please report the date of the last monitoring activity. Where day of the month is not available, list month and year.
      
      # Data from Monitoring and Analysis
      focal_species:
        description: >-
            semicolon-separated list of the scientific name of species that are the focus of the 
            restoration project. Please include both the genus and species in the scientific name. 
            Do not split up the genus and species, or simply report the genus if the full scientific name is available.
            Where scientific names are not reported, use common names and where no 
            species names are reported, output "None Reported." Provide species names at the species level.
        multivalued: true
        range: FocalSpecies
        annotations:
          prompt: >- 
            semicolon-separated list of the scientific name of species that are the focus of the 
            restoration project. Please include both the genus and species in the scientific name. 
            Do not split up the genus and species. Do not simply report the genus if the full scientific name is available.
            Where scientific names are not reported, use common names and where no 
            species names are reported, output "None Reported." Provide species names at the species level.
          prompt.examples: >-
            Spartina densiflora; Ucides cordatus; Rattus rattus; Benthic Invertebrates; Mangroves;
            Tall Grass; None Reported
      response_variables:
        description: >- 
          A semicolon-separated list of ecosystem response indicators observed during the monitoring 
          period.
        range: ResponseVariables
        multivalued: true
        annotations: 
          prompt: >- 
             A semicolon-separated list of the types of response variables that were monitored during the monitoring period. 
             Please include any variables that were the subject of statistical analysis. Please include any variables
             that were monitored by the researcher. Please include any variables that the study suggests may be affected by
             the restoration.
          prompt.examples: >-
            vegetation cover; biodiversity; chemical concentration; species richness; species diversity; 
            pore water salinity
  
  DOI:
    is_a: NamedEntity
  Site: 
    is_a: NamedEntity
    description: The geographical location of where restoration and the study took place. 
    id_prefixes: 
      - GAZ
      - ENVTHES
    annotations: 
      annotators: >-
        sqlite:obo:envo, bioportal:gaz, bioportal:envthes
  
  Ecosystem:
    is_a: NamedEntity
    description: >- 
      The Ecosystem type the restoration and monitoring or sampling was done in the study. 
    id_prefixes:
      - ENVO
      - SWEET
      - ENVTHES
    annotations:
      annotators: >-
        sqlite:obo:envo, bioportal:envthes

  RestorationAction:
    is_a: NamedEntity
    description: ecosystem restoration actions being taken as part of the study.                                                        # Used to pass as part of the prompt. Describes the attribute and how it is formatted.
    id_prefixes:                                                                                                                        # List of identifiers to ground values of this class to. 
      - ENVO                                                                                                                                # Environmental Ontology
      - ENVTHES                                                                                                                             # Environmental Thesaurs 
    annotations:                                                                                                                        # Header for specific instructions for OntoGPT 
      annotators: sqlite:obo:envo, bioportal:envthes                                                                                        # Used to make raw text(extracted data) and unique identifiers(value ID) more legible.
  
  MonitoringMethod:
    is_a: NamedEntity
    description: monitoring methods implemented to monitor restoration as part of the study.
    id_prefixes: 
      - ENVO
      - ENVTHES
      - SWEET
    annotations:
      annotators: sqlite:obo:envo, bioportal:envthes

  StatisticalMethods: 
    is_a: NamedEntity
    description: >- 
      A Statistical Analysis or method used on the collected data to output response variables. 
    id_prefixes: 
      - ENVO 
      - ENVTHES
      - SWEET
      - STATO
      - OBI
    annotations:
      annotators: >- 
        sqlite:obo:envo, bioportal:envthes, sqlite:obo:stato, sqlite:obo:obi


  FocalSpecies:
    is_a: NamedEntity
    description: >-
      A semicolon-separated list of species documented in the study.
    id_prefixes:
      - NCBITaxon
      - VTO
      - PDO_CAS
    annotations:
      annotators: >- 
        sqlite:obo:envo, bioportal:envthes, bioportal:ncbitaxon, bioportal:vto, bioportal:pdo_cas

  ResponseVariables:
    is_a: NamedEntity
    description: >- 
      A list of ecosystem response indicators observed during monitoring.
    id_prefixes:
      - ENVO
      - SWEET
      - ENVTHES
    annotations: 
      annotators: >-
        sqlite:obo:envo, bioportal:envthes