---
# MIF Ontology: psycholinguistics
#
# A research ontology for psycholinguistics and computational stylometry:
# psychological and linguistic constructs, stylometric features, psychometric
# indices, elicitation protocols, research instruments, linguistic frameworks,
# and existing framework references. Supports voice-elicitation, personality-
# language mapping, and authorship/readability research.
#
# Compatible with: engineering-base v0.1.0 + mif-generic v1.0.0
# Version: 0.1.0
# Last Updated: 2026-06-26
#
# Sources:
# - Big Five / OCEAN (Costa & McCrae, 1992)       https://doi.org/10.1002/per.2410060304
# - LIWC (Pennebaker et al., 2015)                https://www.liwc.app/
# - Flesch Readability (Flesch, 1948)             https://doi.org/10.1086/386080
# - MATTR / MTLD (McCarthy & Jarvis, 2010)        https://doi.org/10.3758/BRB.42.2.381
# - Stylo / Burrows's Delta (Burrows, 2002)       https://doi.org/10.1093/llc/17.3.267
# - Cognitive Interview (Fisher & Geiselman, 1992) https://doi.org/10.1007/978-1-4612-4736-2

ontology:
  id: psycholinguistics
  version: "0.2.0"
  description: >-
    Psycholinguistics and computational stylometry ontology — constructs,
    features, indices, protocols, instruments, frameworks, and references for
    personality-language mapping, voice elicitation, and authorship research.
  schema_url: >-
    https://mif-spec.dev/schema/ontology/ontology.schema.json
  extends:
    - engineering-base
    - mif-generic

# Namespace Hierarchy
namespaces:
  semantic:
    children:
      constructs:
        description: "Psycholinguistic and psychological constructs"
        type_hint: semantic
      features:
        description: "Stylometric and linguistic features extracted from text"
        type_hint: semantic
      indices:
        description: "Psychometric indices and derived scores"
        type_hint: semantic
      instruments:
        description: "Research instruments, tools, and platforms"
        type_hint: semantic
      frameworks:
        description: "Linguistic and psycholinguistic frameworks"
        type_hint: semantic
      protocols:
        description: "Elicitation and interview protocols"
        type_hint: semantic

