Definition at line 38 of file tesstrain_utils.py.
◆ __init__()
def tesstrain_utils.TrainingArgs.__init__ |
( |
|
self | ) |
|
Definition at line 39 of file tesstrain_utils.py.
40 super(TrainingArgs, self).__init__()
41 self.uname = platform.uname().system.lower()
42 self.lang_code =
"eng"
43 self.timestamp = str(date.today())
45 self._font_config_cache = TemporaryDirectory(prefix=
"font_tmp")
46 self.font_config_cache = self._font_config_cache.name
48 "/Library/Fonts/" if "darwin" in self.uname
else "/usr/share/fonts/"
52 self.save_box_tiff =
False
53 self.overwrite =
False
55 self.run_shape_clustering =
False
56 self.extract_font_properties =
True
57 self.distort_image =
False
◆ __eq__()
def tesstrain_utils.TrainingArgs.__eq__ |
( |
|
self, |
|
|
|
other |
|
) |
| |
Definition at line 59 of file tesstrain_utils.py.
59 def __eq__(self, other):
60 return (argparse.Namespace.__eq__(self, other)
and
61 self.uname == other.uname
and self.lang_code == other.lang_code
and
62 self.timestamp == other.timestamp
and self.font_config_cache == other.font_config_cache
and
63 self.fonts_dir == other.fonts_dir
and self.max_pages == other.max_pages
and
64 self.save_box_tiff == other.save_box_tiff
and self.overwrite == other.overwrite
and
65 self.linedata == other.linedata
and self.run_shape_clustering == other.run_shape_clustering
and
66 self.extract_font_properties == other.extract_font_properties
and
67 self.distort_image == other.distort_image)
◆ distort_image
tesstrain_utils.TrainingArgs.distort_image |
◆ extract_font_properties
tesstrain_utils.TrainingArgs.extract_font_properties |
◆ font_config_cache
tesstrain_utils.TrainingArgs.font_config_cache |
◆ fonts_dir
tesstrain_utils.TrainingArgs.fonts_dir |
◆ lang_code
tesstrain_utils.TrainingArgs.lang_code |
◆ linedata
tesstrain_utils.TrainingArgs.linedata |
◆ max_pages
tesstrain_utils.TrainingArgs.max_pages |
◆ overwrite
tesstrain_utils.TrainingArgs.overwrite |
◆ run_shape_clustering
tesstrain_utils.TrainingArgs.run_shape_clustering |
◆ save_box_tiff
tesstrain_utils.TrainingArgs.save_box_tiff |
◆ timestamp
tesstrain_utils.TrainingArgs.timestamp |
◆ uname
tesstrain_utils.TrainingArgs.uname |
The documentation for this class was generated from the following file: