morfeusz2.py 28 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574
# This file was automatically generated by SWIG (http://www.swig.org).
# Version 2.0.4
#
# 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
if version_info >= (2,6,0):
    def swig_import_helper():
        from os.path import dirname
        import imp
        fp = None
        try:
            fp, pathname, description = imp.find_module('_morfeusz2', [dirname(__file__)])
        except ImportError:
            import _morfeusz2
            return _morfeusz2
        if fp is not None:
            try:
                _mod = imp.load_module('_morfeusz2', fp, pathname, description)
            finally:
                fp.close()
            return _mod
    _morfeusz2 = swig_import_helper()
    del swig_import_helper
else:
    import _morfeusz2
del version_info
try:
    _swig_property = property
except NameError:
    pass # Python < 2.2 doesn't have 'property'.
def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
    if (name == "thisown"): return self.this.own(value)
    if (name == "this"):
        if type(value).__name__ == 'SwigPyObject':
            self.__dict__[name] = value
            return
    method = class_type.__swig_setmethods__.get(name,None)
    if method: return method(self,value)
    if (not static):
        self.__dict__[name] = value
    else:
        raise AttributeError("You cannot add attributes to %s" % self)

def _swig_setattr(self,class_type,name,value):
    return _swig_setattr_nondynamic(self,class_type,name,value,0)

def _swig_getattr(self,class_type,name):
    if (name == "thisown"): return self.this.own()
    method = class_type.__swig_getmethods__.get(name,None)
    if method: return method(self)
    raise AttributeError(name)

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

try:
    _object = object
    _newclass = 1
except AttributeError:
    class _object : pass
    _newclass = 0


class SwigPyIterator(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, SwigPyIterator, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, SwigPyIterator, name)
    def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined - class is abstract")
    __repr__ = _swig_repr
    __swig_destroy__ = _morfeusz2.delete_SwigPyIterator
    __del__ = lambda self : None;
    def value(self): return _morfeusz2.SwigPyIterator_value(self)
    def incr(self, n = 1): return _morfeusz2.SwigPyIterator_incr(self, n)
    def decr(self, n = 1): return _morfeusz2.SwigPyIterator_decr(self, n)
    def distance(self, *args): return _morfeusz2.SwigPyIterator_distance(self, *args)
    def equal(self, *args): return _morfeusz2.SwigPyIterator_equal(self, *args)
    def copy(self): return _morfeusz2.SwigPyIterator_copy(self)
    def next(self): return _morfeusz2.SwigPyIterator_next(self)
    def __next__(self): return _morfeusz2.SwigPyIterator___next__(self)
    def previous(self): return _morfeusz2.SwigPyIterator_previous(self)
    def advance(self, *args): return _morfeusz2.SwigPyIterator_advance(self, *args)
    def __eq__(self, *args): return _morfeusz2.SwigPyIterator___eq__(self, *args)
    def __ne__(self, *args): return _morfeusz2.SwigPyIterator___ne__(self, *args)
    def __iadd__(self, *args): return _morfeusz2.SwigPyIterator___iadd__(self, *args)
    def __isub__(self, *args): return _morfeusz2.SwigPyIterator___isub__(self, *args)
    def __add__(self, *args): return _morfeusz2.SwigPyIterator___add__(self, *args)
    def __sub__(self, *args): return _morfeusz2.SwigPyIterator___sub__(self, *args)
    def __iter__(self): return self
SwigPyIterator_swigregister = _morfeusz2.SwigPyIterator_swigregister
SwigPyIterator_swigregister(SwigPyIterator)

class InterpsList(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, InterpsList, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, InterpsList, name)
    __repr__ = _swig_repr
    def iterator(self): return _morfeusz2.InterpsList_iterator(self)
    def __iter__(self): return self.iterator()
    def __nonzero__(self): return _morfeusz2.InterpsList___nonzero__(self)
    def __bool__(self): return _morfeusz2.InterpsList___bool__(self)
    def __len__(self): return _morfeusz2.InterpsList___len__(self)
    def pop(self): return _morfeusz2.InterpsList_pop(self)
    def __getslice__(self, *args): return _morfeusz2.InterpsList___getslice__(self, *args)
    def __setslice__(self, *args): return _morfeusz2.InterpsList___setslice__(self, *args)
    def __delslice__(self, *args): return _morfeusz2.InterpsList___delslice__(self, *args)
    def __delitem__(self, *args): return _morfeusz2.InterpsList___delitem__(self, *args)
    def __getitem__(self, *args): return _morfeusz2.InterpsList___getitem__(self, *args)
    def __setitem__(self, *args): return _morfeusz2.InterpsList___setitem__(self, *args)
    def append(self, *args): return _morfeusz2.InterpsList_append(self, *args)
    def empty(self): return _morfeusz2.InterpsList_empty(self)
    def size(self): return _morfeusz2.InterpsList_size(self)
    def clear(self): return _morfeusz2.InterpsList_clear(self)
    def swap(self, *args): return _morfeusz2.InterpsList_swap(self, *args)
    def get_allocator(self): return _morfeusz2.InterpsList_get_allocator(self)
    def begin(self): return _morfeusz2.InterpsList_begin(self)
    def end(self): return _morfeusz2.InterpsList_end(self)
    def rbegin(self): return _morfeusz2.InterpsList_rbegin(self)
    def rend(self): return _morfeusz2.InterpsList_rend(self)
    def pop_back(self): return _morfeusz2.InterpsList_pop_back(self)
    def erase(self, *args): return _morfeusz2.InterpsList_erase(self, *args)
    def __init__(self, *args): 
        this = _morfeusz2.new_InterpsList(*args)
        try: self.this.append(this)
        except: self.this = this
    def push_back(self, *args): return _morfeusz2.InterpsList_push_back(self, *args)
    def front(self): return _morfeusz2.InterpsList_front(self)
    def back(self): return _morfeusz2.InterpsList_back(self)
    def assign(self, *args): return _morfeusz2.InterpsList_assign(self, *args)
    def resize(self, *args): return _morfeusz2.InterpsList_resize(self, *args)
    def insert(self, *args): return _morfeusz2.InterpsList_insert(self, *args)
    def reserve(self, *args): return _morfeusz2.InterpsList_reserve(self, *args)
    def capacity(self): return _morfeusz2.InterpsList_capacity(self)
    __swig_destroy__ = _morfeusz2.delete_InterpsList
    __del__ = lambda self : None;
InterpsList_swigregister = _morfeusz2.InterpsList_swigregister
InterpsList_swigregister(InterpsList)

class StringsList(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, StringsList, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, StringsList, name)
    __repr__ = _swig_repr
    def iterator(self): return _morfeusz2.StringsList_iterator(self)
    def __iter__(self): return self.iterator()
    def __nonzero__(self): return _morfeusz2.StringsList___nonzero__(self)
    def __bool__(self): return _morfeusz2.StringsList___bool__(self)
    def __len__(self): return _morfeusz2.StringsList___len__(self)
    def pop(self): return _morfeusz2.StringsList_pop(self)
    def __getslice__(self, *args): return _morfeusz2.StringsList___getslice__(self, *args)
    def __setslice__(self, *args): return _morfeusz2.StringsList___setslice__(self, *args)
    def __delslice__(self, *args): return _morfeusz2.StringsList___delslice__(self, *args)
    def __delitem__(self, *args): return _morfeusz2.StringsList___delitem__(self, *args)
    def __getitem__(self, *args): return _morfeusz2.StringsList___getitem__(self, *args)
    def __setitem__(self, *args): return _morfeusz2.StringsList___setitem__(self, *args)
    def append(self, *args): return _morfeusz2.StringsList_append(self, *args)
    def empty(self): return _morfeusz2.StringsList_empty(self)
    def size(self): return _morfeusz2.StringsList_size(self)
    def clear(self): return _morfeusz2.StringsList_clear(self)
    def swap(self, *args): return _morfeusz2.StringsList_swap(self, *args)
    def get_allocator(self): return _morfeusz2.StringsList_get_allocator(self)
    def begin(self): return _morfeusz2.StringsList_begin(self)
    def end(self): return _morfeusz2.StringsList_end(self)
    def rbegin(self): return _morfeusz2.StringsList_rbegin(self)
    def rend(self): return _morfeusz2.StringsList_rend(self)
    def pop_back(self): return _morfeusz2.StringsList_pop_back(self)
    def erase(self, *args): return _morfeusz2.StringsList_erase(self, *args)
    def __init__(self, *args): 
        this = _morfeusz2.new_StringsList(*args)
        try: self.this.append(this)
        except: self.this = this
    def push_back(self, *args): return _morfeusz2.StringsList_push_back(self, *args)
    def front(self): return _morfeusz2.StringsList_front(self)
    def back(self): return _morfeusz2.StringsList_back(self)
    def assign(self, *args): return _morfeusz2.StringsList_assign(self, *args)
    def resize(self, *args): return _morfeusz2.StringsList_resize(self, *args)
    def insert(self, *args): return _morfeusz2.StringsList_insert(self, *args)
    def reserve(self, *args): return _morfeusz2.StringsList_reserve(self, *args)
    def capacity(self): return _morfeusz2.StringsList_capacity(self)
    __swig_destroy__ = _morfeusz2.delete_StringsList
    __del__ = lambda self : None;
