class documentation
class TIModel: (source)
Constructor: TIModel(name, features, magic, product_id, lang)
Data type for all model constants
Every 83-series model is included in this module as a constant to use in code. Each model holds its (abbreviated) name, features, file magic, product ID, and native language.
Models can also be used to obtain token maps and tries for tokenization and OS versions for compatibility checks.
Method | __eq__ |
Undocumented |
Method | __ge__ |
Undocumented |
Method | __hash__ |
Undocumented |
Method | __init__ |
Undocumented |
Method | __str__ |
Undocumented |
Method | get |
Gets the token trie for this model corresponding to a given language |
Method | has |
Whether this model has a given feature |
Method | OS |
An OsVersion with this model as its model and a supplied version |
Constant | MODELS |
A list of all models |
Property | features |
This model's features |
Property | lang |
This model's native language |
Property | magic |
This model's file magic |
Property | name |
This model's (abbreviated) name |
Property | order |
This model's order within the chronology used by the token sheets |
Property | product |
This model's product ID |
Property | tokens |
The tokens supported by this model |
Instance Variable | _features |
Undocumented |
Instance Variable | _lang |
Undocumented |
Instance Variable | _magic |
Undocumented |
Instance Variable | _name |
Undocumented |
Instance Variable | _product |
Undocumented |
Instance Variable | _tokens |
Undocumented |
Instance Variable | _trie |
Undocumented |
def __init__(self, name:
str
, features: TIFeature
, magic: str
, product_id: int
, lang: str
):
(source)
¶
Undocumented
Gets the token trie for this model corresponding to a given language
Parameters | |
lang:str | A language code (defaults to English, en) |
Returns | |
TokenTrie | The token trie corresponding to lang |
Whether this model has a given feature
Parameters | |
feature:TIFeature | The feature to check |
Returns | |
Whether this model has feature |
An OsVersion
with this model as its model and a supplied version
Parameters | |
version:str | An OS version number (defaults to the model's earliest OS) |
Returns | |
OsVersion | An OsVersion for this model and version |