def set_opts(): """ Настройка параметров парсера """ clg.parse_options_set_max_null_count(parse_opts,6) clg.parse_options_set_display_morphology(parse_opts,0) clg.parse_options_set_islands_ok(parse_opts, True) clg.parse_options_set_linkage_limit(parse_opts,10) clg.parse_options_set_disjunct_cost(parse_opts, 2)
def max_null_count(self, value): if not isinstance(value, int): raise TypeError("max_null_count must be set to an integer") if value < 0: raise ValueError("max_null_count must be positive") clg.parse_options_set_max_null_count(self._obj, value)