StringsList_swigregister = _morfeusz2.StringsList_swigregister
StringsList_swigregister(StringsList)

class StringsLinkedList(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, StringsLinkedList, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, StringsLinkedList, name)
    __repr__ = _swig_repr
    def iterator(self): return _morfeusz2.StringsLinkedList_iterator(self)
    def __iter__(self): return self.iterator()
    def __nonzero__(self): return _morfeusz2.StringsLinkedList___nonzero__(self)
    def __bool__(self): return _morfeusz2.StringsLinkedList___bool__(self)
    def __len__(self): return _morfeusz2.StringsLinkedList___len__(self)
    def pop(self): return _morfeusz2.StringsLinkedList_pop(self)
    def __getslice__(self, *args): return _morfeusz2.StringsLinkedList___getslice__(self, *args)
    def __setslice__(self, *args): return _morfeusz2.StringsLinkedList___setslice__(self, *args)
    def __delslice__(self, *args): return _morfeusz2.StringsLinkedList___delslice__(self, *args)
    def __delitem__(self, *args): return _morfeusz2.StringsLinkedList___delitem__(self, *args)
    def __getitem__(self, *args): return _morfeusz2.StringsLinkedList___getitem__(self, *args)
    def __setitem__(self, *args): return _morfeusz2.StringsLinkedList___setitem__(self, *args)
    def append(self, *args): return _morfeusz2.StringsLinkedList_append(self, *args)
    def empty(self): return _morfeusz2.StringsLinkedList_empty(self)
    def size(self): return _morfeusz2.StringsLinkedList_size(self)
    def clear(self): return _morfeusz2.StringsLinkedList_clear(self)
    def swap(self, *args): return _morfeusz2.StringsLinkedList_swap(self, *args)
    def get_allocator(self): return _morfeusz2.StringsLinkedList_get_allocator(self)
    def begin(self): return _morfeusz2.StringsLinkedList_begin(self)
    def end(self): return _morfeusz2.StringsLinkedList_end(self)
    def rbegin(self): return _morfeusz2.StringsLinkedList_rbegin(self)
    def rend(self): return _morfeusz2.StringsLinkedList_rend(self)
    def pop_back(self): return _morfeusz2.StringsLinkedList_pop_back(self)
    def erase(self, *args): return _morfeusz2.StringsLinkedList_erase(self, *args)
    def __init__(self, *args): 
        this = _morfeusz2.new_StringsLinkedList(*args)
        try: self.this.append(this)
        except: self.this = this
    def push_back(self, *args): return _morfeusz2.StringsLinkedList_push_back(self, *args)
    def front(self): return _morfeusz2.StringsLinkedList_front(self)
    def back(self): return _morfeusz2.StringsLinkedList_back(self)
    def assign(self, *args): return _morfeusz2.StringsLinkedList_assign(self, *args)
    def resize(self, *args): return _morfeusz2.StringsLinkedList_resize(self, *args)
    def insert(self, *args): return _morfeusz2.StringsLinkedList_insert(self, *args)
    def pop_front(self): return _morfeusz2.StringsLinkedList_pop_front(self)
    def push_front(self, *args): return _morfeusz2.StringsLinkedList_push_front(self, *args)
    def reverse(self): return _morfeusz2.StringsLinkedList_reverse(self)
    __swig_destroy__ = _morfeusz2.delete_StringsLinkedList
    __del__ = lambda self : None;
