# This file was automatically generated by SWIG (https://www.swig.org).
# Version 4.4.1
#
# Do not make changes to this file unless you know what you are doing - modify
# the SWIG interface file instead.

from sys import version_info as _swig_python_version_info
# Import the low-level C/C++ module
if getattr(globals().get("__spec__"), "parent", None) or __package__ or "." in __name__:
    from . import _zinnia
else:
    import _zinnia

try:
    import builtins as __builtin__
except ImportError:
    import __builtin__

def _swig_repr(self):
    try:
        strthis = "proxy of " + self.this.__repr__()
    except __builtin__.Exception:
        strthis = ""
    return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)


def _swig_setattr_nondynamic_instance_variable(set):
    def set_instance_attr(self, name, value):
        if name == "this":
            set(self, name, value)
        elif name == "thisown":
            self.this.own(value)
        elif hasattr(self, name) and isinstance(getattr(type(self), name), property):
            set(self, name, value)
        else:
            raise AttributeError("You cannot add instance attributes to %s" % self)
    return set_instance_attr


def _swig_setattr_nondynamic_class_variable(set):
    def set_class_attr(cls, name, value):
        if hasattr(cls, name) and not isinstance(getattr(cls, name), property):
            set(cls, name, value)
        else:
            raise AttributeError("You cannot add class attributes to %s" % cls)
    return set_class_attr


def _swig_add_metaclass(metaclass):
    """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass"""
    def wrapper(cls):
        return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy())
    return wrapper


class _SwigNonDynamicMeta(type):
    """Meta class to enforce nondynamic attributes (no new attributes) for a class"""
    __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__)



def version():
    return _zinnia.version()
class Character(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def set_value(self, str):
        return _zinnia.Character_set_value(self, str)

    def value(self):
        return _zinnia.Character_value(self)

    def set_width(self, width):
        return _zinnia.Character_set_width(self, width)

    def set_height(self, height):
        return _zinnia.Character_set_height(self, height)

    def width(self):
        return _zinnia.Character_width(self)

    def height(self):
        return _zinnia.Character_height(self)

    def clear(self):
        return _zinnia.Character_clear(self)

    def add(self, id, x, y):
        return _zinnia.Character_add(self, id, x, y)

    def strokes_size(self):
        return _zinnia.Character_strokes_size(self)

    def stroke_size(self, id):
        return _zinnia.Character_stroke_size(self, id)

    def x(self, id, i):
        return _zinnia.Character_x(self, id, i)

    def y(self, id, i):
        return _zinnia.Character_y(self, id, i)

    def parse(self, str):
        return _zinnia.Character_parse(self, str)

    def what(self):
        return _zinnia.Character_what(self)
    __swig_destroy__ = _zinnia.delete_Character

    def __init__(self):
        _zinnia.Character_swiginit(self, _zinnia.new_Character())

    def toString(self):
        return _zinnia.Character_toString(self)

# Register Character in _zinnia:
_zinnia.Character_swigregister(Character)
class Result(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined - class is abstract")
    __repr__ = _swig_repr

    def value(self, i):
        return _zinnia.Result_value(self, i)

    def score(self, i):
        return _zinnia.Result_score(self, i)

    def size(self):
        return _zinnia.Result_size(self)
    __swig_destroy__ = _zinnia.delete_Result

# Register Result in _zinnia:
_zinnia.Result_swigregister(Result)
class Recognizer(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def open(self, *args):
        return _zinnia.Recognizer_open(self, *args)

    def close(self):
        return _zinnia.Recognizer_close(self)

    def size(self):
        return _zinnia.Recognizer_size(self)

    def value(self, i):
        return _zinnia.Recognizer_value(self, i)

    def classify(self, character, nbest):
        return _zinnia.Recognizer_classify(self, character, nbest)

    def what(self):
        return _zinnia.Recognizer_what(self)
    __swig_destroy__ = _zinnia.delete_Recognizer

    def __init__(self):
        _zinnia.Recognizer_swiginit(self, _zinnia.new_Recognizer())

# Register Recognizer in _zinnia:
_zinnia.Recognizer_swigregister(Recognizer)
class Trainer(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def add(self, character):
        return _zinnia.Trainer_add(self, character)

    def clear(self):
        return _zinnia.Trainer_clear(self)

    def train(self, filename):
        return _zinnia.Trainer_train(self, filename)

    @staticmethod
    def convert(txt_model, binary_model, compression_threshold):
        return _zinnia.Trainer_convert(txt_model, binary_model, compression_threshold)

    @staticmethod
    def makeHeader(txt_model, header_file, name, compression_threshold):
        return _zinnia.Trainer_makeHeader(txt_model, header_file, name, compression_threshold)

    def what(self):
        return _zinnia.Trainer_what(self)
    __swig_destroy__ = _zinnia.delete_Trainer

    def __init__(self):
        _zinnia.Trainer_swiginit(self, _zinnia.new_Trainer())

# Register Trainer in _zinnia:
_zinnia.Trainer_swigregister(Trainer)
VERSION = _zinnia.VERSION

