<commit_before>---
swagger: "2.0"
info:
  description: The Phenoscape Knowledgebase web API is an HTTP interface for searching ontology terms, retrieving term info, and querying data from the KB. Most of the services return data in JSON format. Other formats you may encounter inlcude plain text (usually tab-delimited), and NeXML. The available formats for a given service are listed in the Response section of the service detail. As multiple formats may be available for one service, be sure to scroll through to see all supported formats. When plain-text is available, it is usually the default response, to provide a simple format for service results being directly reviewed. Set the appropriate media type value in your request's Accept header to ensure you receive the desired response format.
  version: 1.0.0
  title: Phenoscape Knowledgebase web API
  contact:
    email: <EMAIL>
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
host: kb.phenoscape.org
basePath: /api
tags:
- name: Knowledgebase status
- name: Terms
- name: OntoTrace
- name: Semantic similarity
- name: Anatomical entities
- name: Taxa
- name: Genes
- name: Studies
schemes:
- https
paths:
  /kb/annotation_summary:
    get:
      tags:
      - Knowledgebase status
      summary: KB annotation summary
      description: Return summary counts of annotated data matrices, taxa, characters, and states
      produces:
      - application/json
      parameters: []
      responses:
        200:
          description: KB summary counts
          schema:
            type: object
            properties:
              annotated_matrices:
                type: integer
                example: 154
              annotated_taxa:
                type: integer
                example: 5071
              annotated_characters:
                type: integer
                example: 9602
              annotated_states:
                type: integer
                example: 21182
  /kb/annotation_report:
    get:
      tags:
      - Knowledgebase status
      summary: KB annotation report
      description: Return table of character state EQ annotations for curator review
      produces:
      - text/tab-separated-values
      parameters: []
      responses:
        200:
          description: EQ annotation report
          schema:
            type: string
            example: |
              ?matrix_file  ?character_number ?character_text ?state_symbol ?state_text ?entity_id  ?entity_name  ?quality_id ?quality_name ?related_entity_id  ?related_entity_name  ?attributes
              "<NAME>. (1994)"  "7"  "Interorbital commissure"  "1"  "medially opening pore"  "http://data.bioontology.org/provisional_classes/3a694e40-e12b-0132-ac85-005056010074"  ""  "http://purl.obolibrary.org/obo/PATO_0000025"  "composition"  "http://purl.obolibrary.org/obo/UBERON_0008915"  "pore"  "composition, structure"
              "<NAME>., & <NAME>. (2001)"  "12"  "Interorbital commisure"  "1"  "medially opening pore"  "http://data.bioontology.org/provisional_classes/3a694e40-e12b-0132-ac85-005056010074"  ""  "http://purl.obolibrary.org/obo/PATO_0000025"  "composition"  "http://purl.obolibrary.org/obo/UBERON_0008915"  "pore"  "composition, structure"
  /term:
    get:
      tags:
      - Terms
      summary: Term detail
      description: Return detail info for a given term. Currently this is the label and an optional definition.
      produces:
      - application/json
      parameters:
      - name: iri
        in: query
        description: the term IRI, e.g. `http://purl.obolibrary.org/obo/UBERON_0011618`
        required: true
        type: string
        format: IRI
      responses:
        200:
          description: term detail
  /term/search:
    get:
      tags:
      - Terms
      summary: Term search
      description: Search for terms in the KB by text match on a property value.
      produces:
      - application/json
      parameters:
      - name: text
        in: query
        description: the input text to search
        required: true
        type: string
      - name: type
        in: query
        description: the type of term to search for, e.g. `http://www.w3.org/2002/07/owl#Class`
        required: false
        type: string
        format: IRI
      - name: property
        in: query
        description: relation between term and text
        required: false
        type: string
        default: http://www.w3.org/2000/01/rdf-schema#label
        format: IRI
      responses:
        200:
          description: Term search results; values returned for `matchType` may be `exact`, `partial`, or `broad`.
          schema:
            type: object
            properties:
              results:
                type: array
                items:
                  $ref: '#/definitions/inline_response_200_1_results'
  /term/search_classes:
    get:
      tags:
      - Terms
      summary: Ontology class search
      description: Search for classes from a particular ontology.
      produces:
      - application/json
      parameters:
      - name: text
        in: query
        description: the input text to search
        required: true
        type: string<commit_msg>Generated code by SwaggerHub<commit_after>---