StringsLinkedList_swigregister = _morfeusz2.StringsLinkedList_swigregister
StringsLinkedList_swigregister(StringsLinkedList)

class StringsSet(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, StringsSet, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, StringsSet, name)
    __repr__ = _swig_repr
    def iterator(self): return _morfeusz2.StringsSet_iterator(self)
    def __iter__(self): return self.iterator()
    def __nonzero__(self): return _morfeusz2.StringsSet___nonzero__(self)
    def __bool__(self): return _morfeusz2.StringsSet___bool__(self)
    def __len__(self): return _morfeusz2.StringsSet___len__(self)
    def append(self, *args): return _morfeusz2.StringsSet_append(self, *args)
    def __contains__(self, *args): return _morfeusz2.StringsSet___contains__(self, *args)
    def __getitem__(self, *args): return _morfeusz2.StringsSet___getitem__(self, *args)
    def __init__(self, *args): 
        this = _morfeusz2.new_StringsSet(*args)
        try: self.this.append(this)
        except: self.this = this
    def empty(self): return _morfeusz2.StringsSet_empty(self)
    def size(self): return _morfeusz2.StringsSet_size(self)
    def clear(self): return _morfeusz2.StringsSet_clear(self)
    def swap(self, *args): return _morfeusz2.StringsSet_swap(self, *args)
    def count(self, *args): return _morfeusz2.StringsSet_count(self, *args)
    def begin(self): return _morfeusz2.StringsSet_begin(self)
    def end(self): return _morfeusz2.StringsSet_end(self)
    def rbegin(self): return _morfeusz2.StringsSet_rbegin(self)
    def rend(self): return _morfeusz2.StringsSet_rend(self)
    def erase(self, *args): return _morfeusz2.StringsSet_erase(self, *args)
    def find(self, *args): return _morfeusz2.StringsSet_find(self, *args)
    def lower_bound(self, *args): return _morfeusz2.StringsSet_lower_bound(self, *args)
    def upper_bound(self, *args): return _morfeusz2.StringsSet_upper_bound(self, *args)
    def equal_range(self, *args): return _morfeusz2.StringsSet_equal_range(self, *args)
    def insert(self, *args): return _morfeusz2.StringsSet_insert(self, *args)
    __swig_destroy__ = _morfeusz2.delete_StringsSet
    __del__ = lambda self : None;
StringsSet_swigregister = _morfeusz2.StringsSet_swigregister
StringsSet_swigregister(StringsSet)

