@willwade/aac-processors
    Preparing search index...

    Interface MetricsOptions

    Options for metrics calculation

    interface MetricsOptions {
        coreLists?: string[];
        morphologyLocale?: string;
        predictionSelections?: number;
        scanningConfig?: ScanningConfig;
        scanSelectionCost?: number;
        scanStepCost?: number;
        spellingPageId?: string;
        testSentences?: string[];
        usePrediction?: boolean;
        useSmartGrammar?: boolean;
    }
    Index

    Properties

    coreLists?: string[]

    Path to core vocabulary lists to use for analysis

    morphologyLocale?: string

    Locale for morphological inflection rules

    When provided, the MorphologyEngine will generate inflected word forms (e.g., "going", "went" for "go") based on the POS tags extracted from the gridset. Defaults to 'en-gb'.

    Only used when useSmartGrammar is true.

    predictionSelections?: number

    Average number of selections to find a word in prediction

    When prediction is enabled, this estimates how many prediction slots a user needs to check before finding their target word. Default is 1.5 (checking 1-2 predictions on average).

    scanningConfig?: ScanningConfig

    Override scanning configuration

    scanSelectionCost?: number
    scanStepCost?: number

    Custom scanning costs

    spellingPageId?: string

    Optional explicit ID of the spelling/keyboard page

    testSentences?: string[]

    Test sentences for sentence-level effort analysis

    usePrediction?: boolean

    Whether to use prediction for missing words

    When true (default): Words not in the board are assumed to be accessible via prediction at reduced effort (spelling_page_base + prediction_selection)

    When false: Words not in the board must be manually spelled at full effort (10 + word_length * 2.5 per letter)

    Only applies when the board has prediction capability (e.g., SwiftKey)

    useSmartGrammar?: boolean

    Whether to include smart grammar word forms in metrics

    When true: Word forms from smart grammar predictions are included in the metrics. If a word exists as both a regular button and a word form, the version with lower effort is used.

    When false: Smart grammar word forms are excluded from metrics. Only actual buttons in the tree are analyzed.

    Auto-detected by default: if any button in the tree has a POS tag (e.g., from Grid 3's Action.InsertText), smart grammar is enabled automatically. For non-Grid-3 formats (TD Snap, TouchChat, OBF), no buttons have POS tags, so smart grammar is automatically disabled with zero overhead.

    Set explicitly to true to force-enable, or false to force-disable.