# Entity Types
entity_types:
  - name: psycholinguistic-construct
    description: "An abstract psycholinguistic or psychological construct measurable via language (e.g. Big Five trait, attachment style)"
    aliases:
      - "psycholinguistic trait"
      - "personality construct"
      - "cognitive-linguistic construct"
      - "psychological writing construct"
    exemplars:
      - "Style features fall on a spectrum from fully self-reportable, like punctuation preferences, to largely unconscious, like sentence complexity"
      - "A personality trait correlates with pronoun and emotion-word usage frequency across a large body of analyzed text"
      - "First-person singular pronoun usage is elevated in self-focused, lower-status, or genuinely emotional writing"
    base: semantic
    subtype_of:
      - concept
    traits:
      - cited
    schema:
      required:
        - name
        - construct_family
      properties:
        name:
          type: string
          description: "Construct name (e.g. Openness to Experience)"
        construct_family:
          type: string
          description: "Parent family (e.g. Big Five, HEXACO, attachment, need-for-cognition)"
        measurement_instrument:
          type: string
          description: "Primary instrument used to measure this construct (e.g. NEO-PI-R, BFI)"
        dimension_count:
          type: string
          description: "Number of facets or sub-dimensions"
        corpus_application:
          type: string
          description: "How this construct is operationalized in a text corpus"

  - name: stylometric-feature
    description: "A quantifiable textual feature used in authorship analysis or style profiling (e.g. type-token ratio, function-word frequency)"
    aliases:
      - "stylometric marker"
      - "authorship feature"
      - "writing-style feature"
      - "style fingerprint"
      - "linguistic style marker"
    exemplars:
      - "Function word frequency remains a robust, largely unconscious marker of authorship that stays stable across topics"
      - "The ratio of words used only once in a text indicates a writer's willingness to deploy unique vocabulary"
      - "Deep-learning models outperform traditional n-gram methods at identifying an author's fingerprint in short text samples"
    base: semantic
    subtype_of:
      - concept
    traits:
      - cited
    schema:
      required:
        - name
        - feature_class
      properties:
        name:
          type: string
          description: "Feature name (e.g. MATTR, mean sentence length, POS trigram)"
        feature_class:
          type: string
          description: "Class of feature (lexical, syntactic, character, semantic)"
        extraction_method:
          type: string
          description: "How the feature is computed (tool, algorithm, window size)"
        discriminating_power:
          type: string
          description: "Reported effectiveness for authorship discrimination"
        prior_art:
          type: string
          description: "Key studies or tools establishing this feature"

  - name: psychometric-index
    description: "A derived psychometric index or score computed over text or survey responses (e.g. Flesch Reading Ease, LIWC Analytic)"
    aliases:
      - "psychometric measure"
      - "style metric"
      - "readability index"
      - "lexical diversity metric"
    exemplars:
      - "Tree-based models using measurable stylistic features achieve high accuracy distinguishing human from AI-generated text"
      - "Two lexical-diversity metrics are considered psychometrically superior to a traditional type-token ratio for measuring vocabulary range"
      - "A set of syntactic-complexity indices measures sentence length, subordination, and coordination across four structural dimensions"
    base: semantic
    subtype_of:
      - delivery-metric
    traits:
      - cited
    schema:
      required:
        - metric_name
      properties:
        metric_name:
          type: string
          description: "Index name (e.g. Flesch-Kincaid Grade Level, LIWC Analytic)"
        index_type:
          type: string
          description: "Index category (readability, personality, affect, complexity)"
        formula:
          type: string
          description: "Computational formula or algorithm"
        normative_range:
          type: string
          description: "Expected range or population norms"
        tool:
          type: string
          description: "Software or platform that computes this index"

  - name: elicitation-protocol
    description: "A structured protocol for eliciting language samples or self-report responses for psycholinguistic analysis"
    aliases:
      - "interview elicitation protocol"
      - "survey elicitation method"
      - "questioning protocol"
      - "data-elicitation procedure"
      - "probing protocol"
    exemplars:
      - "An AI-conducted adaptive interview produces response data comparable in quality to a human-led interview, with longer average responses"
      - "A four-stage cognitive model of comprehension, retrieval, judgment, and response mapping explains how respondents process survey questions"
      - "Long survey instruments risk significant respondent dropout past a certain length, motivating modular section design and pacing strategies"
    base: semantic
    subtype_of:
      - design-pattern
    traits:
      - cited
    schema:
      required:
        - pattern_name
        - context
        - solution
      properties:
        pattern_name:
          type: string
          description: "Protocol name (e.g. Cognitive Interview, Think-Aloud, Voice Elicitation)"
        context:
          type: string
          description: "Research context and target constructs"
        solution:
          type: string
          description: "How the protocol structures the elicitation"
        elicitation_type:
          type: string
          description: "Modality (written, spoken, structured, semi-structured)"
        question_sequencing:
          type: string
          description: "Order and branching logic of prompts"
        respondent_burden:
          type: string
          description: "Estimated time and cognitive load for respondent"
        validity_notes:
          type: string
          description: "Known validity or reliability constraints"

  - name: research-instrument
    description: "A software tool, survey platform, or analysis package used in psycholinguistic research"
    aliases:
      - "research toolkit"
      - "analysis instrument"
      - "measurement tool"
      - "academic software tool"
    exemplars:
      - "An open-source academic package remains the dominant toolkit for computational stylistic analysis, supporting word and character n-gram extraction"
      - "A hybrid model combines a psycholinguistic category dictionary with transformer embeddings for interpretable style profiling"
      - "A latent-space interpolation approach conditions text generation on an arbitrary writing style from only a few samples"
    base: semantic
    subtype_of:
      - technology
    traits:
      - cited
    schema:
      required:
        - name
      properties:
        name:
          type: string
          description: "Instrument name (e.g. LIWC-22, stylo R package, APA PsycINFO)"
        instrument_type:
          type: string
          description: "Type (text-analysis-software, survey-platform, corpus-tool, statistical-package)"
        vendor_or_author:
          type: string
          description: "Developer, author, or institution"
        version:
          type: string
          description: "Version or edition"
        primary_use:
          type: string
          description: "Main analytical use case"
        licensing:
          type: string
          description: "License or access model (open-source, commercial, academic)"

  - name: linguistic-framework
    description: "A theoretical or computational framework grounding psycholinguistic research (e.g. LIWC dictionary, Universal Dependencies)"
    aliases:
      - "linguistic analysis framework"
      - "register analysis framework"
      - "stylistic framework"
      - "text-analysis framework"
    exemplars:
      - "A multidimensional register-analysis framework identifies functional dimensions of text variation through factor analysis of many linguistic features"
      - "A literature review of a forensic analysis method identifies persistent unresolved methodological gaps in evidence-strength standards"
      - "A survey of personality-detection methods finds transformer-based models now dominate over earlier bag-of-words approaches"
    base: semantic
    subtype_of:
      - concept
    traits:
      - cited
    schema:
      required:
        - name
      properties:
        name:
          type: string
          description: "Framework name (e.g. LIWC, Universal Dependencies, Systemic Functional Linguistics)"
        framework_type:
          type: string
          description: "Type (dictionary-based, dependency-grammar, discourse, register)"
        primary_author:
          type: string
          description: "Lead author(s) or originating institution"
        publication:
          type: string
          description: "Canonical publication or specification"
        harness_application:
          type: string
          description: "How this framework is applied in the research harness"

  - name: existing-framework-reference
    description: "A reference to an existing psycholinguistic or stylometric framework for comparative or reuse analysis"
    aliases:
      - "reference framework"
      - "prior-art reference"
      - "existing tool reference"
      - "comparable-system reference"
      - "benchmark framework reference"
    exemplars:
      - "A commercial creative-writing tool calibrates its voice model to only a couple of author writing samples"
      - "An enterprise brand-voice platform enforces granular style-guide rules for a large customer base learning brand voice at scale"
      - "An AI-text detection tool expanded from binary detection into word- and sentence-level authorship attribution"
    base: semantic
    subtype_of:
      - concept
    traits:
      - cited
    schema:
      required:
        - name
      properties:
        name:
          type: string
          description: "Referenced framework or tool name"
        framework_origin:
          type: string
          description: "Originating research group or project"
        capability:
          type: string
          description: "What the framework offers"
        limitation:
          type: string
          description: "Known limitations or scope boundaries"
        comparison_basis:
          type: string
          description: "Basis for comparing with or adopting from this framework"