SEPARATE_NUMBERING = _morfeusz2.SEPARATE_NUMBERING
CONTINUOUS_NUMBERING = _morfeusz2.CONTINUOUS_NUMBERING
CONDITIONALLY_CASE_SENSITIVE = _morfeusz2.CONDITIONALLY_CASE_SENSITIVE
STRICTLY_CASE_SENSITIVE = _morfeusz2.STRICTLY_CASE_SENSITIVE
IGNORE_CASE = _morfeusz2.IGNORE_CASE
SKIP_WHITESPACES = _morfeusz2.SKIP_WHITESPACES
APPEND_WHITESPACES = _morfeusz2.APPEND_WHITESPACES
KEEP_WHITESPACES = _morfeusz2.KEEP_WHITESPACES
ANALYSE_ONLY = _morfeusz2.ANALYSE_ONLY
GENERATE_ONLY = _morfeusz2.GENERATE_ONLY
BOTH_ANALYSE_AND_GENERATE = _morfeusz2.BOTH_ANALYSE_AND_GENERATE
class Morfeusz(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, Morfeusz, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, Morfeusz, name)
    def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined - class is abstract")
    __repr__ = _swig_repr
    __swig_getmethods__["getVersion"] = lambda x: _morfeusz2.Morfeusz_getVersion
    if _newclass:getVersion = staticmethod(_morfeusz2.Morfeusz_getVersion)
    __swig_getmethods__["getDefaultDictName"] = lambda x: _morfeusz2.Morfeusz_getDefaultDictName
    if _newclass:getDefaultDictName = staticmethod(_morfeusz2.Morfeusz_getDefaultDictName)
    __swig_getmethods__["getCopyright"] = lambda x: _morfeusz2.Morfeusz_getCopyright
    if _newclass:getCopyright = staticmethod(_morfeusz2.Morfeusz_getCopyright)
    __swig_getmethods__["createInstance"] = lambda x: _morfeusz2.Morfeusz_createInstance
    if _newclass:createInstance = staticmethod(_morfeusz2.Morfeusz_createInstance)
    def getDictID(self): return _morfeusz2.Morfeusz_getDictID(self)
    def getDictCopyright(self): return _morfeusz2.Morfeusz_getDictCopyright(self)
    def clone(self): return _morfeusz2.Morfeusz_clone(self)
    __swig_destroy__ = _morfeusz2.delete_Morfeusz
    __del__ = lambda self : None;
    def analyse(self, text):
        """
        Analyse given text and return a list of MorphInterpretation objects.
        """
        res = InterpsList()
        _morfeusz2.Morfeusz_analyse(self, text, res)
        return res


    def generate(self, lemma, tagId=None):
        """
        Perform morphological synthesis on given text and return a list of MorphInterpretation objects.
        """
        if tagId is not None:
            return self._generateByTagId(lemma, tagId)
        else:
            res = InterpsList()
            _morfeusz2.Morfeusz_generate(self, lemma, res)
            return res


    def setAggl(self, optionString):
        """
        Select agglutination rules option
        """
        _morfeusz2.Morfeusz_setAggl(self, optionString.encode('utf8'))


    def getAggl(self): return _morfeusz2.Morfeusz_getAggl(self)
    def setPraet(self, optionString):
        """
        Select past tense segmentation
        """
        _morfeusz2.Morfeusz_setPraet(self, optionString.encode('utf8'))


    def getPraet(self): return _morfeusz2.Morfeusz_getPraet(self)
    def setCaseHandling(self, option):
        """
        Set case handling option (valid options are CONDITIONALLY_CASE_SENSITIVE, STRICTLY_CASE_SENSITIVE, IGNORE_CASE)
        """
        _morfeusz2.Morfeusz_setCaseHandling(self, option)


    def getCaseHandling(self): return _morfeusz2.Morfeusz_getCaseHandling(self)
    def setTokenNumbering(self, option):
        """
        Set token numbering option (valid options are SEPARATE_NUMBERING, CONTINUOUS_NUMBERING)
        """
        _morfeusz2.Morfeusz_setTokenNumbering(self, option)


    def getTokenNumbering(self): return _morfeusz2.Morfeusz_getTokenNumbering(self)
    def setWhitespaceHandling(self, option):
        """
        Set whitespace handling handling option (valid options are SKIP_WHITESPACES, KEEP_WHITESPACES, APPEND_WHITESPACES)
        """
        _morfeusz2.Morfeusz_setWhitespaceHandling(self, option)


    def getWhitespaceHandling(self): return _morfeusz2.Morfeusz_getWhitespaceHandling(self)
    def getIdResolver(self): return _morfeusz2.Morfeusz_getIdResolver(self)
    def setDictionary(self, dictName):
        """
        Set dictionary to be used by this instance (by name)
        """
        _morfeusz2.Morfeusz_setDictionary(self, dictName.encode('utf8'))


    __swig_setmethods__["dictionarySearchPaths"] = _morfeusz2.Morfeusz_dictionarySearchPaths_set
    __swig_getmethods__["dictionarySearchPaths"] = _morfeusz2.Morfeusz_dictionarySearchPaths_get
    if _newclass:dictionarySearchPaths = _swig_property(_morfeusz2.Morfeusz_dictionarySearchPaths_get, _morfeusz2.Morfeusz_dictionarySearchPaths_set)
    def getAvailableAgglOptions(self): return _morfeusz2.Morfeusz_getAvailableAgglOptions(self)
    def getAvailablePraetOptions(self): return _morfeusz2.Morfeusz_getAvailablePraetOptions(self)
    def _generateByTagId(self, *args): return _morfeusz2.Morfeusz__generateByTagId(self, *args)
    def analyse_iter(self, text):
        """
        Analyse given text and return an iterator over MorphInterpretation objects as a result.
        """
        return _morfeusz2.Morfeusz__analyseAsIterator(self, text)


Morfeusz_swigregister = _morfeusz2.Morfeusz_swigregister
Morfeusz_swigregister(Morfeusz)

