AutoCorrect2 models¶
This module contains the concrete AutoCorrect2CandidateHotstring model.
models ¶
Define AutoCorrect2-specific hotstring and result models.
AutoCorrect2CandidateHotstring
dataclass
¶
Bases: CandidateHotstring
Represent a candidate rendered using AutoCorrect2's f() helper.
The inherited constructor trigger input is semantic trigger text. The
semantic replacement is converted to a safe AutoHotkey string literal and
passed as the single argument to f().
Source code in hotstring\autocorrect2\models.py
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | |
compute_content ¶
Compute AutoCorrect2 executable content for a replacement.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
replacement
|
str
|
Intended replacement text. |
required |
Returns:
| Type | Description |
|---|---|
str
|
AutoHotkey expression calling |
Source code in hotstring\autocorrect2\models.py
20 21 22 23 24 25 26 27 28 29 30 | |
AutoCorrect2CheckResult
dataclass
¶
Represent the result of checking candidates against AutoCorrect2.
Attributes:
| Name | Type | Description |
|---|---|---|
accepted |
tuple[AutoCorrect2CandidateHotstring, ...]
|
Candidates with no detected conflict. |
rejected |
tuple[CandidateAssessment, ...]
|
Assessments for candidates with one or more conflicts. |
Source code in hotstring\autocorrect2\models.py
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | |