vkit.engine.char_sampler.type

 1# Copyright 2022 vkit-x Administrator. All Rights Reserved.
 2#
 3# This project (vkit-x/vkit) is dual-licensed under commercial and SSPL licenses.
 4#
 5# The commercial license gives you the full rights to create and distribute software
 6# on your own terms without any SSPL license obligations. For more information,
 7# please see the "LICENSE_COMMERCIAL.txt" file.
 8#
 9# This project is also available under Server Side Public License (SSPL).
10# The SSPL licensing is ideal for use cases such as open source projects with
11# SSPL distribution, student/academic purposes, hobby projects, internal research
12# projects without external distribution, or other projects where all SSPL
13# obligations can be met. For more information, please see the "LICENSE_SSPL.txt" file.
14import attrs
15
16from vkit.element import LexiconCollection
17
18
19@attrs.define
20class CharSamplerEngineInitResource:
21    lexicon_collection: LexiconCollection
22
23
24@attrs.define
25class CharSamplerEngineRunConfig:
26    num_chars: int
27    enable_aggregator_mode: bool = False
class CharSamplerEngineInitResource:
21class CharSamplerEngineInitResource:
22    lexicon_collection: LexiconCollection
CharSamplerEngineInitResource(lexicon_collection: vkit.element.lexicon.LexiconCollection)
2def __init__(self, lexicon_collection):
3    self.lexicon_collection = lexicon_collection

Method generated by attrs for class CharSamplerEngineInitResource.

class CharSamplerEngineRunConfig:
26class CharSamplerEngineRunConfig:
27    num_chars: int
28    enable_aggregator_mode: bool = False
CharSamplerEngineRunConfig(num_chars: int, enable_aggregator_mode: bool = False)
2def __init__(self, num_chars, enable_aggregator_mode=attr_dict['enable_aggregator_mode'].default):
3    self.num_chars = num_chars
4    self.enable_aggregator_mode = enable_aggregator_mode

Method generated by attrs for class CharSamplerEngineRunConfig.