def Morfeusz_getVersion():
  return _morfeusz2.Morfeusz_getVersion()
Morfeusz_getVersion = _morfeusz2.Morfeusz_getVersion

def Morfeusz_getDefaultDictName():
  return _morfeusz2.Morfeusz_getDefaultDictName()
Morfeusz_getDefaultDictName = _morfeusz2.Morfeusz_getDefaultDictName

def Morfeusz_getCopyright():
  return _morfeusz2.Morfeusz_getCopyright()
Morfeusz_getCopyright = _morfeusz2.Morfeusz_getCopyright

def Morfeusz_createInstance(*args):
  return _morfeusz2.Morfeusz_createInstance(*args)
Morfeusz_createInstance = _morfeusz2.Morfeusz_createInstance
cvar = _morfeusz2.cvar

class ResultsIterator(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, ResultsIterator, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, ResultsIterator, name)
    def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined - class is abstract")
    __repr__ = _swig_repr
    def hasNext(self): return _morfeusz2.ResultsIterator_hasNext(self)
    def peek(self): return _morfeusz2.ResultsIterator_peek(self)
    def next(self):
        if self.hasNext():
            return _morfeusz2.ResultsIterator_next(self)
        else:
            raise StopIteration


    __swig_destroy__ = _morfeusz2.delete_ResultsIterator
    __del__ = lambda self : None;
    def __iter__(self): return _morfeusz2.ResultsIterator___iter__(self)
ResultsIterator_swigregister = _morfeusz2.ResultsIterator_swigregister
ResultsIterator_swigregister(ResultsIterator)

class IdResolver(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, IdResolver, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, IdResolver, name)
    def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined - class is abstract")
    __repr__ = _swig_repr
    def getTagsetId(self): return _morfeusz2.IdResolver_getTagsetId(self)
    def getTag(self, tagId):
        return _morfeusz2.IdResolver_getTag(self, tagId).decode('utf8')


    def getTagId(self, tag):
        return _morfeusz2.IdResolver_getTagId(self, tag.encode('utf8'))


    def getName(self, nameId):
        return _morfeusz2.IdResolver_getName(self, nameId).decode('utf8')


    def getNameId(self, name):
        return _morfeusz2.IdResolver_getNameId(self, name.encode('utf8'))


    def getLabelsAsUnicode(self, labelsId):
        return _morfeusz2.IdResolver_getLabelsAsString(self, labelsId).decode('utf8')


    def getLabels(self, labelsId):
        return { l.decode('utf8') for l in _morfeusz2.IdResolver_getLabels(self, labelsId) }


    def getLabelsId(self, labelsStr):
        return _morfeusz2.IdResolver_getLabelsId(self, labelsStr.encode('utf8'))


    def getTagsCount(self): return _morfeusz2.IdResolver_getTagsCount(self)
    def getNamesCount(self): return _morfeusz2.IdResolver_getNamesCount(self)
    def getLabelsCount(self): return _morfeusz2.IdResolver_getLabelsCount(self)
    __swig_destroy__ = _morfeusz2.delete_IdResolver
    __del__ = lambda self : None;
IdResolver_swigregister = _morfeusz2.IdResolver_swigregister
IdResolver_swigregister(IdResolver)