# Traits
traits:
  cited:
    description: "Requires citations/sources"
    requires:
      - citations

# Relationships (RO-grounded, mint)
relationships:
  measures:
    description: "A research instrument measures a psycholinguistic construct, stylometric feature, or psychometric index (RO:0000056 participates-in)"
    from:
      - research-instrument
    to:
      - psycholinguistic-construct
      - stylometric-feature
      - psychometric-index
    symmetric: false
  operationalizes:
    description: "An elicitation protocol operationalizes a psycholinguistic construct, making it empirically observable (RO:0002234 has-output)"
    from:
      - elicitation-protocol
    to:
      - psycholinguistic-construct
    symmetric: false
  grounds:
    description: "A linguistic framework grounds a psycholinguistic construct, providing theoretical or categorical basis (IAO:0000136 is-about)"
    from:
      - linguistic-framework
    to:
      - psycholinguistic-construct
    symmetric: false

# Discovery Configuration
discovery:
  enabled: true
  confidence_threshold: 0.8
  patterns:
    - content_pattern: "\\b(Big Five|OCEAN|openness|conscientiousness|extraversion|agreeableness|neuroticism|HEXACO|LIWC)\\b"
      suggest_entity: psycholinguistic-construct
      suggest_namespace: _semantic/constructs
    - content_pattern: "\\b(TTR|MATTR|MTLD|Flesch|Kincaid|readability|type.token ratio|lexical density)\\b"
      suggest_entity: psychometric-index
      suggest_namespace: _semantic/indices
    - content_pattern: "\\b(Stylo|Burrows.?s Delta|stylo|Delta method|stylometry|authorship attribution)\\b"
      suggest_entity: research-instrument
      suggest_namespace: _semantic/instruments
    - content_pattern: "\\b(elicitation|cognitive interview|think.aloud|voice interview|structured elicitation)\\b"
      suggest_entity: elicitation-protocol
      suggest_namespace: _semantic/protocols
