Configuration¶
Config
¶
-
class
botok.
Config
(dialect_name=None, base_path=None)[source]¶ botok config for Tibetan dialect pack.
- Each dialect pack has two components:
Dictionary: - contains all the data required to construct the Trie. - It should in the directory called dictionary inside the dialect pack directory.
Adjustment: - Contains all the data required to adjust the text segmentation rules.
-
classmethod
from_path
(dialect_pack_path)[source]¶ Creates config from
dialect_pack_path
.- Returns
class: Config: An instance of a Configuration object
Examples:
config = Config.from_path(path_to_dialect_pack) assert config.dictionary == True assert config.adjustments == True
-
property
profile
¶ Returns profile name of the dialect_pack.