class MorphInterpretation(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, MorphInterpretation, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, MorphInterpretation, name)
    __repr__ = _swig_repr
    def __init__(self): 
        this = _morfeusz2.new_MorphInterpretation()
        try: self.this.append(this)
        except: self.this = this
    __swig_getmethods__["createIgn"] = lambda x: _morfeusz2.MorphInterpretation_createIgn
    if _newclass:createIgn = staticmethod(_morfeusz2.MorphInterpretation_createIgn)
    __swig_getmethods__["createWhitespace"] = lambda x: _morfeusz2.MorphInterpretation_createWhitespace
    if _newclass:createWhitespace = staticmethod(_morfeusz2.MorphInterpretation_createWhitespace)
    def isIgn(self): return _morfeusz2.MorphInterpretation_isIgn(self)
    def isWhitespace(self): return _morfeusz2.MorphInterpretation_isWhitespace(self)
    def getTag(self, morfeusz):
        """
        Returns tag as string.
        """
        return _morfeusz2.MorphInterpretation_getTag(self, morfeusz)


    def getName(self, morfeusz):
        """
        Returns this interpretation named entity as string
        """
        return _morfeusz2.MorphInterpretation_getName(self, morfeusz)


    def getLabelsAsUnicode(self, morfeusz):
        """
        Returns this interpretation labels as string
        """
        return _morfeusz2.MorphInterpretation_getLabelsAsString(self, morfeusz).decode('utf8')


    def getLabels(self, morfeusz):
        """
        Returns this interpretation labels as a set of strings
        """
        return { l.decode('utf8') for l in _morfeusz2.MorphInterpretation_getLabels(self, morfeusz) }


    __swig_setmethods__["startNode"] = _morfeusz2.MorphInterpretation_startNode_set
    __swig_getmethods__["startNode"] = _morfeusz2.MorphInterpretation_startNode_get
    if _newclass:startNode = _swig_property(_morfeusz2.MorphInterpretation_startNode_get, _morfeusz2.MorphInterpretation_startNode_set)
    __swig_setmethods__["endNode"] = _morfeusz2.MorphInterpretation_endNode_set
    __swig_getmethods__["endNode"] = _morfeusz2.MorphInterpretation_endNode_get
    if _newclass:endNode = _swig_property(_morfeusz2.MorphInterpretation_endNode_get, _morfeusz2.MorphInterpretation_endNode_set)
    __swig_setmethods__["_orth"] = _morfeusz2.MorphInterpretation__orth_set
    __swig_getmethods__["_orth"] = _morfeusz2.MorphInterpretation__orth_get
    if _newclass:_orth = _swig_property(_morfeusz2.MorphInterpretation__orth_get, _morfeusz2.MorphInterpretation__orth_set)
    __swig_setmethods__["_lemma"] = _morfeusz2.MorphInterpretation__lemma_set
    __swig_getmethods__["_lemma"] = _morfeusz2.MorphInterpretation__lemma_get
    if _newclass:_lemma = _swig_property(_morfeusz2.MorphInterpretation__lemma_get, _morfeusz2.MorphInterpretation__lemma_set)
    __swig_setmethods__["tagId"] = _morfeusz2.MorphInterpretation_tagId_set
    __swig_getmethods__["tagId"] = _morfeusz2.MorphInterpretation_tagId_get
    if _newclass:tagId = _swig_property(_morfeusz2.MorphInterpretation_tagId_get, _morfeusz2.MorphInterpretation_tagId_set)
    __swig_setmethods__["nameId"] = _morfeusz2.MorphInterpretation_nameId_set
    __swig_getmethods__["nameId"] = _morfeusz2.MorphInterpretation_nameId_get
    if _newclass:nameId = _swig_property(_morfeusz2.MorphInterpretation_nameId_get, _morfeusz2.MorphInterpretation_nameId_set)
    __swig_setmethods__["labelsId"] = _morfeusz2.MorphInterpretation_labelsId_set
    __swig_getmethods__["labelsId"] = _morfeusz2.MorphInterpretation_labelsId_get
    if _newclass:labelsId = _swig_property(_morfeusz2.MorphInterpretation_labelsId_get, _morfeusz2.MorphInterpretation_labelsId_set)
    @property
    def orth(self):
        return self._orth.decode('utf8')

    @orth.setter
    def orth(self, val):
        self._orth = val.encode('utf8')

    @property
    def lemma(self):
        return self._lemma.decode('utf8')

    @lemma.setter
    def lemma(self, val):
        self._lemma = val.encode('utf8')

    __swig_destroy__ = _morfeusz2.delete_MorphInterpretation
    __del__ = lambda self : None;
MorphInterpretation_swigregister = _morfeusz2.MorphInterpretation_swigregister
MorphInterpretation_swigregister(MorphInterpretation)

def MorphInterpretation_createIgn(*args):
  return _morfeusz2.MorphInterpretation_createIgn(*args)
MorphInterpretation_createIgn = _morfeusz2.MorphInterpretation_createIgn

def MorphInterpretation_createWhitespace(*args):
  return _morfeusz2.MorphInterpretation_createWhitespace(*args)
MorphInterpretation_createWhitespace = _morfeusz2.MorphInterpretation_createWhitespace

# This file is compatible with both classic and new-style classes.