swagger: "2.0"
info:
  description: The Phenoscape Knowledgebase web API is an HTTP interface for searching ontology terms, retrieving term info, and querying data from the KB. Most of the services return data in JSON format. Other formats you may encounter inlcude plain text (usually tab-delimited), and NeXML. The available formats for a given service are listed in the Response section of the service detail. As multiple formats may be available for one service, be sure to scroll through to see all supported formats. When plain-text is available, it is usually the default response, to provide a simple format for service results being directly reviewed. Set the appropriate media type value in your request's Accept header to ensure you receive the desired response format.
  version: 1.0.0
  title: Phenoscape Knowledgebase web API
  contact:
    email: <EMAIL>
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
host: kb.phenoscape.org
basePath: /api
tags:
- name: Knowledgebase status
- name: Terms
- name: OntoTrace
- name: Semantic similarity
- name: Anatomical entities
- name: Taxa
- name: Genes
- name: Studies
schemes:
- https
paths:
  /kb/annotation_summary:
    get:
      tags:
      - Knowledgebase status
      summary: KB annotation summary
      description: Return summary counts of annotated data matrices, taxa, characters, and states
      produces:
      - application/json
      parameters: []
      responses:
        200:
          description: KB summary counts
          schema:
            type: object
            properties:
              annotated_matrices:
                type: integer
                example: 154
              annotated_taxa:
                type: integer
                example: 5071
              annotated_characters:
                type: integer
                example: 9602
              annotated_states:
                type: integer
                example: 21182
  /kb/annotation_report:
    get:
      tags:
      - Knowledgebase status
      summary: KB annotation report
      description: Return table of character state EQ annotations for curator review
      produces:
      - text/tab-separated-values
      parameters: []
      responses:
        200:
          description: EQ annotation report
          schema:
            type: string
            example: |
              ?matrix_file  ?character_number ?character_text ?state_symbol ?state_text ?entity_id  ?entity_name  ?quality_id ?quality_name ?related_entity_id  ?related_entity_name  ?attributes
              "<NAME>. (1994)"  "7"  "Interorbital commissure"  "1"  "medially opening pore"  "http://data.bioontology.org/provisional_classes/3a694e40-e12b-0132-ac85-005056010074"  ""  "http://purl.obolibrary.org/obo/PATO_0000025"  "composition"  "http://purl.obolibrary.org/obo/UBERON_0008915"  "pore"  "composition, structure"
              "<NAME>., & <NAME>. (2001)"  "12"  "Interorbital commisure"  "1"  "medially opening pore"  "http://data.bioontology.org/provisional_classes/3a694e40-e12b-0132-ac85-005056010074"  ""  "http://purl.obolibrary.org/obo/PATO_0000025"  "composition"  "http://purl.obolibrary.org/obo/UBERON_0008915"  "pore"  "composition, structure"
  /term:
    get:
      tags:
      - Terms
      summary: Term detail
      description: Return detail info for a given term. Currently this is the label and an optional definition.
      produces:
      - application/json
      parameters:
      - name: iri
        in: query
        description: the term IRI, e.g. `http://purl.obolibrary.org/obo/UBERON_0011618`
        required: true
        type: string
        format: IRI
      responses:
        200:
          description: term detail
  /term/search:
    get:
      tags:
      - Terms
      summary: Term search
      description: Search for terms in the KB by text match on a property value.
      produces:
      - application/json
      parameters:
      - name: text
        in: query
        description: the input text to search
        required: true
        type: string
      - name: type
        in: query
        description: the type of term to search for, e.g. `http://www.w3.org/2002/07/owl#Class`
        required: false
        type: string
        default: http://www.w3.org/2002/07/owl#Class
        format: IRI
      - name: properties
        in: query
        description: relation between term and text; JSON array of IRI strings
        required: false
        type: string
        default: '["http://www.w3.org/2000/01/rdf-schema#label", "http://www.geneontology.org/formats/oboInOwl#hasExactSynonym", "http://www.geneontology.org/formats/oboInOwl#NarrowSynonym", "http://www.geneontology.org/formats/oboInOwl#hasBroadSynonym"]'
        format: JSON
      - name: definedBy
        in: query
        description: the ontology identifier IRI in which the search terms are defined, e.g. `http://purl.obolibrary.org/obo/uberon.owl`
        required: false
        type: string
        format: IRI
      - name: includeDeprecated
        in: query
        description: include deprecated (obsolete) terms in results
        required: false
        type: boolean
        default: false
      - name: limit
        in: query
        description: maximum terms to return
        required: false
        type: integer
        default: 100
      responses:
        200:
          description: Term search results; values returned for `matchType` may be `exact`, `partial`, or `broad`.
          schema:
            type: object
            properties:
              results:
                type: array
                items:
                  $ref: '#/definitions/inline_response_200_1_results'
  /term/search_classes:
    get:
      tags:
      - Terms
      summary: Ontology class search [DEPRECATED]
      description: Search for classes from a particular ontology.
      produces:
      - application/json
      parameters:
      - name: text
        in: query
        description: the input text to search
        required: true
        type: string
{'fraction_non_alphanumeric': 0.07794273594909862, 'fraction_numerical': 0.027571580063626724, 'mean_word_length': 2.179825793762293, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 2, 'lorem ipsum': 0, 'www.': 8, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '471735', 'n_tokens_mistral': 3379, 'n_tokens_neox': 3070, 'n_words': 1031}