# This file was automatically generated by SWIG (http://www.swig.org).
# Version 3.0.5
#
# 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('_ppLMToolKit', [dirname(__file__)])
        except ImportError:
            import _ppLMToolKit
            return _ppLMToolKit
        if fp is not None:
            try:
                _mod = imp.load_module('_ppLMToolKit', fp, pathname, description)
            finally:
                fp.close()
            return _mod
    _ppLMToolKit = swig_import_helper()
    del swig_import_helper
else:
    import _ppLMToolKit
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):
        object.__setattr__(self, 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_nondynamic(self, class_type, name, static=1):
    if (name == "thisown"):
        return self.this.own()
    method = class_type.__swig_getmethods__.get(name, None)
    if method:
        return method(self)
    if (not static):
        return object.__getattr__(self, name)
    else:
        raise AttributeError(name)

def _swig_getattr(self, class_type, name):
    return _swig_getattr_nondynamic(self, class_type, name, 0)


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



def _swig_setattr_nondynamic_method(set):
    def set_attr(self, name, value):
        if (name == "thisown"):
            return self.this.own(value)
        if hasattr(self, name) or (name == "this"):
            set(self, name, value)
        else:
            raise AttributeError("You cannot add attributes to %s" % self)
    return set_attr



_ppLMToolKit.FLT_MIN_swigconstant(_ppLMToolKit)
FLT_MIN = _ppLMToolKit.FLT_MIN

_ppLMToolKit.FLT_MAX_swigconstant(_ppLMToolKit)
FLT_MAX = _ppLMToolKit.FLT_MAX

_ppLMToolKit.M_LOG10E_swigconstant(_ppLMToolKit)
M_LOG10E = _ppLMToolKit.M_LOG10E

_ppLMToolKit.M_PI_swigconstant(_ppLMToolKit)
M_PI = _ppLMToolKit.M_PI

_ppLMToolKit.FLT_MIN_EXP_swigconstant(_ppLMToolKit)
FLT_MIN_EXP = _ppLMToolKit.FLT_MIN_EXP

_ppLMToolKit.FLT_MAX_EXP_swigconstant(_ppLMToolKit)
FLT_MAX_EXP = _ppLMToolKit.FLT_MAX_EXP

_ppLMToolKit.DBL_MAX_EXP_swigconstant(_ppLMToolKit)
DBL_MAX_EXP = _ppLMToolKit.DBL_MAX_EXP

_ppLMToolKit.UINT_MAX_VALUE_swigconstant(_ppLMToolKit)
UINT_MAX_VALUE = _ppLMToolKit.UINT_MAX_VALUE

_ppLMToolKit.INT_MAX_VALUE_swigconstant(_ppLMToolKit)
INT_MAX_VALUE = _ppLMToolKit.INT_MAX_VALUE

_ppLMToolKit.USHORT_MAX_VALUE_swigconstant(_ppLMToolKit)
USHORT_MAX_VALUE = _ppLMToolKit.USHORT_MAX_VALUE

_ppLMToolKit.QUANT_MAX_VALUE_swigconstant(_ppLMToolKit)
QUANT_MAX_VALUE = _ppLMToolKit.QUANT_MAX_VALUE

_ppLMToolKit.QUANT_MIN_VALUE_swigconstant(_ppLMToolKit)
QUANT_MIN_VALUE = _ppLMToolKit.QUANT_MIN_VALUE

_ppLMToolKit.BACK_LARGE_THRESHOLD_swigconstant(_ppLMToolKit)
BACK_LARGE_THRESHOLD = _ppLMToolKit.BACK_LARGE_THRESHOLD

_ppLMToolKit.BACK_LOW_THRESHOLD_swigconstant(_ppLMToolKit)
BACK_LOW_THRESHOLD = _ppLMToolKit.BACK_LOW_THRESHOLD

_ppLMToolKit.REV_MAGIC_swigconstant(_ppLMToolKit)
REV_MAGIC = _ppLMToolKit.REV_MAGIC

_ppLMToolKit.DSK_MAGIC_swigconstant(_ppLMToolKit)
DSK_MAGIC = _ppLMToolKit.DSK_MAGIC

_ppLMToolKit.POS_MAGIC_swigconstant(_ppLMToolKit)
POS_MAGIC = _ppLMToolKit.POS_MAGIC
class CVector(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self, dimN=0):
        this = _ppLMToolKit.new_CVector(dimN)
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_CVector
    __del__ = lambda self: None

    def __eq__(self, vec):
        return _ppLMToolKit.CVector___eq__(self, vec)

    def resize(self, dimN):
        return _ppLMToolKit.CVector_resize(self, dimN)

    def setConst(self, v):
        return _ppLMToolKit.CVector_setConst(self, v)

    def GetDataPtr(self):
        return _ppLMToolKit.CVector_GetDataPtr(self)

    def GetSize(self):
        return _ppLMToolKit.CVector_GetSize(self)

    def GetMemSize(self):
        return _ppLMToolKit.CVector_GetMemSize(self)

    def __getitem__(self, i):
        return _ppLMToolKit.CVector___getitem__(self, i)

    def __setitem__(self, i, v):
        return _ppLMToolKit.CVector___setitem__(self, i, v)

    def SetOwner(self, inOwner):
        return _ppLMToolKit.CVector_SetOwner(self, inOwner)

    def Read(self, fp):
        return _ppLMToolKit.CVector_Read(self, fp)

    def Write(self, fp):
        return _ppLMToolKit.CVector_Write(self, fp)

    def SetData(self, *args):
        return _ppLMToolKit.CVector_SetData(self, *args)
CVector_swigregister = _ppLMToolKit.CVector_swigregister
CVector_swigregister(CVector)
cvar = _ppLMToolKit.cvar
ULONG_MAX_VALUE = cvar.ULONG_MAX_VALUE
MAX_TOTCOUNT = cvar.MAX_TOTCOUNT
MAX_COUNT = cvar.MAX_COUNT
BAD_WID = cvar.BAD_WID
BAD_GID = cvar.BAD_GID
PROB_EPSILON = cvar.PROB_EPSILON
LOG_ZERO = cvar.LOG_ZERO
MAX_ORDER = cvar.MAX_ORDER
MIN_ORDER = cvar.MIN_ORDER
LN_10 = cvar.LN_10
MAX_PATH_LEN = cvar.MAX_PATH_LEN
MAX_TEXT_LEN = cvar.MAX_TEXT_LEN
MAX_WORD_LEN = cvar.MAX_WORD_LEN
MAX_WNUM_ONE_LINE = cvar.MAX_WNUM_ONE_LINE
INIT_CORPUS_SIZE = cvar.INIT_CORPUS_SIZE
RET_ERROR = cvar.RET_ERROR
RET_OK = cvar.RET_OK
RET_NOT_FOUND = cvar.RET_NOT_FOUND
ERR_THROW = cvar.ERR_THROW
DEFAULT_CUTOFF_ARR = cvar.DEFAULT_CUTOFF_ARR
DEFAULT_MAXCNT_ARR = cvar.DEFAULT_MAXCNT_ARR
SENT_START_STR = cvar.SENT_START_STR
SENT_END_STR = cvar.SENT_END_STR
UNK_STR = cvar.UNK_STR
FILE_IO_BUFFER = cvar.FILE_IO_BUFFER

class SVector(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self, dimN=0):
        this = _ppLMToolKit.new_SVector(dimN)
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_SVector
    __del__ = lambda self: None

    def __eq__(self, vec):
        return _ppLMToolKit.SVector___eq__(self, vec)

    def resize(self, dimN):
        return _ppLMToolKit.SVector_resize(self, dimN)

    def setConst(self, v):
        return _ppLMToolKit.SVector_setConst(self, v)

    def GetDataPtr(self):
        return _ppLMToolKit.SVector_GetDataPtr(self)

    def GetSize(self):
        return _ppLMToolKit.SVector_GetSize(self)

    def GetMemSize(self):
        return _ppLMToolKit.SVector_GetMemSize(self)

    def __getitem__(self, i):
        return _ppLMToolKit.SVector___getitem__(self, i)

    def __setitem__(self, i, v):
        return _ppLMToolKit.SVector___setitem__(self, i, v)

    def SetOwner(self, inOwner):
        return _ppLMToolKit.SVector_SetOwner(self, inOwner)

    def Read(self, fp):
        return _ppLMToolKit.SVector_Read(self, fp)

    def Write(self, fp):
        return _ppLMToolKit.SVector_Write(self, fp)

    def SetData(self, *args):
        return _ppLMToolKit.SVector_SetData(self, *args)
SVector_swigregister = _ppLMToolKit.SVector_swigregister
SVector_swigregister(SVector)

class IVector(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self, dimN=0):
        this = _ppLMToolKit.new_IVector(dimN)
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_IVector
    __del__ = lambda self: None

    def __eq__(self, vec):
        return _ppLMToolKit.IVector___eq__(self, vec)

    def resize(self, dimN):
        return _ppLMToolKit.IVector_resize(self, dimN)

    def setConst(self, v):
        return _ppLMToolKit.IVector_setConst(self, v)

    def GetDataPtr(self):
        return _ppLMToolKit.IVector_GetDataPtr(self)

    def GetSize(self):
        return _ppLMToolKit.IVector_GetSize(self)

    def GetMemSize(self):
        return _ppLMToolKit.IVector_GetMemSize(self)

    def __getitem__(self, i):
        return _ppLMToolKit.IVector___getitem__(self, i)

    def __setitem__(self, i, v):
        return _ppLMToolKit.IVector___setitem__(self, i, v)

    def SetOwner(self, inOwner):
        return _ppLMToolKit.IVector_SetOwner(self, inOwner)

    def Read(self, fp):
        return _ppLMToolKit.IVector_Read(self, fp)

    def Write(self, fp):
        return _ppLMToolKit.IVector_Write(self, fp)

    def SetData(self, *args):
        return _ppLMToolKit.IVector_SetData(self, *args)
IVector_swigregister = _ppLMToolKit.IVector_swigregister
IVector_swigregister(IVector)

class FVector(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self, dimN=0):
        this = _ppLMToolKit.new_FVector(dimN)
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_FVector
    __del__ = lambda self: None

    def __eq__(self, vec):
        return _ppLMToolKit.FVector___eq__(self, vec)

    def resize(self, dimN):
        return _ppLMToolKit.FVector_resize(self, dimN)

    def setConst(self, v):
        return _ppLMToolKit.FVector_setConst(self, v)

    def GetDataPtr(self):
        return _ppLMToolKit.FVector_GetDataPtr(self)

    def GetSize(self):
        return _ppLMToolKit.FVector_GetSize(self)

    def GetMemSize(self):
        return _ppLMToolKit.FVector_GetMemSize(self)

    def __getitem__(self, i):
        return _ppLMToolKit.FVector___getitem__(self, i)

    def __setitem__(self, i, v):
        return _ppLMToolKit.FVector___setitem__(self, i, v)

    def SetOwner(self, inOwner):
        return _ppLMToolKit.FVector_SetOwner(self, inOwner)

    def Read(self, fp):
        return _ppLMToolKit.FVector_Read(self, fp)

    def Write(self, fp):
        return _ppLMToolKit.FVector_Write(self, fp)

    def SetData(self, *args):
        return _ppLMToolKit.FVector_SetData(self, *args)
FVector_swigregister = _ppLMToolKit.FVector_swigregister
FVector_swigregister(FVector)

class DVector(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self, dimN=0):
        this = _ppLMToolKit.new_DVector(dimN)
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_DVector
    __del__ = lambda self: None

    def __eq__(self, vec):
        return _ppLMToolKit.DVector___eq__(self, vec)

    def resize(self, dimN):
        return _ppLMToolKit.DVector_resize(self, dimN)

    def setConst(self, v):
        return _ppLMToolKit.DVector_setConst(self, v)

    def GetDataPtr(self):
        return _ppLMToolKit.DVector_GetDataPtr(self)

    def GetSize(self):
        return _ppLMToolKit.DVector_GetSize(self)

    def GetMemSize(self):
        return _ppLMToolKit.DVector_GetMemSize(self)

    def __getitem__(self, i):
        return _ppLMToolKit.DVector___getitem__(self, i)

    def __setitem__(self, i, v):
        return _ppLMToolKit.DVector___setitem__(self, i, v)

    def SetOwner(self, inOwner):
        return _ppLMToolKit.DVector_SetOwner(self, inOwner)

    def Read(self, fp):
        return _ppLMToolKit.DVector_Read(self, fp)

    def Write(self, fp):
        return _ppLMToolKit.DVector_Write(self, fp)

    def SetData(self, *args):
        return _ppLMToolKit.DVector_SetData(self, *args)
DVector_swigregister = _ppLMToolKit.DVector_swigregister
DVector_swigregister(DVector)

class HashRec(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
    __repr__ = _swig_repr
    key = _swig_property(_ppLMToolKit.HashRec_key_get, _ppLMToolKit.HashRec_key_set)
    idx = _swig_property(_ppLMToolKit.HashRec_idx_get, _ppLMToolKit.HashRec_idx_set)
    next = _swig_property(_ppLMToolKit.HashRec_next_get, _ppLMToolKit.HashRec_next_set)

    def __init__(self):
        this = _ppLMToolKit.new_HashRec()
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_HashRec
    __del__ = lambda self: None
HashRec_swigregister = _ppLMToolKit.HashRec_swigregister
HashRec_swigregister(HashRec)

class CBinaryStream(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self):
        this = _ppLMToolKit.new_CBinaryStream()
        try:
            self.this.append(this)
        except:
            self.this = this

    def SetData(self, nPdata, nLen):
        return _ppLMToolKit.CBinaryStream_SetData(self, nPdata, nLen)
    __swig_destroy__ = _ppLMToolKit.delete_CBinaryStream
    __del__ = lambda self: None

    def FlowIn(self, pRetData, nSize):
        return _ppLMToolKit.CBinaryStream_FlowIn(self, pRetData, nSize)

    def FlowOut(self, pRetData, nSize):
        return _ppLMToolKit.CBinaryStream_FlowOut(self, pRetData, nSize)

    def setOwer(self, nInOwner):
        return _ppLMToolKit.CBinaryStream_setOwer(self, nInOwner)

    def ClearMem(self):
        return _ppLMToolKit.CBinaryStream_ClearMem(self)

    def clear(self):
        return _ppLMToolKit.CBinaryStream_clear(self)

    def SetPos(self, pos):
        return _ppLMToolKit.CBinaryStream_SetPos(self, pos)

    def getPos(self):
        return _ppLMToolKit.CBinaryStream_getPos(self)

    def getSize(self):
        return _ppLMToolKit.CBinaryStream_getSize(self)

    def getDataPtr(self):
        return _ppLMToolKit.CBinaryStream_getDataPtr(self)
CBinaryStream_swigregister = _ppLMToolKit.CBinaryStream_swigregister
CBinaryStream_swigregister(CBinaryStream)

class LMCountCell(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self):
        this = _ppLMToolKit.new_LMCountCell()
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_LMCountCell
    __del__ = lambda self: None
    m_Corpus = _swig_property(_ppLMToolKit.LMCountCell_m_Corpus_get, _ppLMToolKit.LMCountCell_m_Corpus_set)
    m_LMTree = _swig_property(_ppLMToolKit.LMCountCell_m_LMTree_get, _ppLMToolKit.LMCountCell_m_LMTree_set)
    m_szLexiconFl = _swig_property(_ppLMToolKit.LMCountCell_m_szLexiconFl_get, _ppLMToolKit.LMCountCell_m_szLexiconFl_set)
    m_szCorpusFl = _swig_property(_ppLMToolKit.LMCountCell_m_szCorpusFl_get, _ppLMToolKit.LMCountCell_m_szCorpusFl_set)
    m_curFileAttri = _swig_property(_ppLMToolKit.LMCountCell_m_curFileAttri_get, _ppLMToolKit.LMCountCell_m_curFileAttri_set)

    def SelfTest(self):
        return _ppLMToolKit.LMCountCell_SelfTest(self)

    def __setstate__(self, szLexFl, szCorpusFl):
        return _ppLMToolKit.LMCountCell___setstate__(self, szLexFl, szCorpusFl)

    def __setstate_SenWt__(self, szLexFl, szCorpusFl):
        return _ppLMToolKit.LMCountCell___setstate_SenWt__(self, szLexFl, szCorpusFl)

    def GetCellPyOutput(self, nWordSt, nWordEd, nGram):
        return _ppLMToolKit.LMCountCell_GetCellPyOutput(self, nWordSt, nWordEd, nGram)

    def GetCellPyOutput_SenWt(self, nWordSt, nWordEd, nGram):
        return _ppLMToolKit.LMCountCell_GetCellPyOutput_SenWt(self, nWordSt, nWordEd, nGram)
LMCountCell_swigregister = _ppLMToolKit.LMCountCell_swigregister
LMCountCell_swigregister(LMCountCell)

class CLMTrain(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self):
        this = _ppLMToolKit.new_CLMTrain()
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_CLMTrain
    __del__ = lambda self: None

    def Init(self, nRealOrder, nGramOrder, szMinCountArr, strOutputKey, szMaxCountArr, smooth_type):
        return _ppLMToolKit.CLMTrain_Init(self, nRealOrder, nGramOrder, szMinCountArr, strOutputKey, szMaxCountArr, smooth_type)

    def AccuUnigramCounts(self, *args):
        return _ppLMToolKit.CLMTrain_AccuUnigramCounts(self, *args)

    def UpdateUnigram(self):
        return _ppLMToolKit.CLMTrain_UpdateUnigram(self)

    def RecurTrainNgram(self):
        return _ppLMToolKit.CLMTrain_RecurTrainNgram(self)

    def LoadLexicon(self, lexFn):
        return _ppLMToolKit.CLMTrain_LoadLexicon(self, lexFn)

    def StaDiscntState(self, *args):
        return _ppLMToolKit.CLMTrain_StaDiscntState(self, *args)

    def InitialDiscounts(self):
        return _ppLMToolKit.CLMTrain_InitialDiscounts(self)

    def InitWriteResultLM(self, outLMFileName=None, nVersion=0):
        return _ppLMToolKit.CLMTrain_InitWriteResultLM(self, outLMFileName, nVersion)

    def WritePartResultLM(self, outLMFileName=None):
        return _ppLMToolKit.CLMTrain_WritePartResultLM(self, outLMFileName)

    def EndWriteResultLM(self, outLMFileName=None):
        return _ppLMToolKit.CLMTrain_EndWriteResultLM(self, outLMFileName)

    def SetTree(self, *args):
        return _ppLMToolKit.CLMTrain_SetTree(self, *args)

    def ConvertLMFormate(self, nFstLyNdNum):
        return _ppLMToolKit.CLMTrain_ConvertLMFormate(self, nFstLyNdNum)

    def SetWeightThreshold(self, threshold, filename):
        return _ppLMToolKit.CLMTrain_SetWeightThreshold(self, threshold, filename)

    def SetBlockSize(self, blockSize):
        return _ppLMToolKit.CLMTrain_SetBlockSize(self, blockSize)

    def PrintLM(self, outLMFileName):
        return _ppLMToolKit.CLMTrain_PrintLM(self, outLMFileName)
CLMTrain_swigregister = _ppLMToolKit.CLMTrain_swigregister
CLMTrain_swigregister(CLMTrain)

class FileAttribute(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
    __repr__ = _swig_repr
    __swig_destroy__ = _ppLMToolKit.delete_FileAttribute
    __del__ = lambda self: None

    def clear(self):
        return _ppLMToolKit.FileAttribute_clear(self)

    def Write(self, fp):
        return _ppLMToolKit.FileAttribute_Write(self, fp)

    def Read(self, fp):
        return _ppLMToolKit.FileAttribute_Read(self, fp)
    nGram = _swig_property(_ppLMToolKit.FileAttribute_nGram_get, _ppLMToolKit.FileAttribute_nGram_set)
    nWm1St = _swig_property(_ppLMToolKit.FileAttribute_nWm1St_get, _ppLMToolKit.FileAttribute_nWm1St_set)
    nWm1Ed = _swig_property(_ppLMToolKit.FileAttribute_nWm1Ed_get, _ppLMToolKit.FileAttribute_nWm1Ed_set)
    nWm2St = _swig_property(_ppLMToolKit.FileAttribute_nWm2St_get, _ppLMToolKit.FileAttribute_nWm2St_set)
    nWm2Ed = _swig_property(_ppLMToolKit.FileAttribute_nWm2Ed_get, _ppLMToolKit.FileAttribute_nWm2Ed_set)
    nPieceId = _swig_property(_ppLMToolKit.FileAttribute_nPieceId_get, _ppLMToolKit.FileAttribute_nPieceId_set)

    def __init__(self, *args):
        this = _ppLMToolKit.new_FileAttribute(*args)
        try:
            self.this.append(this)
        except:
            self.this = this

    def Init(self, inFile, lFileLen):
        return _ppLMToolKit.FileAttribute_Init(self, inFile, lFileLen)

    def __eq__(self, f):
        return _ppLMToolKit.FileAttribute___eq__(self, f)

    def CalKey(self):
        return _ppLMToolKit.FileAttribute_CalKey(self)

    def GetStr(self, pStr):
        return _ppLMToolKit.FileAttribute_GetStr(self, pStr)

    def GetMemSize(self):
        return _ppLMToolKit.FileAttribute_GetMemSize(self)
FileAttribute_swigregister = _ppLMToolKit.FileAttribute_swigregister
FileAttribute_swigregister(FileAttribute)

class MemFile(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
    cAttri = _swig_property(_ppLMToolKit.MemFile_cAttri_get, _ppLMToolKit.MemFile_cAttri_set)
    content = _swig_property(_ppLMToolKit.MemFile_content_get, _ppLMToolKit.MemFile_content_set)
    m_nMaxMemForTreePrun = _swig_property(_ppLMToolKit.MemFile_m_nMaxMemForTreePrun_get, _ppLMToolKit.MemFile_m_nMaxMemForTreePrun_set)

    def __init__(self, *args):
        this = _ppLMToolKit.new_MemFile(*args)
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_MemFile
    __del__ = lambda self: None

    def CalKey(self):
        return _ppLMToolKit.MemFile_CalKey(self)

    def __eq__(self, f):
        return _ppLMToolKit.MemFile___eq__(self, f)

    def __repr__(self):
        return _ppLMToolKit.MemFile___repr__(self)

    def Init(self, *args):
        return _ppLMToolKit.MemFile_Init(self, *args)

    def merge(self, *args):
        return _ppLMToolKit.MemFile_merge(self, *args)

    def write(self, szOutFile):
        return _ppLMToolKit.MemFile_write(self, szOutFile)

    def read(self, szInFile):
        return _ppLMToolKit.MemFile_read(self, szInFile)

    def clear(self):
        return _ppLMToolKit.MemFile_clear(self)
MemFile_swigregister = _ppLMToolKit.MemFile_swigregister
MemFile_swigregister(MemFile)

class LMTree(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self, inNgram=5):
        this = _ppLMToolKit.new_LMTree(inNgram)
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_LMTree
    __del__ = lambda self: None
    m_nGram = _swig_property(_ppLMToolKit.LMTree_m_nGram_get, _ppLMToolKit.LMTree_m_nGram_set)
    m_nNodeNum = _swig_property(_ppLMToolKit.LMTree_m_nNodeNum_get, _ppLMToolKit.LMTree_m_nNodeNum_set)
    m_nLastLySt = _swig_property(_ppLMToolKit.LMTree_m_nLastLySt_get, _ppLMToolKit.LMTree_m_nLastLySt_set)
    m_nLastLyStMul3 = _swig_property(_ppLMToolKit.LMTree_m_nLastLyStMul3_get, _ppLMToolKit.LMTree_m_nLastLyStMul3_set)
    m_nLyStNodeIdVec = _swig_property(_ppLMToolKit.LMTree_m_nLyStNodeIdVec_get, _ppLMToolKit.LMTree_m_nLyStNodeIdVec_set)

    def clear(self):
        return _ppLMToolKit.LMTree_clear(self)

    def setNgram(self, inNgram):
        return _ppLMToolKit.LMTree_setNgram(self, inNgram)

    def IsEmpty(self):
        return _ppLMToolKit.LMTree_IsEmpty(self)

    def Init(self, inNgram):
        return _ppLMToolKit.LMTree_Init(self, inNgram)

    def ShrinkMem(self):
        return _ppLMToolKit.LMTree_ShrinkMem(self)

    def GetMemPtr(self):
        return _ppLMToolKit.LMTree_GetMemPtr(self)

    def getStrSize(self):
        return _ppLMToolKit.LMTree_getStrSize(self)

    def getStr(self, pAllocedMem):
        return _ppLMToolKit.LMTree_getStr(self, pAllocedMem)

    def setStr(self, pIndata, stIdx, inOwner):
        return _ppLMToolKit.LMTree_setStr(self, pIndata, stIdx, inOwner)

    def index(self, ii):
        return _ppLMToolKit.LMTree_index(self, ii)

    def resizeMem(self, nNewSize):
        return _ppLMToolKit.LMTree_resizeMem(self, nNewSize)

    def InsertMemNode(self, *args):
        return _ppLMToolKit.LMTree_InsertMemNode(self, *args)
LMTree_swigregister = _ppLMToolKit.LMTree_swigregister
LMTree_swigregister(LMTree)


_ppLMToolKit.MEMORY_CUT_OFF_swigconstant(_ppLMToolKit)
MEMORY_CUT_OFF = _ppLMToolKit.MEMORY_CUT_OFF

_ppLMToolKit.PRUN_COUNT_ARRAY_SIZE_swigconstant(_ppLMToolKit)
PRUN_COUNT_ARRAY_SIZE = _ppLMToolKit.PRUN_COUNT_ARRAY_SIZE
class LMAdaptTree(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
    __repr__ = _swig_repr
    m_nGram = _swig_property(_ppLMToolKit.LMAdaptTree_m_nGram_get, _ppLMToolKit.LMAdaptTree_m_nGram_set)
    m_nLyStNodeIdVec = _swig_property(_ppLMToolKit.LMAdaptTree_m_nLyStNodeIdVec_get, _ppLMToolKit.LMAdaptTree_m_nLyStNodeIdVec_set)

    def __init__(self, inNgram=5):
        this = _ppLMToolKit.new_LMAdaptTree(inNgram)
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_LMAdaptTree
    __del__ = lambda self: None

    def ClearMem(self):
        return _ppLMToolKit.LMAdaptTree_ClearMem(self)

    def PrintTree(self):
        return _ppLMToolKit.LMAdaptTree_PrintTree(self)

    def UpdateCountArray(self, count):
        return _ppLMToolKit.LMAdaptTree_UpdateCountArray(self, count)

    def ComputeCutOffValue(self, mult):
        return _ppLMToolKit.LMAdaptTree_ComputeCutOffValue(self, mult)

    def PrunLastLayer(self, cut_off, flagArray):
        return _ppLMToolKit.LMAdaptTree_PrunLastLayer(self, cut_off, flagArray)

    def UpdateMidLayerFlag(self, flagArray):
        return _ppLMToolKit.LMAdaptTree_UpdateMidLayerFlag(self, flagArray)

    def CheckMemNeed(self, cutNum):
        return _ppLMToolKit.LMAdaptTree_CheckMemNeed(self, cutNum)

    def RebuildPrunTree(self, flagArray):
        return _ppLMToolKit.LMAdaptTree_RebuildPrunTree(self, flagArray)

    def TreePrunUsingCount(self):
        return _ppLMToolKit.LMAdaptTree_TreePrunUsingCount(self)

    def Init(self, inNgram):
        return _ppLMToolKit.LMAdaptTree_Init(self, inNgram)

    def setNgram(self, inNgram):
        return _ppLMToolKit.LMAdaptTree_setNgram(self, inNgram)

    def Clear(self):
        return _ppLMToolKit.LMAdaptTree_Clear(self)

    def IsEmpty(self):
        return _ppLMToolKit.LMAdaptTree_IsEmpty(self)

    def ShrinkMem(self):
        return _ppLMToolKit.LMAdaptTree_ShrinkMem(self)

    def MergeTree(self, cTree1, cTree2, nMaxMemForTreePrun):
        return _ppLMToolKit.LMAdaptTree_MergeTree(self, cTree1, cTree2, nMaxMemForTreePrun)

    def GetStrSize(self):
        return _ppLMToolKit.LMAdaptTree_GetStrSize(self)

    def GetStr(self, pAllocedMem):
        return _ppLMToolKit.LMAdaptTree_GetStr(self, pAllocedMem)

    def SetStr(self, pIndata, nLen, inOwner):
        return _ppLMToolKit.LMAdaptTree_SetStr(self, pIndata, nLen, inOwner)

    def index(self, ii):
        return _ppLMToolKit.LMAdaptTree_index(self, ii)

    def FindNodeIdx(self, wordid, order):
        return _ppLMToolKit.LMAdaptTree_FindNodeIdx(self, wordid, order)

    def SortLast2LyTree(self, nNodeIdx, long_wordVec, CountVec, SeqVec):
        return _ppLMToolKit.LMAdaptTree_SortLast2LyTree(self, nNodeIdx, long_wordVec, CountVec, SeqVec)
LMAdaptTree_swigregister = _ppLMToolKit.LMAdaptTree_swigregister
LMAdaptTree_swigregister(LMAdaptTree)

class CWordIndex(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
    __repr__ = _swig_repr
    nWordId = _swig_property(_ppLMToolKit.CWordIndex_nWordId_get, _ppLMToolKit.CWordIndex_nWordId_set)
    stIdx = _swig_property(_ppLMToolKit.CWordIndex_stIdx_get, _ppLMToolKit.CWordIndex_stIdx_set)
    edIdx = _swig_property(_ppLMToolKit.CWordIndex_edIdx_get, _ppLMToolKit.CWordIndex_edIdx_set)

    def __eq__(self, curWdIdx):
        return _ppLMToolKit.CWordIndex___eq__(self, curWdIdx)

    def __init__(self):
        this = _ppLMToolKit.new_CWordIndex()
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_CWordIndex
    __del__ = lambda self: None
CWordIndex_swigregister = _ppLMToolKit.CWordIndex_swigregister
CWordIndex_swigregister(CWordIndex)

class TwoIntTuple(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
    __repr__ = _swig_repr
    A = _swig_property(_ppLMToolKit.TwoIntTuple_A_get, _ppLMToolKit.TwoIntTuple_A_set)

    def __init__(self, *args):
        this = _ppLMToolKit.new_TwoIntTuple(*args)
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_TwoIntTuple
    __del__ = lambda self: None
TwoIntTuple_swigregister = _ppLMToolKit.TwoIntTuple_swigregister
TwoIntTuple_swigregister(TwoIntTuple)

class BuildCorpusIndex(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self):
        this = _ppLMToolKit.new_BuildCorpusIndex()
        try:
            self.this.append(this)
        except:
            self.this = this

    def ClearMem(self):
        return _ppLMToolKit.BuildCorpusIndex_ClearMem(self)
    __swig_destroy__ = _ppLMToolKit.delete_BuildCorpusIndex
    __del__ = lambda self: None
    m_lex = _swig_property(_ppLMToolKit.BuildCorpusIndex_m_lex_get, _ppLMToolKit.BuildCorpusIndex_m_lex_set)
    m_corpusVec = _swig_property(_ppLMToolKit.BuildCorpusIndex_m_corpusVec_get, _ppLMToolKit.BuildCorpusIndex_m_corpusVec_set)
    m_SenWtVec = _swig_property(_ppLMToolKit.BuildCorpusIndex_m_SenWtVec_get, _ppLMToolKit.BuildCorpusIndex_m_SenWtVec_set)
    m_cpusSortIdx = _swig_property(_ppLMToolKit.BuildCorpusIndex_m_cpusSortIdx_get, _ppLMToolKit.BuildCorpusIndex_m_cpusSortIdx_set)
    m_SenPosVec = _swig_property(_ppLMToolKit.BuildCorpusIndex_m_SenPosVec_get, _ppLMToolKit.BuildCorpusIndex_m_SenPosVec_set)
    m_poswtPairVec = _swig_property(_ppLMToolKit.BuildCorpusIndex_m_poswtPairVec_get, _ppLMToolKit.BuildCorpusIndex_m_poswtPairVec_set)

    def LoadLexicon(self, lexFileName):
        return _ppLMToolKit.BuildCorpusIndex_LoadLexicon(self, lexFileName)

    def BuildIndex4Corpus(self):
        return _ppLMToolKit.BuildCorpusIndex_BuildIndex4Corpus(self)

    def ReleaseMemory(self):
        return _ppLMToolKit.BuildCorpusIndex_ReleaseMemory(self)

    def AnalysisCorpus(self, corpusFileName):
        return _ppLMToolKit.BuildCorpusIndex_AnalysisCorpus(self, corpusFileName)

    def AnalysisCorpus_SenWt(self, corpusFileName):
        return _ppLMToolKit.BuildCorpusIndex_AnalysisCorpus_SenWt(self, corpusFileName)

    def ExtractNGramTree(self, nGram, wordSt, wordEd):
        return _ppLMToolKit.BuildCorpusIndex_ExtractNGramTree(self, nGram, wordSt, wordEd)

    def ExtractNGramTree_SenWt(self, nGram, wordSt, wordEd):
        return _ppLMToolKit.BuildCorpusIndex_ExtractNGramTree_SenWt(self, nGram, wordSt, wordEd)

    def GetTreeContent(self, pTreeAddr, nTreeSize):
        return _ppLMToolKit.BuildCorpusIndex_GetTreeContent(self, pTreeAddr, nTreeSize)
BuildCorpusIndex_swigregister = _ppLMToolKit.BuildCorpusIndex_swigregister
BuildCorpusIndex_swigregister(BuildCorpusIndex)

class CPPMixLM(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self):
        this = _ppLMToolKit.new_CPPMixLM()
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_CPPMixLM
    __del__ = lambda self: None

    def Init(self, szLexName, order, nBlockSize, nLmVersion):
        return _ppLMToolKit.CPPMixLM_Init(self, szLexName, order, nBlockSize, nLmVersion)

    def Mix(self, inLm1Name, inLm2Name, lm2Weight, outLmName, nLmVersion):
        return _ppLMToolKit.CPPMixLM_Mix(self, inLm1Name, inLm2Name, lm2Weight, outLmName, nLmVersion)

    def MixV0(self, inLm1Name, inLm2Name, lm2Weight, outLmName):
        return _ppLMToolKit.CPPMixLM_MixV0(self, inLm1Name, inLm2Name, lm2Weight, outLmName)

    def MixV1(self, inLm1Name, inLm2Name, lm2Weight, outLmName):
        return _ppLMToolKit.CPPMixLM_MixV1(self, inLm1Name, inLm2Name, lm2Weight, outLmName)
CPPMixLM_swigregister = _ppLMToolKit.CPPMixLM_swigregister
CPPMixLM_swigregister(CPPMixLM)

class CLMInvert(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self, nGramOrder, threadNum, tmpPath, nBlockSize, fDftBow):
        this = _ppLMToolKit.new_CLMInvert(nGramOrder, threadNum, tmpPath, nBlockSize, fDftBow)
        try:
            self.this.append(this)
        except:
            self.this = this

    def InvertLM(self, szOutLMFileName, needWriteArpa):
        return _ppLMToolKit.CLMInvert_InvertLM(self, szOutLMFileName, needWriteArpa)

    def LoadLexicon(self, szLexFile):
        return _ppLMToolKit.CLMInvert_LoadLexicon(self, szLexFile)
    __swig_destroy__ = _ppLMToolKit.delete_CLMInvert
    __del__ = lambda self: None
CLMInvert_swigregister = _ppLMToolKit.CLMInvert_swigregister
CLMInvert_swigregister(CLMInvert)

class CEntropyPrune(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self):
        this = _ppLMToolKit.new_CEntropyPrune()
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_CEntropyPrune
    __del__ = lambda self: None

    def Init(self, szLexName, nLmVersion, nOrder, nBlockSize, szThresholdArr):
        return _ppLMToolKit.CEntropyPrune_Init(self, szLexName, nLmVersion, nOrder, nBlockSize, szThresholdArr)

    def Prune(self, infile, outKey, nLmVersion):
        return _ppLMToolKit.CEntropyPrune_Prune(self, infile, outKey, nLmVersion)

    def PruneV0(self, infile, outKey):
        return _ppLMToolKit.CEntropyPrune_PruneV0(self, infile, outKey)

    def PruneV1(self, infile, outKey):
        return _ppLMToolKit.CEntropyPrune_PruneV1(self, infile, outKey)
CEntropyPrune_swigregister = _ppLMToolKit.CEntropyPrune_swigregister
CEntropyPrune_swigregister(CEntropyPrune)

class CConvToFsn(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def Convert(self, lmKey, version):
        return _ppLMToolKit.CConvToFsn_Convert(self, lmKey, version)

    def __init__(self, nGramOrder):
        this = _ppLMToolKit.new_CConvToFsn(nGramOrder)
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_CConvToFsn
    __del__ = lambda self: None
CConvToFsn_swigregister = _ppLMToolKit.CConvToFsn_swigregister
CConvToFsn_swigregister(CConvToFsn)

class CEvaluate(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self):
        this = _ppLMToolKit.new_CEvaluate()
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_CEvaluate
    __del__ = lambda self: None

    def Init(self, sznGramOrder, szLmKey, szLexFn, szLmFsn):
        return _ppLMToolKit.CEvaluate_Init(self, sznGramOrder, szLmKey, szLexFn, szLmFsn)

    def ComputePPL(self, szFile, szOutFile):
        return _ppLMToolKit.CEvaluate_ComputePPL(self, szFile, szOutFile)
CEvaluate_swigregister = _ppLMToolKit.CEvaluate_swigregister
CEvaluate_swigregister(CEvaluate)


_ppLMToolKit.FILL_PROB_swigconstant(_ppLMToolKit)
FILL_PROB = _ppLMToolKit.FILL_PROB
class CExpandDict(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def ExpandDict(self, szInLm, szOutLm, szInLex, szOutLex, nGramOrder):
        return _ppLMToolKit.CExpandDict_ExpandDict(self, szInLm, szOutLm, szInLex, szOutLex, nGramOrder)

    def ExpandDictV1(self, szInLm, szOutLm, szOriLex, szNewLex, nGramOrder):
        return _ppLMToolKit.CExpandDict_ExpandDictV1(self, szInLm, szOutLm, szOriLex, szNewLex, nGramOrder)

    def __init__(self):
        this = _ppLMToolKit.new_CExpandDict()
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_CExpandDict
    __del__ = lambda self: None
CExpandDict_swigregister = _ppLMToolKit.CExpandDict_swigregister
CExpandDict_swigregister(CExpandDict)

class CBlockAdapt(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
    __repr__ = _swig_repr
    m_nGramOrder = _swig_property(_ppLMToolKit.CBlockAdapt_m_nGramOrder_get, _ppLMToolKit.CBlockAdapt_m_nGramOrder_set)
    m_nTreeOrder = _swig_property(_ppLMToolKit.CBlockAdapt_m_nTreeOrder_get, _ppLMToolKit.CBlockAdapt_m_nTreeOrder_set)
    m_nBlockNum = _swig_property(_ppLMToolKit.CBlockAdapt_m_nBlockNum_get, _ppLMToolKit.CBlockAdapt_m_nBlockNum_set)
    m_nBlockSize = _swig_property(_ppLMToolKit.CBlockAdapt_m_nBlockSize_get, _ppLMToolKit.CBlockAdapt_m_nBlockSize_set)
    m_fpIn = _swig_property(_ppLMToolKit.CBlockAdapt_m_fpIn_get, _ppLMToolKit.CBlockAdapt_m_fpIn_set)
    m_pProbUnigm = _swig_property(_ppLMToolKit.CBlockAdapt_m_pProbUnigm_get, _ppLMToolKit.CBlockAdapt_m_pProbUnigm_set)
    m_pProbBigm = _swig_property(_ppLMToolKit.CBlockAdapt_m_pProbBigm_get, _ppLMToolKit.CBlockAdapt_m_pProbBigm_set)
    m_pBackUnigm = _swig_property(_ppLMToolKit.CBlockAdapt_m_pBackUnigm_get, _ppLMToolKit.CBlockAdapt_m_pBackUnigm_set)
    m_pBackBigm = _swig_property(_ppLMToolKit.CBlockAdapt_m_pBackBigm_get, _ppLMToolKit.CBlockAdapt_m_pBackBigm_set)
    m_nProbUniNum = _swig_property(_ppLMToolKit.CBlockAdapt_m_nProbUniNum_get, _ppLMToolKit.CBlockAdapt_m_nProbUniNum_set)
    m_nProbBigmNum = _swig_property(_ppLMToolKit.CBlockAdapt_m_nProbBigmNum_get, _ppLMToolKit.CBlockAdapt_m_nProbBigmNum_set)
    m_ppProbMiNum = _swig_property(_ppLMToolKit.CBlockAdapt_m_ppProbMiNum_get, _ppLMToolKit.CBlockAdapt_m_ppProbMiNum_set)
    m_pProbFiNum = _swig_property(_ppLMToolKit.CBlockAdapt_m_pProbFiNum_get, _ppLMToolKit.CBlockAdapt_m_pProbFiNum_set)
    m_nBackUniNum = _swig_property(_ppLMToolKit.CBlockAdapt_m_nBackUniNum_get, _ppLMToolKit.CBlockAdapt_m_nBackUniNum_set)
    m_nBackBigmNum = _swig_property(_ppLMToolKit.CBlockAdapt_m_nBackBigmNum_get, _ppLMToolKit.CBlockAdapt_m_nBackBigmNum_set)
    m_ppBackMiNum = _swig_property(_ppLMToolKit.CBlockAdapt_m_ppBackMiNum_get, _ppLMToolKit.CBlockAdapt_m_ppBackMiNum_set)
    m_pBackFiNum = _swig_property(_ppLMToolKit.CBlockAdapt_m_pBackFiNum_get, _ppLMToolKit.CBlockAdapt_m_pBackFiNum_set)
    m_ppProbOffset = _swig_property(_ppLMToolKit.CBlockAdapt_m_ppProbOffset_get, _ppLMToolKit.CBlockAdapt_m_ppProbOffset_set)
    m_ppBackOffset = _swig_property(_ppLMToolKit.CBlockAdapt_m_ppBackOffset_get, _ppLMToolKit.CBlockAdapt_m_ppBackOffset_set)
    m_pOutLmKey = _swig_property(_ppLMToolKit.CBlockAdapt_m_pOutLmKey_get, _ppLMToolKit.CBlockAdapt_m_pOutLmKey_set)
    m_nOutBlockNum = _swig_property(_ppLMToolKit.CBlockAdapt_m_nOutBlockNum_get, _ppLMToolKit.CBlockAdapt_m_nOutBlockNum_set)
    m_nOutBlockSize = _swig_property(_ppLMToolKit.CBlockAdapt_m_nOutBlockSize_get, _ppLMToolKit.CBlockAdapt_m_nOutBlockSize_set)

    def __init__(self):
        this = _ppLMToolKit.new_CBlockAdapt()
        try:
            self.this.append(this)
        except:
            self.this = this

    def BlockAdapt(self, GramOrder, BlockSize, szLmKey, outLmKey):
        return _ppLMToolKit.CBlockAdapt_BlockAdapt(self, GramOrder, BlockSize, szLmKey, outLmKey)
    __swig_destroy__ = _ppLMToolKit.delete_CBlockAdapt
    __del__ = lambda self: None
CBlockAdapt_swigregister = _ppLMToolKit.CBlockAdapt_swigregister
CBlockAdapt_swigregister(CBlockAdapt)

class CDecreaseDict(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def DecreaseDict(self, szInLm, szOutLm, szInLex, szOutLex, nGramOrder):
        return _ppLMToolKit.CDecreaseDict_DecreaseDict(self, szInLm, szOutLm, szInLex, szOutLex, nGramOrder)

    def __init__(self):
        this = _ppLMToolKit.new_CDecreaseDict()
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_CDecreaseDict
    __del__ = lambda self: None
CDecreaseDict_swigregister = _ppLMToolKit.CDecreaseDict_swigregister
CDecreaseDict_swigregister(CDecreaseDict)

class CArpaToLM(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self):
        this = _ppLMToolKit.new_CArpaToLM()
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_CArpaToLM
    __del__ = lambda self: None

    def Init(self, szLexName, nOrder):
        return _ppLMToolKit.CArpaToLM_Init(self, szLexName, nOrder)

    def Convert(self, infile, outKey):
        return _ppLMToolKit.CArpaToLM_Convert(self, infile, outKey)
CArpaToLM_swigregister = _ppLMToolKit.CArpaToLM_swigregister
CArpaToLM_swigregister(CArpaToLM)

class CLMProduce(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self):
        this = _ppLMToolKit.new_CLMProduce()
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_CLMProduce
    __del__ = lambda self: None

    def Init(self, nRealOrder, nGramOrder, strOutputKey, strBaseLm):
        return _ppLMToolKit.CLMProduce_Init(self, nRealOrder, nGramOrder, strOutputKey, strBaseLm)

    def UpdateUnigram(self):
        return _ppLMToolKit.CLMProduce_UpdateUnigram(self)

    def RecurProduceNgram(self):
        return _ppLMToolKit.CLMProduce_RecurProduceNgram(self)

    def LoadLexicon(self, lexFn):
        return _ppLMToolKit.CLMProduce_LoadLexicon(self, lexFn)

    def InitWriteResultLM(self, outLMFileName=None):
        return _ppLMToolKit.CLMProduce_InitWriteResultLM(self, outLMFileName)

    def WritePartResultLM(self, outLMFileName=None):
        return _ppLMToolKit.CLMProduce_WritePartResultLM(self, outLMFileName)

    def EndWriteResultLM(self, outLMFileName=None):
        return _ppLMToolKit.CLMProduce_EndWriteResultLM(self, outLMFileName)

    def SetTree(self, *args):
        return _ppLMToolKit.CLMProduce_SetTree(self, *args)

    def ConvertLMFormate(self, nFstLyNdNum):
        return _ppLMToolKit.CLMProduce_ConvertLMFormate(self, nFstLyNdNum)
CLMProduce_swigregister = _ppLMToolKit.CLMProduce_swigregister
CLMProduce_swigregister(CLMProduce)

class intArray(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self, nelements):
        this = _ppLMToolKit.new_intArray(nelements)
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_intArray
    __del__ = lambda self: None

    def __getitem__(self, index):
        return _ppLMToolKit.intArray___getitem__(self, index)

    def __setitem__(self, index, value):
        return _ppLMToolKit.intArray___setitem__(self, index, value)

    def cast(self):
        return _ppLMToolKit.intArray_cast(self)
    frompointer = staticmethod(_ppLMToolKit.intArray_frompointer)
intArray_swigregister = _ppLMToolKit.intArray_swigregister
intArray_swigregister(intArray)

def intArray_frompointer(t):
    return _ppLMToolKit.intArray_frompointer(t)
intArray_frompointer = _ppLMToolKit.intArray_frompointer

class floatArray(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self, nelements):
        this = _ppLMToolKit.new_floatArray(nelements)
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_floatArray
    __del__ = lambda self: None

    def __getitem__(self, index):
        return _ppLMToolKit.floatArray___getitem__(self, index)

    def __setitem__(self, index, value):
        return _ppLMToolKit.floatArray___setitem__(self, index, value)

    def cast(self):
        return _ppLMToolKit.floatArray_cast(self)
    frompointer = staticmethod(_ppLMToolKit.floatArray_frompointer)
floatArray_swigregister = _ppLMToolKit.floatArray_swigregister
floatArray_swigregister(floatArray)

def floatArray_frompointer(t):
    return _ppLMToolKit.floatArray_frompointer(t)
floatArray_frompointer = _ppLMToolKit.floatArray_frompointer

class doubleArray(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self, nelements):
        this = _ppLMToolKit.new_doubleArray(nelements)
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_doubleArray
    __del__ = lambda self: None

    def __getitem__(self, index):
        return _ppLMToolKit.doubleArray___getitem__(self, index)

    def __setitem__(self, index, value):
        return _ppLMToolKit.doubleArray___setitem__(self, index, value)

    def cast(self):
        return _ppLMToolKit.doubleArray_cast(self)
    frompointer = staticmethod(_ppLMToolKit.doubleArray_frompointer)
doubleArray_swigregister = _ppLMToolKit.doubleArray_swigregister
doubleArray_swigregister(doubleArray)

def doubleArray_frompointer(t):
    return _ppLMToolKit.doubleArray_frompointer(t)
doubleArray_frompointer = _ppLMToolKit.doubleArray_frompointer




44c70807ba1c57bcc4ec20c9532e36619169ab7f
<mask token>


class LMAdaptTree(object):
    <mask token>
    <mask token>
    <mask token>
    <mask token>

    def __init__(self, inNgram=5):
        this = _ppLMToolKit.new_LMAdaptTree(inNgram)
        try:
            self.this.append(this)
        except:
            self.this = this
    <mask token>
    <mask token>

    def ClearMem(self):
        return _ppLMToolKit.LMAdaptTree_ClearMem(self)

    def PrintTree(self):
        return _ppLMToolKit.LMAdaptTree_PrintTree(self)
    <mask token>
    <mask token>

    def PrunLastLayer(self, cut_off, flagArray):
        return _ppLMToolKit.LMAdaptTree_PrunLastLayer(self, cut_off, flagArray)

    def UpdateMidLayerFlag(self, flagArray):
        return _ppLMToolKit.LMAdaptTree_UpdateMidLayerFlag(self, flagArray)

    def CheckMemNeed(self, cutNum):
        return _ppLMToolKit.LMAdaptTree_CheckMemNeed(self, cutNum)
    <mask token>

    def TreePrunUsingCount(self):
        return _ppLMToolKit.LMAdaptTree_TreePrunUsingCount(self)

    def Init(self, inNgram):
        return _ppLMToolKit.LMAdaptTree_Init(self, inNgram)
    <mask token>

    def Clear(self):
        return _ppLMToolKit.LMAdaptTree_Clear(self)

    def IsEmpty(self):
        return _ppLMToolKit.LMAdaptTree_IsEmpty(self)
    <mask token>

    def MergeTree(self, cTree1, cTree2, nMaxMemForTreePrun):
        return _ppLMToolKit.LMAdaptTree_MergeTree(self, cTree1, cTree2,
            nMaxMemForTreePrun)
    <mask token>

    def GetStr(self, pAllocedMem):
        return _ppLMToolKit.LMAdaptTree_GetStr(self, pAllocedMem)
    <mask token>

    def index(self, ii):
        return _ppLMToolKit.LMAdaptTree_index(self, ii)
    <mask token>

    def SortLast2LyTree(self, nNodeIdx, long_wordVec, CountVec, SeqVec):
        return _ppLMToolKit.LMAdaptTree_SortLast2LyTree(self, nNodeIdx,
            long_wordVec, CountVec, SeqVec)


<mask token>


class CWordIndex(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    __repr__ = _swig_repr
    nWordId = _swig_property(_ppLMToolKit.CWordIndex_nWordId_get,
        _ppLMToolKit.CWordIndex_nWordId_set)
    stIdx = _swig_property(_ppLMToolKit.CWordIndex_stIdx_get, _ppLMToolKit.
        CWordIndex_stIdx_set)
    edIdx = _swig_property(_ppLMToolKit.CWordIndex_edIdx_get, _ppLMToolKit.
        CWordIndex_edIdx_set)

    def __eq__(self, curWdIdx):
        return _ppLMToolKit.CWordIndex___eq__(self, curWdIdx)

    def __init__(self):
        this = _ppLMToolKit.new_CWordIndex()
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_CWordIndex
    __del__ = lambda self: None


<mask token>


class TwoIntTuple(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    __repr__ = _swig_repr
    A = _swig_property(_ppLMToolKit.TwoIntTuple_A_get, _ppLMToolKit.
        TwoIntTuple_A_set)

    def __init__(self, *args):
        this = _ppLMToolKit.new_TwoIntTuple(*args)
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_TwoIntTuple
    __del__ = lambda self: None


<mask token>


class BuildCorpusIndex(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self):
        this = _ppLMToolKit.new_BuildCorpusIndex()
        try:
            self.this.append(this)
        except:
            self.this = this

    def ClearMem(self):
        return _ppLMToolKit.BuildCorpusIndex_ClearMem(self)
    __swig_destroy__ = _ppLMToolKit.delete_BuildCorpusIndex
    __del__ = lambda self: None
    m_lex = _swig_property(_ppLMToolKit.BuildCorpusIndex_m_lex_get,
        _ppLMToolKit.BuildCorpusIndex_m_lex_set)
    m_corpusVec = _swig_property(_ppLMToolKit.
        BuildCorpusIndex_m_corpusVec_get, _ppLMToolKit.
        BuildCorpusIndex_m_corpusVec_set)
    m_SenWtVec = _swig_property(_ppLMToolKit.
        BuildCorpusIndex_m_SenWtVec_get, _ppLMToolKit.
        BuildCorpusIndex_m_SenWtVec_set)
    m_cpusSortIdx = _swig_property(_ppLMToolKit.
        BuildCorpusIndex_m_cpusSortIdx_get, _ppLMToolKit.
        BuildCorpusIndex_m_cpusSortIdx_set)
    m_SenPosVec = _swig_property(_ppLMToolKit.
        BuildCorpusIndex_m_SenPosVec_get, _ppLMToolKit.
        BuildCorpusIndex_m_SenPosVec_set)
    m_poswtPairVec = _swig_property(_ppLMToolKit.
        BuildCorpusIndex_m_poswtPairVec_get, _ppLMToolKit.
        BuildCorpusIndex_m_poswtPairVec_set)

    def LoadLexicon(self, lexFileName):
        return _ppLMToolKit.BuildCorpusIndex_LoadLexicon(self, lexFileName)

    def BuildIndex4Corpus(self):
        return _ppLMToolKit.BuildCorpusIndex_BuildIndex4Corpus(self)

    def ReleaseMemory(self):
        return _ppLMToolKit.BuildCorpusIndex_ReleaseMemory(self)

    def AnalysisCorpus(self, corpusFileName):
        return _ppLMToolKit.BuildCorpusIndex_AnalysisCorpus(self,
            corpusFileName)

    def AnalysisCorpus_SenWt(self, corpusFileName):
        return _ppLMToolKit.BuildCorpusIndex_AnalysisCorpus_SenWt(self,
            corpusFileName)

    def ExtractNGramTree(self, nGram, wordSt, wordEd):
        return _ppLMToolKit.BuildCorpusIndex_ExtractNGramTree(self, nGram,
            wordSt, wordEd)

    def ExtractNGramTree_SenWt(self, nGram, wordSt, wordEd):
        return _ppLMToolKit.BuildCorpusIndex_ExtractNGramTree_SenWt(self,
            nGram, wordSt, wordEd)

    def GetTreeContent(self, pTreeAddr, nTreeSize):
        return _ppLMToolKit.BuildCorpusIndex_GetTreeContent(self, pTreeAddr,
            nTreeSize)


<mask token>


class CPPMixLM(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self):
        this = _ppLMToolKit.new_CPPMixLM()
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_CPPMixLM
    __del__ = lambda self: None

    def Init(self, szLexName, order, nBlockSize, nLmVersion):
        return _ppLMToolKit.CPPMixLM_Init(self, szLexName, order,
            nBlockSize, nLmVersion)

    def Mix(self, inLm1Name, inLm2Name, lm2Weight, outLmName, nLmVersion):
        return _ppLMToolKit.CPPMixLM_Mix(self, inLm1Name, inLm2Name,
            lm2Weight, outLmName, nLmVersion)

    def MixV0(self, inLm1Name, inLm2Name, lm2Weight, outLmName):
        return _ppLMToolKit.CPPMixLM_MixV0(self, inLm1Name, inLm2Name,
            lm2Weight, outLmName)

    def MixV1(self, inLm1Name, inLm2Name, lm2Weight, outLmName):
        return _ppLMToolKit.CPPMixLM_MixV1(self, inLm1Name, inLm2Name,
            lm2Weight, outLmName)


<mask token>


class CLMInvert(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self, nGramOrder, threadNum, tmpPath, nBlockSize, fDftBow):
        this = _ppLMToolKit.new_CLMInvert(nGramOrder, threadNum, tmpPath,
            nBlockSize, fDftBow)
        try:
            self.this.append(this)
        except:
            self.this = this

    def InvertLM(self, szOutLMFileName, needWriteArpa):
        return _ppLMToolKit.CLMInvert_InvertLM(self, szOutLMFileName,
            needWriteArpa)

    def LoadLexicon(self, szLexFile):
        return _ppLMToolKit.CLMInvert_LoadLexicon(self, szLexFile)
    __swig_destroy__ = _ppLMToolKit.delete_CLMInvert
    __del__ = lambda self: None


<mask token>


class CEntropyPrune(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self):
        this = _ppLMToolKit.new_CEntropyPrune()
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_CEntropyPrune
    __del__ = lambda self: None

    def Init(self, szLexName, nLmVersion, nOrder, nBlockSize, szThresholdArr):
        return _ppLMToolKit.CEntropyPrune_Init(self, szLexName, nLmVersion,
            nOrder, nBlockSize, szThresholdArr)

    def Prune(self, infile, outKey, nLmVersion):
        return _ppLMToolKit.CEntropyPrune_Prune(self, infile, outKey,
            nLmVersion)

    def PruneV0(self, infile, outKey):
        return _ppLMToolKit.CEntropyPrune_PruneV0(self, infile, outKey)

    def PruneV1(self, infile, outKey):
        return _ppLMToolKit.CEntropyPrune_PruneV1(self, infile, outKey)


<mask token>


class CConvToFsn(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def Convert(self, lmKey, version):
        return _ppLMToolKit.CConvToFsn_Convert(self, lmKey, version)

    def __init__(self, nGramOrder):
        this = _ppLMToolKit.new_CConvToFsn(nGramOrder)
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_CConvToFsn
    __del__ = lambda self: None


<mask token>


class CEvaluate(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self):
        this = _ppLMToolKit.new_CEvaluate()
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_CEvaluate
    __del__ = lambda self: None

    def Init(self, sznGramOrder, szLmKey, szLexFn, szLmFsn):
        return _ppLMToolKit.CEvaluate_Init(self, sznGramOrder, szLmKey,
            szLexFn, szLmFsn)

    def ComputePPL(self, szFile, szOutFile):
        return _ppLMToolKit.CEvaluate_ComputePPL(self, szFile, szOutFile)


<mask token>


class CExpandDict(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def ExpandDict(self, szInLm, szOutLm, szInLex, szOutLex, nGramOrder):
        return _ppLMToolKit.CExpandDict_ExpandDict(self, szInLm, szOutLm,
            szInLex, szOutLex, nGramOrder)

    def ExpandDictV1(self, szInLm, szOutLm, szOriLex, szNewLex, nGramOrder):
        return _ppLMToolKit.CExpandDict_ExpandDictV1(self, szInLm, szOutLm,
            szOriLex, szNewLex, nGramOrder)

    def __init__(self):
        this = _ppLMToolKit.new_CExpandDict()
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_CExpandDict
    __del__ = lambda self: None


<mask token>


class CBlockAdapt(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    __repr__ = _swig_repr
    m_nGramOrder = _swig_property(_ppLMToolKit.CBlockAdapt_m_nGramOrder_get,
        _ppLMToolKit.CBlockAdapt_m_nGramOrder_set)
    m_nTreeOrder = _swig_property(_ppLMToolKit.CBlockAdapt_m_nTreeOrder_get,
        _ppLMToolKit.CBlockAdapt_m_nTreeOrder_set)
    m_nBlockNum = _swig_property(_ppLMToolKit.CBlockAdapt_m_nBlockNum_get,
        _ppLMToolKit.CBlockAdapt_m_nBlockNum_set)
    m_nBlockSize = _swig_property(_ppLMToolKit.CBlockAdapt_m_nBlockSize_get,
        _ppLMToolKit.CBlockAdapt_m_nBlockSize_set)
    m_fpIn = _swig_property(_ppLMToolKit.CBlockAdapt_m_fpIn_get,
        _ppLMToolKit.CBlockAdapt_m_fpIn_set)
    m_pProbUnigm = _swig_property(_ppLMToolKit.CBlockAdapt_m_pProbUnigm_get,
        _ppLMToolKit.CBlockAdapt_m_pProbUnigm_set)
    m_pProbBigm = _swig_property(_ppLMToolKit.CBlockAdapt_m_pProbBigm_get,
        _ppLMToolKit.CBlockAdapt_m_pProbBigm_set)
    m_pBackUnigm = _swig_property(_ppLMToolKit.CBlockAdapt_m_pBackUnigm_get,
        _ppLMToolKit.CBlockAdapt_m_pBackUnigm_set)
    m_pBackBigm = _swig_property(_ppLMToolKit.CBlockAdapt_m_pBackBigm_get,
        _ppLMToolKit.CBlockAdapt_m_pBackBigm_set)
    m_nProbUniNum = _swig_property(_ppLMToolKit.
        CBlockAdapt_m_nProbUniNum_get, _ppLMToolKit.
        CBlockAdapt_m_nProbUniNum_set)
    m_nProbBigmNum = _swig_property(_ppLMToolKit.
        CBlockAdapt_m_nProbBigmNum_get, _ppLMToolKit.
        CBlockAdapt_m_nProbBigmNum_set)
    m_ppProbMiNum = _swig_property(_ppLMToolKit.
        CBlockAdapt_m_ppProbMiNum_get, _ppLMToolKit.
        CBlockAdapt_m_ppProbMiNum_set)
    m_pProbFiNum = _swig_property(_ppLMToolKit.CBlockAdapt_m_pProbFiNum_get,
        _ppLMToolKit.CBlockAdapt_m_pProbFiNum_set)
    m_nBackUniNum = _swig_property(_ppLMToolKit.
        CBlockAdapt_m_nBackUniNum_get, _ppLMToolKit.
        CBlockAdapt_m_nBackUniNum_set)
    m_nBackBigmNum = _swig_property(_ppLMToolKit.
        CBlockAdapt_m_nBackBigmNum_get, _ppLMToolKit.
        CBlockAdapt_m_nBackBigmNum_set)
    m_ppBackMiNum = _swig_property(_ppLMToolKit.
        CBlockAdapt_m_ppBackMiNum_get, _ppLMToolKit.
        CBlockAdapt_m_ppBackMiNum_set)
    m_pBackFiNum = _swig_property(_ppLMToolKit.CBlockAdapt_m_pBackFiNum_get,
        _ppLMToolKit.CBlockAdapt_m_pBackFiNum_set)
    m_ppProbOffset = _swig_property(_ppLMToolKit.
        CBlockAdapt_m_ppProbOffset_get, _ppLMToolKit.
        CBlockAdapt_m_ppProbOffset_set)
    m_ppBackOffset = _swig_property(_ppLMToolKit.
        CBlockAdapt_m_ppBackOffset_get, _ppLMToolKit.
        CBlockAdapt_m_ppBackOffset_set)
    m_pOutLmKey = _swig_property(_ppLMToolKit.CBlockAdapt_m_pOutLmKey_get,
        _ppLMToolKit.CBlockAdapt_m_pOutLmKey_set)
    m_nOutBlockNum = _swig_property(_ppLMToolKit.
        CBlockAdapt_m_nOutBlockNum_get, _ppLMToolKit.
        CBlockAdapt_m_nOutBlockNum_set)
    m_nOutBlockSize = _swig_property(_ppLMToolKit.
        CBlockAdapt_m_nOutBlockSize_get, _ppLMToolKit.
        CBlockAdapt_m_nOutBlockSize_set)

    def __init__(self):
        this = _ppLMToolKit.new_CBlockAdapt()
        try:
            self.this.append(this)
        except:
            self.this = this

    def BlockAdapt(self, GramOrder, BlockSize, szLmKey, outLmKey):
        return _ppLMToolKit.CBlockAdapt_BlockAdapt(self, GramOrder,
            BlockSize, szLmKey, outLmKey)
    __swig_destroy__ = _ppLMToolKit.delete_CBlockAdapt
    __del__ = lambda self: None


<mask token>


class CDecreaseDict(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def DecreaseDict(self, szInLm, szOutLm, szInLex, szOutLex, nGramOrder):
        return _ppLMToolKit.CDecreaseDict_DecreaseDict(self, szInLm,
            szOutLm, szInLex, szOutLex, nGramOrder)

    def __init__(self):
        this = _ppLMToolKit.new_CDecreaseDict()
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_CDecreaseDict
    __del__ = lambda self: None


<mask token>


class CArpaToLM(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self):
        this = _ppLMToolKit.new_CArpaToLM()
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_CArpaToLM
    __del__ = lambda self: None

    def Init(self, szLexName, nOrder):
        return _ppLMToolKit.CArpaToLM_Init(self, szLexName, nOrder)

    def Convert(self, infile, outKey):
        return _ppLMToolKit.CArpaToLM_Convert(self, infile, outKey)


<mask token>


class CLMProduce(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self):
        this = _ppLMToolKit.new_CLMProduce()
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_CLMProduce
    __del__ = lambda self: None

    def Init(self, nRealOrder, nGramOrder, strOutputKey, strBaseLm):
        return _ppLMToolKit.CLMProduce_Init(self, nRealOrder, nGramOrder,
            strOutputKey, strBaseLm)

    def UpdateUnigram(self):
        return _ppLMToolKit.CLMProduce_UpdateUnigram(self)

    def RecurProduceNgram(self):
        return _ppLMToolKit.CLMProduce_RecurProduceNgram(self)

    def LoadLexicon(self, lexFn):
        return _ppLMToolKit.CLMProduce_LoadLexicon(self, lexFn)

    def InitWriteResultLM(self, outLMFileName=None):
        return _ppLMToolKit.CLMProduce_InitWriteResultLM(self, outLMFileName)

    def WritePartResultLM(self, outLMFileName=None):
        return _ppLMToolKit.CLMProduce_WritePartResultLM(self, outLMFileName)

    def EndWriteResultLM(self, outLMFileName=None):
        return _ppLMToolKit.CLMProduce_EndWriteResultLM(self, outLMFileName)

    def SetTree(self, *args):
        return _ppLMToolKit.CLMProduce_SetTree(self, *args)

    def ConvertLMFormate(self, nFstLyNdNum):
        return _ppLMToolKit.CLMProduce_ConvertLMFormate(self, nFstLyNdNum)


<mask token>


class intArray(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self, nelements):
        this = _ppLMToolKit.new_intArray(nelements)
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_intArray
    __del__ = lambda self: None

    def __getitem__(self, index):
        return _ppLMToolKit.intArray___getitem__(self, index)

    def __setitem__(self, index, value):
        return _ppLMToolKit.intArray___setitem__(self, index, value)

    def cast(self):
        return _ppLMToolKit.intArray_cast(self)
    frompointer = staticmethod(_ppLMToolKit.intArray_frompointer)


<mask token>


class floatArray(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self, nelements):
        this = _ppLMToolKit.new_floatArray(nelements)
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_floatArray
    __del__ = lambda self: None

    def __getitem__(self, index):
        return _ppLMToolKit.floatArray___getitem__(self, index)

    def __setitem__(self, index, value):
        return _ppLMToolKit.floatArray___setitem__(self, index, value)

    def cast(self):
        return _ppLMToolKit.floatArray_cast(self)
    frompointer = staticmethod(_ppLMToolKit.floatArray_frompointer)


<mask token>


class doubleArray(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self, nelements):
        this = _ppLMToolKit.new_doubleArray(nelements)
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_doubleArray
    __del__ = lambda self: None

    def __getitem__(self, index):
        return _ppLMToolKit.doubleArray___getitem__(self, index)

    def __setitem__(self, index, value):
        return _ppLMToolKit.doubleArray___setitem__(self, index, value)

    def cast(self):
        return _ppLMToolKit.doubleArray_cast(self)
    frompointer = staticmethod(_ppLMToolKit.doubleArray_frompointer)


<mask token>

<mask token>


class CLMTrain(object):
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>

    def Init(self, nRealOrder, nGramOrder, szMinCountArr, strOutputKey,
        szMaxCountArr, smooth_type):
        return _ppLMToolKit.CLMTrain_Init(self, nRealOrder, nGramOrder,
            szMinCountArr, strOutputKey, szMaxCountArr, smooth_type)

    def AccuUnigramCounts(self, *args):
        return _ppLMToolKit.CLMTrain_AccuUnigramCounts(self, *args)

    def UpdateUnigram(self):
        return _ppLMToolKit.CLMTrain_UpdateUnigram(self)
    <mask token>
    <mask token>

    def StaDiscntState(self, *args):
        return _ppLMToolKit.CLMTrain_StaDiscntState(self, *args)

    def InitialDiscounts(self):
        return _ppLMToolKit.CLMTrain_InitialDiscounts(self)
    <mask token>
    <mask token>

    def EndWriteResultLM(self, outLMFileName=None):
        return _ppLMToolKit.CLMTrain_EndWriteResultLM(self, outLMFileName)

    def SetTree(self, *args):
        return _ppLMToolKit.CLMTrain_SetTree(self, *args)

    def ConvertLMFormate(self, nFstLyNdNum):
        return _ppLMToolKit.CLMTrain_ConvertLMFormate(self, nFstLyNdNum)

    def SetWeightThreshold(self, threshold, filename):
        return _ppLMToolKit.CLMTrain_SetWeightThreshold(self, threshold,
            filename)
    <mask token>
    <mask token>


<mask token>


class FileAttribute(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    __repr__ = _swig_repr
    __swig_destroy__ = _ppLMToolKit.delete_FileAttribute
    __del__ = lambda self: None

    def clear(self):
        return _ppLMToolKit.FileAttribute_clear(self)

    def Write(self, fp):
        return _ppLMToolKit.FileAttribute_Write(self, fp)

    def Read(self, fp):
        return _ppLMToolKit.FileAttribute_Read(self, fp)
    nGram = _swig_property(_ppLMToolKit.FileAttribute_nGram_get,
        _ppLMToolKit.FileAttribute_nGram_set)
    nWm1St = _swig_property(_ppLMToolKit.FileAttribute_nWm1St_get,
        _ppLMToolKit.FileAttribute_nWm1St_set)
    nWm1Ed = _swig_property(_ppLMToolKit.FileAttribute_nWm1Ed_get,
        _ppLMToolKit.FileAttribute_nWm1Ed_set)
    nWm2St = _swig_property(_ppLMToolKit.FileAttribute_nWm2St_get,
        _ppLMToolKit.FileAttribute_nWm2St_set)
    nWm2Ed = _swig_property(_ppLMToolKit.FileAttribute_nWm2Ed_get,
        _ppLMToolKit.FileAttribute_nWm2Ed_set)
    nPieceId = _swig_property(_ppLMToolKit.FileAttribute_nPieceId_get,
        _ppLMToolKit.FileAttribute_nPieceId_set)

    def __init__(self, *args):
        this = _ppLMToolKit.new_FileAttribute(*args)
        try:
            self.this.append(this)
        except:
            self.this = this

    def Init(self, inFile, lFileLen):
        return _ppLMToolKit.FileAttribute_Init(self, inFile, lFileLen)

    def __eq__(self, f):
        return _ppLMToolKit.FileAttribute___eq__(self, f)

    def CalKey(self):
        return _ppLMToolKit.FileAttribute_CalKey(self)

    def GetStr(self, pStr):
        return _ppLMToolKit.FileAttribute_GetStr(self, pStr)

    def GetMemSize(self):
        return _ppLMToolKit.FileAttribute_GetMemSize(self)


<mask token>


class MemFile(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    cAttri = _swig_property(_ppLMToolKit.MemFile_cAttri_get, _ppLMToolKit.
        MemFile_cAttri_set)
    content = _swig_property(_ppLMToolKit.MemFile_content_get, _ppLMToolKit
        .MemFile_content_set)
    m_nMaxMemForTreePrun = _swig_property(_ppLMToolKit.
        MemFile_m_nMaxMemForTreePrun_get, _ppLMToolKit.
        MemFile_m_nMaxMemForTreePrun_set)

    def __init__(self, *args):
        this = _ppLMToolKit.new_MemFile(*args)
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_MemFile
    __del__ = lambda self: None

    def CalKey(self):
        return _ppLMToolKit.MemFile_CalKey(self)

    def __eq__(self, f):
        return _ppLMToolKit.MemFile___eq__(self, f)

    def __repr__(self):
        return _ppLMToolKit.MemFile___repr__(self)

    def Init(self, *args):
        return _ppLMToolKit.MemFile_Init(self, *args)

    def merge(self, *args):
        return _ppLMToolKit.MemFile_merge(self, *args)

    def write(self, szOutFile):
        return _ppLMToolKit.MemFile_write(self, szOutFile)

    def read(self, szInFile):
        return _ppLMToolKit.MemFile_read(self, szInFile)

    def clear(self):
        return _ppLMToolKit.MemFile_clear(self)


<mask token>


class LMTree(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self, inNgram=5):
        this = _ppLMToolKit.new_LMTree(inNgram)
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_LMTree
    __del__ = lambda self: None
    m_nGram = _swig_property(_ppLMToolKit.LMTree_m_nGram_get, _ppLMToolKit.
        LMTree_m_nGram_set)
    m_nNodeNum = _swig_property(_ppLMToolKit.LMTree_m_nNodeNum_get,
        _ppLMToolKit.LMTree_m_nNodeNum_set)
    m_nLastLySt = _swig_property(_ppLMToolKit.LMTree_m_nLastLySt_get,
        _ppLMToolKit.LMTree_m_nLastLySt_set)
    m_nLastLyStMul3 = _swig_property(_ppLMToolKit.
        LMTree_m_nLastLyStMul3_get, _ppLMToolKit.LMTree_m_nLastLyStMul3_set)
    m_nLyStNodeIdVec = _swig_property(_ppLMToolKit.
        LMTree_m_nLyStNodeIdVec_get, _ppLMToolKit.LMTree_m_nLyStNodeIdVec_set)

    def clear(self):
        return _ppLMToolKit.LMTree_clear(self)

    def setNgram(self, inNgram):
        return _ppLMToolKit.LMTree_setNgram(self, inNgram)

    def IsEmpty(self):
        return _ppLMToolKit.LMTree_IsEmpty(self)

    def Init(self, inNgram):
        return _ppLMToolKit.LMTree_Init(self, inNgram)

    def ShrinkMem(self):
        return _ppLMToolKit.LMTree_ShrinkMem(self)

    def GetMemPtr(self):
        return _ppLMToolKit.LMTree_GetMemPtr(self)

    def getStrSize(self):
        return _ppLMToolKit.LMTree_getStrSize(self)

    def getStr(self, pAllocedMem):
        return _ppLMToolKit.LMTree_getStr(self, pAllocedMem)

    def setStr(self, pIndata, stIdx, inOwner):
        return _ppLMToolKit.LMTree_setStr(self, pIndata, stIdx, inOwner)

    def index(self, ii):
        return _ppLMToolKit.LMTree_index(self, ii)

    def resizeMem(self, nNewSize):
        return _ppLMToolKit.LMTree_resizeMem(self, nNewSize)

    def InsertMemNode(self, *args):
        return _ppLMToolKit.LMTree_InsertMemNode(self, *args)


<mask token>


class LMAdaptTree(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    __repr__ = _swig_repr
    m_nGram = _swig_property(_ppLMToolKit.LMAdaptTree_m_nGram_get,
        _ppLMToolKit.LMAdaptTree_m_nGram_set)
    m_nLyStNodeIdVec = _swig_property(_ppLMToolKit.
        LMAdaptTree_m_nLyStNodeIdVec_get, _ppLMToolKit.
        LMAdaptTree_m_nLyStNodeIdVec_set)

    def __init__(self, inNgram=5):
        this = _ppLMToolKit.new_LMAdaptTree(inNgram)
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_LMAdaptTree
    __del__ = lambda self: None

    def ClearMem(self):
        return _ppLMToolKit.LMAdaptTree_ClearMem(self)

    def PrintTree(self):
        return _ppLMToolKit.LMAdaptTree_PrintTree(self)

    def UpdateCountArray(self, count):
        return _ppLMToolKit.LMAdaptTree_UpdateCountArray(self, count)

    def ComputeCutOffValue(self, mult):
        return _ppLMToolKit.LMAdaptTree_ComputeCutOffValue(self, mult)

    def PrunLastLayer(self, cut_off, flagArray):
        return _ppLMToolKit.LMAdaptTree_PrunLastLayer(self, cut_off, flagArray)

    def UpdateMidLayerFlag(self, flagArray):
        return _ppLMToolKit.LMAdaptTree_UpdateMidLayerFlag(self, flagArray)

    def CheckMemNeed(self, cutNum):
        return _ppLMToolKit.LMAdaptTree_CheckMemNeed(self, cutNum)

    def RebuildPrunTree(self, flagArray):
        return _ppLMToolKit.LMAdaptTree_RebuildPrunTree(self, flagArray)

    def TreePrunUsingCount(self):
        return _ppLMToolKit.LMAdaptTree_TreePrunUsingCount(self)

    def Init(self, inNgram):
        return _ppLMToolKit.LMAdaptTree_Init(self, inNgram)

    def setNgram(self, inNgram):
        return _ppLMToolKit.LMAdaptTree_setNgram(self, inNgram)

    def Clear(self):
        return _ppLMToolKit.LMAdaptTree_Clear(self)

    def IsEmpty(self):
        return _ppLMToolKit.LMAdaptTree_IsEmpty(self)

    def ShrinkMem(self):
        return _ppLMToolKit.LMAdaptTree_ShrinkMem(self)

    def MergeTree(self, cTree1, cTree2, nMaxMemForTreePrun):
        return _ppLMToolKit.LMAdaptTree_MergeTree(self, cTree1, cTree2,
            nMaxMemForTreePrun)

    def GetStrSize(self):
        return _ppLMToolKit.LMAdaptTree_GetStrSize(self)

    def GetStr(self, pAllocedMem):
        return _ppLMToolKit.LMAdaptTree_GetStr(self, pAllocedMem)

    def SetStr(self, pIndata, nLen, inOwner):
        return _ppLMToolKit.LMAdaptTree_SetStr(self, pIndata, nLen, inOwner)

    def index(self, ii):
        return _ppLMToolKit.LMAdaptTree_index(self, ii)

    def FindNodeIdx(self, wordid, order):
        return _ppLMToolKit.LMAdaptTree_FindNodeIdx(self, wordid, order)

    def SortLast2LyTree(self, nNodeIdx, long_wordVec, CountVec, SeqVec):
        return _ppLMToolKit.LMAdaptTree_SortLast2LyTree(self, nNodeIdx,
            long_wordVec, CountVec, SeqVec)


<mask token>


class CWordIndex(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    __repr__ = _swig_repr
    nWordId = _swig_property(_ppLMToolKit.CWordIndex_nWordId_get,
        _ppLMToolKit.CWordIndex_nWordId_set)
    stIdx = _swig_property(_ppLMToolKit.CWordIndex_stIdx_get, _ppLMToolKit.
        CWordIndex_stIdx_set)
    edIdx = _swig_property(_ppLMToolKit.CWordIndex_edIdx_get, _ppLMToolKit.
        CWordIndex_edIdx_set)

    def __eq__(self, curWdIdx):
        return _ppLMToolKit.CWordIndex___eq__(self, curWdIdx)

    def __init__(self):
        this = _ppLMToolKit.new_CWordIndex()
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_CWordIndex
    __del__ = lambda self: None


<mask token>


class TwoIntTuple(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    __repr__ = _swig_repr
    A = _swig_property(_ppLMToolKit.TwoIntTuple_A_get, _ppLMToolKit.
        TwoIntTuple_A_set)

    def __init__(self, *args):
        this = _ppLMToolKit.new_TwoIntTuple(*args)
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_TwoIntTuple
    __del__ = lambda self: None


<mask token>


class BuildCorpusIndex(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self):
        this = _ppLMToolKit.new_BuildCorpusIndex()
        try:
            self.this.append(this)
        except:
            self.this = this

    def ClearMem(self):
        return _ppLMToolKit.BuildCorpusIndex_ClearMem(self)
    __swig_destroy__ = _ppLMToolKit.delete_BuildCorpusIndex
    __del__ = lambda self: None
    m_lex = _swig_property(_ppLMToolKit.BuildCorpusIndex_m_lex_get,
        _ppLMToolKit.BuildCorpusIndex_m_lex_set)
    m_corpusVec = _swig_property(_ppLMToolKit.
        BuildCorpusIndex_m_corpusVec_get, _ppLMToolKit.
        BuildCorpusIndex_m_corpusVec_set)
    m_SenWtVec = _swig_property(_ppLMToolKit.
        BuildCorpusIndex_m_SenWtVec_get, _ppLMToolKit.
        BuildCorpusIndex_m_SenWtVec_set)
    m_cpusSortIdx = _swig_property(_ppLMToolKit.
        BuildCorpusIndex_m_cpusSortIdx_get, _ppLMToolKit.
        BuildCorpusIndex_m_cpusSortIdx_set)
    m_SenPosVec = _swig_property(_ppLMToolKit.
        BuildCorpusIndex_m_SenPosVec_get, _ppLMToolKit.
        BuildCorpusIndex_m_SenPosVec_set)
    m_poswtPairVec = _swig_property(_ppLMToolKit.
        BuildCorpusIndex_m_poswtPairVec_get, _ppLMToolKit.
        BuildCorpusIndex_m_poswtPairVec_set)

    def LoadLexicon(self, lexFileName):
        return _ppLMToolKit.BuildCorpusIndex_LoadLexicon(self, lexFileName)

    def BuildIndex4Corpus(self):
        return _ppLMToolKit.BuildCorpusIndex_BuildIndex4Corpus(self)

    def ReleaseMemory(self):
        return _ppLMToolKit.BuildCorpusIndex_ReleaseMemory(self)

    def AnalysisCorpus(self, corpusFileName):
        return _ppLMToolKit.BuildCorpusIndex_AnalysisCorpus(self,
            corpusFileName)

    def AnalysisCorpus_SenWt(self, corpusFileName):
        return _ppLMToolKit.BuildCorpusIndex_AnalysisCorpus_SenWt(self,
            corpusFileName)

    def ExtractNGramTree(self, nGram, wordSt, wordEd):
        return _ppLMToolKit.BuildCorpusIndex_ExtractNGramTree(self, nGram,
            wordSt, wordEd)

    def ExtractNGramTree_SenWt(self, nGram, wordSt, wordEd):
        return _ppLMToolKit.BuildCorpusIndex_ExtractNGramTree_SenWt(self,
            nGram, wordSt, wordEd)

    def GetTreeContent(self, pTreeAddr, nTreeSize):
        return _ppLMToolKit.BuildCorpusIndex_GetTreeContent(self, pTreeAddr,
            nTreeSize)


<mask token>


class CPPMixLM(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self):
        this = _ppLMToolKit.new_CPPMixLM()
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_CPPMixLM
    __del__ = lambda self: None

    def Init(self, szLexName, order, nBlockSize, nLmVersion):
        return _ppLMToolKit.CPPMixLM_Init(self, szLexName, order,
            nBlockSize, nLmVersion)

    def Mix(self, inLm1Name, inLm2Name, lm2Weight, outLmName, nLmVersion):
        return _ppLMToolKit.CPPMixLM_Mix(self, inLm1Name, inLm2Name,
            lm2Weight, outLmName, nLmVersion)

    def MixV0(self, inLm1Name, inLm2Name, lm2Weight, outLmName):
        return _ppLMToolKit.CPPMixLM_MixV0(self, inLm1Name, inLm2Name,
            lm2Weight, outLmName)

    def MixV1(self, inLm1Name, inLm2Name, lm2Weight, outLmName):
        return _ppLMToolKit.CPPMixLM_MixV1(self, inLm1Name, inLm2Name,
            lm2Weight, outLmName)


<mask token>


class CLMInvert(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self, nGramOrder, threadNum, tmpPath, nBlockSize, fDftBow):
        this = _ppLMToolKit.new_CLMInvert(nGramOrder, threadNum, tmpPath,
            nBlockSize, fDftBow)
        try:
            self.this.append(this)
        except:
            self.this = this

    def InvertLM(self, szOutLMFileName, needWriteArpa):
        return _ppLMToolKit.CLMInvert_InvertLM(self, szOutLMFileName,
            needWriteArpa)

    def LoadLexicon(self, szLexFile):
        return _ppLMToolKit.CLMInvert_LoadLexicon(self, szLexFile)
    __swig_destroy__ = _ppLMToolKit.delete_CLMInvert
    __del__ = lambda self: None


<mask token>


class CEntropyPrune(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self):
        this = _ppLMToolKit.new_CEntropyPrune()
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_CEntropyPrune
    __del__ = lambda self: None

    def Init(self, szLexName, nLmVersion, nOrder, nBlockSize, szThresholdArr):
        return _ppLMToolKit.CEntropyPrune_Init(self, szLexName, nLmVersion,
            nOrder, nBlockSize, szThresholdArr)

    def Prune(self, infile, outKey, nLmVersion):
        return _ppLMToolKit.CEntropyPrune_Prune(self, infile, outKey,
            nLmVersion)

    def PruneV0(self, infile, outKey):
        return _ppLMToolKit.CEntropyPrune_PruneV0(self, infile, outKey)

    def PruneV1(self, infile, outKey):
        return _ppLMToolKit.CEntropyPrune_PruneV1(self, infile, outKey)


<mask token>


class CConvToFsn(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def Convert(self, lmKey, version):
        return _ppLMToolKit.CConvToFsn_Convert(self, lmKey, version)

    def __init__(self, nGramOrder):
        this = _ppLMToolKit.new_CConvToFsn(nGramOrder)
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_CConvToFsn
    __del__ = lambda self: None


<mask token>


class CEvaluate(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self):
        this = _ppLMToolKit.new_CEvaluate()
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_CEvaluate
    __del__ = lambda self: None

    def Init(self, sznGramOrder, szLmKey, szLexFn, szLmFsn):
        return _ppLMToolKit.CEvaluate_Init(self, sznGramOrder, szLmKey,
            szLexFn, szLmFsn)

    def ComputePPL(self, szFile, szOutFile):
        return _ppLMToolKit.CEvaluate_ComputePPL(self, szFile, szOutFile)


<mask token>


class CExpandDict(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def ExpandDict(self, szInLm, szOutLm, szInLex, szOutLex, nGramOrder):
        return _ppLMToolKit.CExpandDict_ExpandDict(self, szInLm, szOutLm,
            szInLex, szOutLex, nGramOrder)

    def ExpandDictV1(self, szInLm, szOutLm, szOriLex, szNewLex, nGramOrder):
        return _ppLMToolKit.CExpandDict_ExpandDictV1(self, szInLm, szOutLm,
            szOriLex, szNewLex, nGramOrder)

    def __init__(self):
        this = _ppLMToolKit.new_CExpandDict()
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_CExpandDict
    __del__ = lambda self: None


<mask token>


class CBlockAdapt(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    __repr__ = _swig_repr
    m_nGramOrder = _swig_property(_ppLMToolKit.CBlockAdapt_m_nGramOrder_get,
        _ppLMToolKit.CBlockAdapt_m_nGramOrder_set)
    m_nTreeOrder = _swig_property(_ppLMToolKit.CBlockAdapt_m_nTreeOrder_get,
        _ppLMToolKit.CBlockAdapt_m_nTreeOrder_set)
    m_nBlockNum = _swig_property(_ppLMToolKit.CBlockAdapt_m_nBlockNum_get,
        _ppLMToolKit.CBlockAdapt_m_nBlockNum_set)
    m_nBlockSize = _swig_property(_ppLMToolKit.CBlockAdapt_m_nBlockSize_get,
        _ppLMToolKit.CBlockAdapt_m_nBlockSize_set)
    m_fpIn = _swig_property(_ppLMToolKit.CBlockAdapt_m_fpIn_get,
        _ppLMToolKit.CBlockAdapt_m_fpIn_set)
    m_pProbUnigm = _swig_property(_ppLMToolKit.CBlockAdapt_m_pProbUnigm_get,
        _ppLMToolKit.CBlockAdapt_m_pProbUnigm_set)
    m_pProbBigm = _swig_property(_ppLMToolKit.CBlockAdapt_m_pProbBigm_get,
        _ppLMToolKit.CBlockAdapt_m_pProbBigm_set)
    m_pBackUnigm = _swig_property(_ppLMToolKit.CBlockAdapt_m_pBackUnigm_get,
        _ppLMToolKit.CBlockAdapt_m_pBackUnigm_set)
    m_pBackBigm = _swig_property(_ppLMToolKit.CBlockAdapt_m_pBackBigm_get,
        _ppLMToolKit.CBlockAdapt_m_pBackBigm_set)
    m_nProbUniNum = _swig_property(_ppLMToolKit.
        CBlockAdapt_m_nProbUniNum_get, _ppLMToolKit.
        CBlockAdapt_m_nProbUniNum_set)
    m_nProbBigmNum = _swig_property(_ppLMToolKit.
        CBlockAdapt_m_nProbBigmNum_get, _ppLMToolKit.
        CBlockAdapt_m_nProbBigmNum_set)
    m_ppProbMiNum = _swig_property(_ppLMToolKit.
        CBlockAdapt_m_ppProbMiNum_get, _ppLMToolKit.
        CBlockAdapt_m_ppProbMiNum_set)
    m_pProbFiNum = _swig_property(_ppLMToolKit.CBlockAdapt_m_pProbFiNum_get,
        _ppLMToolKit.CBlockAdapt_m_pProbFiNum_set)
    m_nBackUniNum = _swig_property(_ppLMToolKit.
        CBlockAdapt_m_nBackUniNum_get, _ppLMToolKit.
        CBlockAdapt_m_nBackUniNum_set)
    m_nBackBigmNum = _swig_property(_ppLMToolKit.
        CBlockAdapt_m_nBackBigmNum_get, _ppLMToolKit.
        CBlockAdapt_m_nBackBigmNum_set)
    m_ppBackMiNum = _swig_property(_ppLMToolKit.
        CBlockAdapt_m_ppBackMiNum_get, _ppLMToolKit.
        CBlockAdapt_m_ppBackMiNum_set)
    m_pBackFiNum = _swig_property(_ppLMToolKit.CBlockAdapt_m_pBackFiNum_get,
        _ppLMToolKit.CBlockAdapt_m_pBackFiNum_set)
    m_ppProbOffset = _swig_property(_ppLMToolKit.
        CBlockAdapt_m_ppProbOffset_get, _ppLMToolKit.
        CBlockAdapt_m_ppProbOffset_set)
    m_ppBackOffset = _swig_property(_ppLMToolKit.
        CBlockAdapt_m_ppBackOffset_get, _ppLMToolKit.
        CBlockAdapt_m_ppBackOffset_set)
    m_pOutLmKey = _swig_property(_ppLMToolKit.CBlockAdapt_m_pOutLmKey_get,
        _ppLMToolKit.CBlockAdapt_m_pOutLmKey_set)
    m_nOutBlockNum = _swig_property(_ppLMToolKit.
        CBlockAdapt_m_nOutBlockNum_get, _ppLMToolKit.
        CBlockAdapt_m_nOutBlockNum_set)
    m_nOutBlockSize = _swig_property(_ppLMToolKit.
        CBlockAdapt_m_nOutBlockSize_get, _ppLMToolKit.
        CBlockAdapt_m_nOutBlockSize_set)

    def __init__(self):
        this = _ppLMToolKit.new_CBlockAdapt()
        try:
            self.this.append(this)
        except:
            self.this = this

    def BlockAdapt(self, GramOrder, BlockSize, szLmKey, outLmKey):
        return _ppLMToolKit.CBlockAdapt_BlockAdapt(self, GramOrder,
            BlockSize, szLmKey, outLmKey)
    __swig_destroy__ = _ppLMToolKit.delete_CBlockAdapt
    __del__ = lambda self: None


<mask token>


class CDecreaseDict(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def DecreaseDict(self, szInLm, szOutLm, szInLex, szOutLex, nGramOrder):
        return _ppLMToolKit.CDecreaseDict_DecreaseDict(self, szInLm,
            szOutLm, szInLex, szOutLex, nGramOrder)

    def __init__(self):
        this = _ppLMToolKit.new_CDecreaseDict()
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_CDecreaseDict
    __del__ = lambda self: None


<mask token>


class CArpaToLM(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self):
        this = _ppLMToolKit.new_CArpaToLM()
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_CArpaToLM
    __del__ = lambda self: None

    def Init(self, szLexName, nOrder):
        return _ppLMToolKit.CArpaToLM_Init(self, szLexName, nOrder)

    def Convert(self, infile, outKey):
        return _ppLMToolKit.CArpaToLM_Convert(self, infile, outKey)


<mask token>


class CLMProduce(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self):
        this = _ppLMToolKit.new_CLMProduce()
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_CLMProduce
    __del__ = lambda self: None

    def Init(self, nRealOrder, nGramOrder, strOutputKey, strBaseLm):
        return _ppLMToolKit.CLMProduce_Init(self, nRealOrder, nGramOrder,
            strOutputKey, strBaseLm)

    def UpdateUnigram(self):
        return _ppLMToolKit.CLMProduce_UpdateUnigram(self)

    def RecurProduceNgram(self):
        return _ppLMToolKit.CLMProduce_RecurProduceNgram(self)

    def LoadLexicon(self, lexFn):
        return _ppLMToolKit.CLMProduce_LoadLexicon(self, lexFn)

    def InitWriteResultLM(self, outLMFileName=None):
        return _ppLMToolKit.CLMProduce_InitWriteResultLM(self, outLMFileName)

    def WritePartResultLM(self, outLMFileName=None):
        return _ppLMToolKit.CLMProduce_WritePartResultLM(self, outLMFileName)

    def EndWriteResultLM(self, outLMFileName=None):
        return _ppLMToolKit.CLMProduce_EndWriteResultLM(self, outLMFileName)

    def SetTree(self, *args):
        return _ppLMToolKit.CLMProduce_SetTree(self, *args)

    def ConvertLMFormate(self, nFstLyNdNum):
        return _ppLMToolKit.CLMProduce_ConvertLMFormate(self, nFstLyNdNum)


<mask token>


class intArray(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self, nelements):
        this = _ppLMToolKit.new_intArray(nelements)
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_intArray
    __del__ = lambda self: None

    def __getitem__(self, index):
        return _ppLMToolKit.intArray___getitem__(self, index)

    def __setitem__(self, index, value):
        return _ppLMToolKit.intArray___setitem__(self, index, value)

    def cast(self):
        return _ppLMToolKit.intArray_cast(self)
    frompointer = staticmethod(_ppLMToolKit.intArray_frompointer)


<mask token>


class floatArray(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self, nelements):
        this = _ppLMToolKit.new_floatArray(nelements)
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_floatArray
    __del__ = lambda self: None

    def __getitem__(self, index):
        return _ppLMToolKit.floatArray___getitem__(self, index)

    def __setitem__(self, index, value):
        return _ppLMToolKit.floatArray___setitem__(self, index, value)

    def cast(self):
        return _ppLMToolKit.floatArray_cast(self)
    frompointer = staticmethod(_ppLMToolKit.floatArray_frompointer)


<mask token>


class doubleArray(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self, nelements):
        this = _ppLMToolKit.new_doubleArray(nelements)
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_doubleArray
    __del__ = lambda self: None

    def __getitem__(self, index):
        return _ppLMToolKit.doubleArray___getitem__(self, index)

    def __setitem__(self, index, value):
        return _ppLMToolKit.doubleArray___setitem__(self, index, value)

    def cast(self):
        return _ppLMToolKit.doubleArray_cast(self)
    frompointer = staticmethod(_ppLMToolKit.doubleArray_frompointer)


<mask token>

<mask token>


class FVector(object):
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>

    def resize(self, dimN):
        return _ppLMToolKit.FVector_resize(self, dimN)

    def setConst(self, v):
        return _ppLMToolKit.FVector_setConst(self, v)
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>


<mask token>


class DVector(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self, dimN=0):
        this = _ppLMToolKit.new_DVector(dimN)
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_DVector
    __del__ = lambda self: None

    def __eq__(self, vec):
        return _ppLMToolKit.DVector___eq__(self, vec)

    def resize(self, dimN):
        return _ppLMToolKit.DVector_resize(self, dimN)

    def setConst(self, v):
        return _ppLMToolKit.DVector_setConst(self, v)

    def GetDataPtr(self):
        return _ppLMToolKit.DVector_GetDataPtr(self)

    def GetSize(self):
        return _ppLMToolKit.DVector_GetSize(self)

    def GetMemSize(self):
        return _ppLMToolKit.DVector_GetMemSize(self)

    def __getitem__(self, i):
        return _ppLMToolKit.DVector___getitem__(self, i)

    def __setitem__(self, i, v):
        return _ppLMToolKit.DVector___setitem__(self, i, v)

    def SetOwner(self, inOwner):
        return _ppLMToolKit.DVector_SetOwner(self, inOwner)

    def Read(self, fp):
        return _ppLMToolKit.DVector_Read(self, fp)

    def Write(self, fp):
        return _ppLMToolKit.DVector_Write(self, fp)

    def SetData(self, *args):
        return _ppLMToolKit.DVector_SetData(self, *args)


<mask token>


class HashRec(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    __repr__ = _swig_repr
    key = _swig_property(_ppLMToolKit.HashRec_key_get, _ppLMToolKit.
        HashRec_key_set)
    idx = _swig_property(_ppLMToolKit.HashRec_idx_get, _ppLMToolKit.
        HashRec_idx_set)
    next = _swig_property(_ppLMToolKit.HashRec_next_get, _ppLMToolKit.
        HashRec_next_set)

    def __init__(self):
        this = _ppLMToolKit.new_HashRec()
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_HashRec
    __del__ = lambda self: None


<mask token>


class CBinaryStream(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self):
        this = _ppLMToolKit.new_CBinaryStream()
        try:
            self.this.append(this)
        except:
            self.this = this

    def SetData(self, nPdata, nLen):
        return _ppLMToolKit.CBinaryStream_SetData(self, nPdata, nLen)
    __swig_destroy__ = _ppLMToolKit.delete_CBinaryStream
    __del__ = lambda self: None

    def FlowIn(self, pRetData, nSize):
        return _ppLMToolKit.CBinaryStream_FlowIn(self, pRetData, nSize)

    def FlowOut(self, pRetData, nSize):
        return _ppLMToolKit.CBinaryStream_FlowOut(self, pRetData, nSize)

    def setOwer(self, nInOwner):
        return _ppLMToolKit.CBinaryStream_setOwer(self, nInOwner)

    def ClearMem(self):
        return _ppLMToolKit.CBinaryStream_ClearMem(self)

    def clear(self):
        return _ppLMToolKit.CBinaryStream_clear(self)

    def SetPos(self, pos):
        return _ppLMToolKit.CBinaryStream_SetPos(self, pos)

    def getPos(self):
        return _ppLMToolKit.CBinaryStream_getPos(self)

    def getSize(self):
        return _ppLMToolKit.CBinaryStream_getSize(self)

    def getDataPtr(self):
        return _ppLMToolKit.CBinaryStream_getDataPtr(self)


<mask token>


class LMCountCell(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self):
        this = _ppLMToolKit.new_LMCountCell()
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_LMCountCell
    __del__ = lambda self: None
    m_Corpus = _swig_property(_ppLMToolKit.LMCountCell_m_Corpus_get,
        _ppLMToolKit.LMCountCell_m_Corpus_set)
    m_LMTree = _swig_property(_ppLMToolKit.LMCountCell_m_LMTree_get,
        _ppLMToolKit.LMCountCell_m_LMTree_set)
    m_szLexiconFl = _swig_property(_ppLMToolKit.
        LMCountCell_m_szLexiconFl_get, _ppLMToolKit.
        LMCountCell_m_szLexiconFl_set)
    m_szCorpusFl = _swig_property(_ppLMToolKit.LMCountCell_m_szCorpusFl_get,
        _ppLMToolKit.LMCountCell_m_szCorpusFl_set)
    m_curFileAttri = _swig_property(_ppLMToolKit.
        LMCountCell_m_curFileAttri_get, _ppLMToolKit.
        LMCountCell_m_curFileAttri_set)

    def SelfTest(self):
        return _ppLMToolKit.LMCountCell_SelfTest(self)

    def __setstate__(self, szLexFl, szCorpusFl):
        return _ppLMToolKit.LMCountCell___setstate__(self, szLexFl, szCorpusFl)

    def __setstate_SenWt__(self, szLexFl, szCorpusFl):
        return _ppLMToolKit.LMCountCell___setstate_SenWt__(self, szLexFl,
            szCorpusFl)

    def GetCellPyOutput(self, nWordSt, nWordEd, nGram):
        return _ppLMToolKit.LMCountCell_GetCellPyOutput(self, nWordSt,
            nWordEd, nGram)

    def GetCellPyOutput_SenWt(self, nWordSt, nWordEd, nGram):
        return _ppLMToolKit.LMCountCell_GetCellPyOutput_SenWt(self, nWordSt,
            nWordEd, nGram)


<mask token>


class CLMTrain(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self):
        this = _ppLMToolKit.new_CLMTrain()
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_CLMTrain
    __del__ = lambda self: None

    def Init(self, nRealOrder, nGramOrder, szMinCountArr, strOutputKey,
        szMaxCountArr, smooth_type):
        return _ppLMToolKit.CLMTrain_Init(self, nRealOrder, nGramOrder,
            szMinCountArr, strOutputKey, szMaxCountArr, smooth_type)

    def AccuUnigramCounts(self, *args):
        return _ppLMToolKit.CLMTrain_AccuUnigramCounts(self, *args)

    def UpdateUnigram(self):
        return _ppLMToolKit.CLMTrain_UpdateUnigram(self)

    def RecurTrainNgram(self):
        return _ppLMToolKit.CLMTrain_RecurTrainNgram(self)

    def LoadLexicon(self, lexFn):
        return _ppLMToolKit.CLMTrain_LoadLexicon(self, lexFn)

    def StaDiscntState(self, *args):
        return _ppLMToolKit.CLMTrain_StaDiscntState(self, *args)

    def InitialDiscounts(self):
        return _ppLMToolKit.CLMTrain_InitialDiscounts(self)

    def InitWriteResultLM(self, outLMFileName=None, nVersion=0):
        return _ppLMToolKit.CLMTrain_InitWriteResultLM(self, outLMFileName,
            nVersion)

    def WritePartResultLM(self, outLMFileName=None):
        return _ppLMToolKit.CLMTrain_WritePartResultLM(self, outLMFileName)

    def EndWriteResultLM(self, outLMFileName=None):
        return _ppLMToolKit.CLMTrain_EndWriteResultLM(self, outLMFileName)

    def SetTree(self, *args):
        return _ppLMToolKit.CLMTrain_SetTree(self, *args)

    def ConvertLMFormate(self, nFstLyNdNum):
        return _ppLMToolKit.CLMTrain_ConvertLMFormate(self, nFstLyNdNum)

    def SetWeightThreshold(self, threshold, filename):
        return _ppLMToolKit.CLMTrain_SetWeightThreshold(self, threshold,
            filename)

    def SetBlockSize(self, blockSize):
        return _ppLMToolKit.CLMTrain_SetBlockSize(self, blockSize)

    def PrintLM(self, outLMFileName):
        return _ppLMToolKit.CLMTrain_PrintLM(self, outLMFileName)


<mask token>


class FileAttribute(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    __repr__ = _swig_repr
    __swig_destroy__ = _ppLMToolKit.delete_FileAttribute
    __del__ = lambda self: None

    def clear(self):
        return _ppLMToolKit.FileAttribute_clear(self)

    def Write(self, fp):
        return _ppLMToolKit.FileAttribute_Write(self, fp)

    def Read(self, fp):
        return _ppLMToolKit.FileAttribute_Read(self, fp)
    nGram = _swig_property(_ppLMToolKit.FileAttribute_nGram_get,
        _ppLMToolKit.FileAttribute_nGram_set)
    nWm1St = _swig_property(_ppLMToolKit.FileAttribute_nWm1St_get,
        _ppLMToolKit.FileAttribute_nWm1St_set)
    nWm1Ed = _swig_property(_ppLMToolKit.FileAttribute_nWm1Ed_get,
        _ppLMToolKit.FileAttribute_nWm1Ed_set)
    nWm2St = _swig_property(_ppLMToolKit.FileAttribute_nWm2St_get,
        _ppLMToolKit.FileAttribute_nWm2St_set)
    nWm2Ed = _swig_property(_ppLMToolKit.FileAttribute_nWm2Ed_get,
        _ppLMToolKit.FileAttribute_nWm2Ed_set)
    nPieceId = _swig_property(_ppLMToolKit.FileAttribute_nPieceId_get,
        _ppLMToolKit.FileAttribute_nPieceId_set)

    def __init__(self, *args):
        this = _ppLMToolKit.new_FileAttribute(*args)
        try:
            self.this.append(this)
        except:
            self.this = this

    def Init(self, inFile, lFileLen):
        return _ppLMToolKit.FileAttribute_Init(self, inFile, lFileLen)

    def __eq__(self, f):
        return _ppLMToolKit.FileAttribute___eq__(self, f)

    def CalKey(self):
        return _ppLMToolKit.FileAttribute_CalKey(self)

    def GetStr(self, pStr):
        return _ppLMToolKit.FileAttribute_GetStr(self, pStr)

    def GetMemSize(self):
        return _ppLMToolKit.FileAttribute_GetMemSize(self)


<mask token>


class MemFile(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    cAttri = _swig_property(_ppLMToolKit.MemFile_cAttri_get, _ppLMToolKit.
        MemFile_cAttri_set)
    content = _swig_property(_ppLMToolKit.MemFile_content_get, _ppLMToolKit
        .MemFile_content_set)
    m_nMaxMemForTreePrun = _swig_property(_ppLMToolKit.
        MemFile_m_nMaxMemForTreePrun_get, _ppLMToolKit.
        MemFile_m_nMaxMemForTreePrun_set)

    def __init__(self, *args):
        this = _ppLMToolKit.new_MemFile(*args)
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_MemFile
    __del__ = lambda self: None

    def CalKey(self):
        return _ppLMToolKit.MemFile_CalKey(self)

    def __eq__(self, f):
        return _ppLMToolKit.MemFile___eq__(self, f)

    def __repr__(self):
        return _ppLMToolKit.MemFile___repr__(self)

    def Init(self, *args):
        return _ppLMToolKit.MemFile_Init(self, *args)

    def merge(self, *args):
        return _ppLMToolKit.MemFile_merge(self, *args)

    def write(self, szOutFile):
        return _ppLMToolKit.MemFile_write(self, szOutFile)

    def read(self, szInFile):
        return _ppLMToolKit.MemFile_read(self, szInFile)

    def clear(self):
        return _ppLMToolKit.MemFile_clear(self)


<mask token>


class LMTree(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self, inNgram=5):
        this = _ppLMToolKit.new_LMTree(inNgram)
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_LMTree
    __del__ = lambda self: None
    m_nGram = _swig_property(_ppLMToolKit.LMTree_m_nGram_get, _ppLMToolKit.
        LMTree_m_nGram_set)
    m_nNodeNum = _swig_property(_ppLMToolKit.LMTree_m_nNodeNum_get,
        _ppLMToolKit.LMTree_m_nNodeNum_set)
    m_nLastLySt = _swig_property(_ppLMToolKit.LMTree_m_nLastLySt_get,
        _ppLMToolKit.LMTree_m_nLastLySt_set)
    m_nLastLyStMul3 = _swig_property(_ppLMToolKit.
        LMTree_m_nLastLyStMul3_get, _ppLMToolKit.LMTree_m_nLastLyStMul3_set)
    m_nLyStNodeIdVec = _swig_property(_ppLMToolKit.
        LMTree_m_nLyStNodeIdVec_get, _ppLMToolKit.LMTree_m_nLyStNodeIdVec_set)

    def clear(self):
        return _ppLMToolKit.LMTree_clear(self)

    def setNgram(self, inNgram):
        return _ppLMToolKit.LMTree_setNgram(self, inNgram)

    def IsEmpty(self):
        return _ppLMToolKit.LMTree_IsEmpty(self)

    def Init(self, inNgram):
        return _ppLMToolKit.LMTree_Init(self, inNgram)

    def ShrinkMem(self):
        return _ppLMToolKit.LMTree_ShrinkMem(self)

    def GetMemPtr(self):
        return _ppLMToolKit.LMTree_GetMemPtr(self)

    def getStrSize(self):
        return _ppLMToolKit.LMTree_getStrSize(self)

    def getStr(self, pAllocedMem):
        return _ppLMToolKit.LMTree_getStr(self, pAllocedMem)

    def setStr(self, pIndata, stIdx, inOwner):
        return _ppLMToolKit.LMTree_setStr(self, pIndata, stIdx, inOwner)

    def index(self, ii):
        return _ppLMToolKit.LMTree_index(self, ii)

    def resizeMem(self, nNewSize):
        return _ppLMToolKit.LMTree_resizeMem(self, nNewSize)

    def InsertMemNode(self, *args):
        return _ppLMToolKit.LMTree_InsertMemNode(self, *args)


<mask token>


class LMAdaptTree(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    __repr__ = _swig_repr
    m_nGram = _swig_property(_ppLMToolKit.LMAdaptTree_m_nGram_get,
        _ppLMToolKit.LMAdaptTree_m_nGram_set)
    m_nLyStNodeIdVec = _swig_property(_ppLMToolKit.
        LMAdaptTree_m_nLyStNodeIdVec_get, _ppLMToolKit.
        LMAdaptTree_m_nLyStNodeIdVec_set)

    def __init__(self, inNgram=5):
        this = _ppLMToolKit.new_LMAdaptTree(inNgram)
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_LMAdaptTree
    __del__ = lambda self: None

    def ClearMem(self):
        return _ppLMToolKit.LMAdaptTree_ClearMem(self)

    def PrintTree(self):
        return _ppLMToolKit.LMAdaptTree_PrintTree(self)

    def UpdateCountArray(self, count):
        return _ppLMToolKit.LMAdaptTree_UpdateCountArray(self, count)

    def ComputeCutOffValue(self, mult):
        return _ppLMToolKit.LMAdaptTree_ComputeCutOffValue(self, mult)

    def PrunLastLayer(self, cut_off, flagArray):
        return _ppLMToolKit.LMAdaptTree_PrunLastLayer(self, cut_off, flagArray)

    def UpdateMidLayerFlag(self, flagArray):
        return _ppLMToolKit.LMAdaptTree_UpdateMidLayerFlag(self, flagArray)

    def CheckMemNeed(self, cutNum):
        return _ppLMToolKit.LMAdaptTree_CheckMemNeed(self, cutNum)

    def RebuildPrunTree(self, flagArray):
        return _ppLMToolKit.LMAdaptTree_RebuildPrunTree(self, flagArray)

    def TreePrunUsingCount(self):
        return _ppLMToolKit.LMAdaptTree_TreePrunUsingCount(self)

    def Init(self, inNgram):
        return _ppLMToolKit.LMAdaptTree_Init(self, inNgram)

    def setNgram(self, inNgram):
        return _ppLMToolKit.LMAdaptTree_setNgram(self, inNgram)

    def Clear(self):
        return _ppLMToolKit.LMAdaptTree_Clear(self)

    def IsEmpty(self):
        return _ppLMToolKit.LMAdaptTree_IsEmpty(self)

    def ShrinkMem(self):
        return _ppLMToolKit.LMAdaptTree_ShrinkMem(self)

    def MergeTree(self, cTree1, cTree2, nMaxMemForTreePrun):
        return _ppLMToolKit.LMAdaptTree_MergeTree(self, cTree1, cTree2,
            nMaxMemForTreePrun)

    def GetStrSize(self):
        return _ppLMToolKit.LMAdaptTree_GetStrSize(self)

    def GetStr(self, pAllocedMem):
        return _ppLMToolKit.LMAdaptTree_GetStr(self, pAllocedMem)

    def SetStr(self, pIndata, nLen, inOwner):
        return _ppLMToolKit.LMAdaptTree_SetStr(self, pIndata, nLen, inOwner)

    def index(self, ii):
        return _ppLMToolKit.LMAdaptTree_index(self, ii)

    def FindNodeIdx(self, wordid, order):
        return _ppLMToolKit.LMAdaptTree_FindNodeIdx(self, wordid, order)

    def SortLast2LyTree(self, nNodeIdx, long_wordVec, CountVec, SeqVec):
        return _ppLMToolKit.LMAdaptTree_SortLast2LyTree(self, nNodeIdx,
            long_wordVec, CountVec, SeqVec)


<mask token>


class CWordIndex(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    __repr__ = _swig_repr
    nWordId = _swig_property(_ppLMToolKit.CWordIndex_nWordId_get,
        _ppLMToolKit.CWordIndex_nWordId_set)
    stIdx = _swig_property(_ppLMToolKit.CWordIndex_stIdx_get, _ppLMToolKit.
        CWordIndex_stIdx_set)
    edIdx = _swig_property(_ppLMToolKit.CWordIndex_edIdx_get, _ppLMToolKit.
        CWordIndex_edIdx_set)

    def __eq__(self, curWdIdx):
        return _ppLMToolKit.CWordIndex___eq__(self, curWdIdx)

    def __init__(self):
        this = _ppLMToolKit.new_CWordIndex()
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_CWordIndex
    __del__ = lambda self: None


<mask token>


class TwoIntTuple(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    __repr__ = _swig_repr
    A = _swig_property(_ppLMToolKit.TwoIntTuple_A_get, _ppLMToolKit.
        TwoIntTuple_A_set)

    def __init__(self, *args):
        this = _ppLMToolKit.new_TwoIntTuple(*args)
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_TwoIntTuple
    __del__ = lambda self: None


<mask token>


class BuildCorpusIndex(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self):
        this = _ppLMToolKit.new_BuildCorpusIndex()
        try:
            self.this.append(this)
        except:
            self.this = this

    def ClearMem(self):
        return _ppLMToolKit.BuildCorpusIndex_ClearMem(self)
    __swig_destroy__ = _ppLMToolKit.delete_BuildCorpusIndex
    __del__ = lambda self: None
    m_lex = _swig_property(_ppLMToolKit.BuildCorpusIndex_m_lex_get,
        _ppLMToolKit.BuildCorpusIndex_m_lex_set)
    m_corpusVec = _swig_property(_ppLMToolKit.
        BuildCorpusIndex_m_corpusVec_get, _ppLMToolKit.
        BuildCorpusIndex_m_corpusVec_set)
    m_SenWtVec = _swig_property(_ppLMToolKit.
        BuildCorpusIndex_m_SenWtVec_get, _ppLMToolKit.
        BuildCorpusIndex_m_SenWtVec_set)
    m_cpusSortIdx = _swig_property(_ppLMToolKit.
        BuildCorpusIndex_m_cpusSortIdx_get, _ppLMToolKit.
        BuildCorpusIndex_m_cpusSortIdx_set)
    m_SenPosVec = _swig_property(_ppLMToolKit.
        BuildCorpusIndex_m_SenPosVec_get, _ppLMToolKit.
        BuildCorpusIndex_m_SenPosVec_set)
    m_poswtPairVec = _swig_property(_ppLMToolKit.
        BuildCorpusIndex_m_poswtPairVec_get, _ppLMToolKit.
        BuildCorpusIndex_m_poswtPairVec_set)

    def LoadLexicon(self, lexFileName):
        return _ppLMToolKit.BuildCorpusIndex_LoadLexicon(self, lexFileName)

    def BuildIndex4Corpus(self):
        return _ppLMToolKit.BuildCorpusIndex_BuildIndex4Corpus(self)

    def ReleaseMemory(self):
        return _ppLMToolKit.BuildCorpusIndex_ReleaseMemory(self)

    def AnalysisCorpus(self, corpusFileName):
        return _ppLMToolKit.BuildCorpusIndex_AnalysisCorpus(self,
            corpusFileName)

    def AnalysisCorpus_SenWt(self, corpusFileName):
        return _ppLMToolKit.BuildCorpusIndex_AnalysisCorpus_SenWt(self,
            corpusFileName)

    def ExtractNGramTree(self, nGram, wordSt, wordEd):
        return _ppLMToolKit.BuildCorpusIndex_ExtractNGramTree(self, nGram,
            wordSt, wordEd)

    def ExtractNGramTree_SenWt(self, nGram, wordSt, wordEd):
        return _ppLMToolKit.BuildCorpusIndex_ExtractNGramTree_SenWt(self,
            nGram, wordSt, wordEd)

    def GetTreeContent(self, pTreeAddr, nTreeSize):
        return _ppLMToolKit.BuildCorpusIndex_GetTreeContent(self, pTreeAddr,
            nTreeSize)


<mask token>


class CPPMixLM(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self):
        this = _ppLMToolKit.new_CPPMixLM()
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_CPPMixLM
    __del__ = lambda self: None

    def Init(self, szLexName, order, nBlockSize, nLmVersion):
        return _ppLMToolKit.CPPMixLM_Init(self, szLexName, order,
            nBlockSize, nLmVersion)

    def Mix(self, inLm1Name, inLm2Name, lm2Weight, outLmName, nLmVersion):
        return _ppLMToolKit.CPPMixLM_Mix(self, inLm1Name, inLm2Name,
            lm2Weight, outLmName, nLmVersion)

    def MixV0(self, inLm1Name, inLm2Name, lm2Weight, outLmName):
        return _ppLMToolKit.CPPMixLM_MixV0(self, inLm1Name, inLm2Name,
            lm2Weight, outLmName)

    def MixV1(self, inLm1Name, inLm2Name, lm2Weight, outLmName):
        return _ppLMToolKit.CPPMixLM_MixV1(self, inLm1Name, inLm2Name,
            lm2Weight, outLmName)


<mask token>


class CLMInvert(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self, nGramOrder, threadNum, tmpPath, nBlockSize, fDftBow):
        this = _ppLMToolKit.new_CLMInvert(nGramOrder, threadNum, tmpPath,
            nBlockSize, fDftBow)
        try:
            self.this.append(this)
        except:
            self.this = this

    def InvertLM(self, szOutLMFileName, needWriteArpa):
        return _ppLMToolKit.CLMInvert_InvertLM(self, szOutLMFileName,
            needWriteArpa)

    def LoadLexicon(self, szLexFile):
        return _ppLMToolKit.CLMInvert_LoadLexicon(self, szLexFile)
    __swig_destroy__ = _ppLMToolKit.delete_CLMInvert
    __del__ = lambda self: None


<mask token>


class CEntropyPrune(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self):
        this = _ppLMToolKit.new_CEntropyPrune()
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_CEntropyPrune
    __del__ = lambda self: None

    def Init(self, szLexName, nLmVersion, nOrder, nBlockSize, szThresholdArr):
        return _ppLMToolKit.CEntropyPrune_Init(self, szLexName, nLmVersion,
            nOrder, nBlockSize, szThresholdArr)

    def Prune(self, infile, outKey, nLmVersion):
        return _ppLMToolKit.CEntropyPrune_Prune(self, infile, outKey,
            nLmVersion)

    def PruneV0(self, infile, outKey):
        return _ppLMToolKit.CEntropyPrune_PruneV0(self, infile, outKey)

    def PruneV1(self, infile, outKey):
        return _ppLMToolKit.CEntropyPrune_PruneV1(self, infile, outKey)


<mask token>


class CConvToFsn(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def Convert(self, lmKey, version):
        return _ppLMToolKit.CConvToFsn_Convert(self, lmKey, version)

    def __init__(self, nGramOrder):
        this = _ppLMToolKit.new_CConvToFsn(nGramOrder)
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_CConvToFsn
    __del__ = lambda self: None


<mask token>


class CEvaluate(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self):
        this = _ppLMToolKit.new_CEvaluate()
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_CEvaluate
    __del__ = lambda self: None

    def Init(self, sznGramOrder, szLmKey, szLexFn, szLmFsn):
        return _ppLMToolKit.CEvaluate_Init(self, sznGramOrder, szLmKey,
            szLexFn, szLmFsn)

    def ComputePPL(self, szFile, szOutFile):
        return _ppLMToolKit.CEvaluate_ComputePPL(self, szFile, szOutFile)


<mask token>


class CExpandDict(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def ExpandDict(self, szInLm, szOutLm, szInLex, szOutLex, nGramOrder):
        return _ppLMToolKit.CExpandDict_ExpandDict(self, szInLm, szOutLm,
            szInLex, szOutLex, nGramOrder)

    def ExpandDictV1(self, szInLm, szOutLm, szOriLex, szNewLex, nGramOrder):
        return _ppLMToolKit.CExpandDict_ExpandDictV1(self, szInLm, szOutLm,
            szOriLex, szNewLex, nGramOrder)

    def __init__(self):
        this = _ppLMToolKit.new_CExpandDict()
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_CExpandDict
    __del__ = lambda self: None


<mask token>


class CBlockAdapt(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    __repr__ = _swig_repr
    m_nGramOrder = _swig_property(_ppLMToolKit.CBlockAdapt_m_nGramOrder_get,
        _ppLMToolKit.CBlockAdapt_m_nGramOrder_set)
    m_nTreeOrder = _swig_property(_ppLMToolKit.CBlockAdapt_m_nTreeOrder_get,
        _ppLMToolKit.CBlockAdapt_m_nTreeOrder_set)
    m_nBlockNum = _swig_property(_ppLMToolKit.CBlockAdapt_m_nBlockNum_get,
        _ppLMToolKit.CBlockAdapt_m_nBlockNum_set)
    m_nBlockSize = _swig_property(_ppLMToolKit.CBlockAdapt_m_nBlockSize_get,
        _ppLMToolKit.CBlockAdapt_m_nBlockSize_set)
    m_fpIn = _swig_property(_ppLMToolKit.CBlockAdapt_m_fpIn_get,
        _ppLMToolKit.CBlockAdapt_m_fpIn_set)
    m_pProbUnigm = _swig_property(_ppLMToolKit.CBlockAdapt_m_pProbUnigm_get,
        _ppLMToolKit.CBlockAdapt_m_pProbUnigm_set)
    m_pProbBigm = _swig_property(_ppLMToolKit.CBlockAdapt_m_pProbBigm_get,
        _ppLMToolKit.CBlockAdapt_m_pProbBigm_set)
    m_pBackUnigm = _swig_property(_ppLMToolKit.CBlockAdapt_m_pBackUnigm_get,
        _ppLMToolKit.CBlockAdapt_m_pBackUnigm_set)
    m_pBackBigm = _swig_property(_ppLMToolKit.CBlockAdapt_m_pBackBigm_get,
        _ppLMToolKit.CBlockAdapt_m_pBackBigm_set)
    m_nProbUniNum = _swig_property(_ppLMToolKit.
        CBlockAdapt_m_nProbUniNum_get, _ppLMToolKit.
        CBlockAdapt_m_nProbUniNum_set)
    m_nProbBigmNum = _swig_property(_ppLMToolKit.
        CBlockAdapt_m_nProbBigmNum_get, _ppLMToolKit.
        CBlockAdapt_m_nProbBigmNum_set)
    m_ppProbMiNum = _swig_property(_ppLMToolKit.
        CBlockAdapt_m_ppProbMiNum_get, _ppLMToolKit.
        CBlockAdapt_m_ppProbMiNum_set)
    m_pProbFiNum = _swig_property(_ppLMToolKit.CBlockAdapt_m_pProbFiNum_get,
        _ppLMToolKit.CBlockAdapt_m_pProbFiNum_set)
    m_nBackUniNum = _swig_property(_ppLMToolKit.
        CBlockAdapt_m_nBackUniNum_get, _ppLMToolKit.
        CBlockAdapt_m_nBackUniNum_set)
    m_nBackBigmNum = _swig_property(_ppLMToolKit.
        CBlockAdapt_m_nBackBigmNum_get, _ppLMToolKit.
        CBlockAdapt_m_nBackBigmNum_set)
    m_ppBackMiNum = _swig_property(_ppLMToolKit.
        CBlockAdapt_m_ppBackMiNum_get, _ppLMToolKit.
        CBlockAdapt_m_ppBackMiNum_set)
    m_pBackFiNum = _swig_property(_ppLMToolKit.CBlockAdapt_m_pBackFiNum_get,
        _ppLMToolKit.CBlockAdapt_m_pBackFiNum_set)
    m_ppProbOffset = _swig_property(_ppLMToolKit.
        CBlockAdapt_m_ppProbOffset_get, _ppLMToolKit.
        CBlockAdapt_m_ppProbOffset_set)
    m_ppBackOffset = _swig_property(_ppLMToolKit.
        CBlockAdapt_m_ppBackOffset_get, _ppLMToolKit.
        CBlockAdapt_m_ppBackOffset_set)
    m_pOutLmKey = _swig_property(_ppLMToolKit.CBlockAdapt_m_pOutLmKey_get,
        _ppLMToolKit.CBlockAdapt_m_pOutLmKey_set)
    m_nOutBlockNum = _swig_property(_ppLMToolKit.
        CBlockAdapt_m_nOutBlockNum_get, _ppLMToolKit.
        CBlockAdapt_m_nOutBlockNum_set)
    m_nOutBlockSize = _swig_property(_ppLMToolKit.
        CBlockAdapt_m_nOutBlockSize_get, _ppLMToolKit.
        CBlockAdapt_m_nOutBlockSize_set)

    def __init__(self):
        this = _ppLMToolKit.new_CBlockAdapt()
        try:
            self.this.append(this)
        except:
            self.this = this

    def BlockAdapt(self, GramOrder, BlockSize, szLmKey, outLmKey):
        return _ppLMToolKit.CBlockAdapt_BlockAdapt(self, GramOrder,
            BlockSize, szLmKey, outLmKey)
    __swig_destroy__ = _ppLMToolKit.delete_CBlockAdapt
    __del__ = lambda self: None


<mask token>


class CDecreaseDict(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def DecreaseDict(self, szInLm, szOutLm, szInLex, szOutLex, nGramOrder):
        return _ppLMToolKit.CDecreaseDict_DecreaseDict(self, szInLm,
            szOutLm, szInLex, szOutLex, nGramOrder)

    def __init__(self):
        this = _ppLMToolKit.new_CDecreaseDict()
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_CDecreaseDict
    __del__ = lambda self: None


<mask token>


class CArpaToLM(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self):
        this = _ppLMToolKit.new_CArpaToLM()
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_CArpaToLM
    __del__ = lambda self: None

    def Init(self, szLexName, nOrder):
        return _ppLMToolKit.CArpaToLM_Init(self, szLexName, nOrder)

    def Convert(self, infile, outKey):
        return _ppLMToolKit.CArpaToLM_Convert(self, infile, outKey)


<mask token>


class CLMProduce(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self):
        this = _ppLMToolKit.new_CLMProduce()
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_CLMProduce
    __del__ = lambda self: None

    def Init(self, nRealOrder, nGramOrder, strOutputKey, strBaseLm):
        return _ppLMToolKit.CLMProduce_Init(self, nRealOrder, nGramOrder,
            strOutputKey, strBaseLm)

    def UpdateUnigram(self):
        return _ppLMToolKit.CLMProduce_UpdateUnigram(self)

    def RecurProduceNgram(self):
        return _ppLMToolKit.CLMProduce_RecurProduceNgram(self)

    def LoadLexicon(self, lexFn):
        return _ppLMToolKit.CLMProduce_LoadLexicon(self, lexFn)

    def InitWriteResultLM(self, outLMFileName=None):
        return _ppLMToolKit.CLMProduce_InitWriteResultLM(self, outLMFileName)

    def WritePartResultLM(self, outLMFileName=None):
        return _ppLMToolKit.CLMProduce_WritePartResultLM(self, outLMFileName)

    def EndWriteResultLM(self, outLMFileName=None):
        return _ppLMToolKit.CLMProduce_EndWriteResultLM(self, outLMFileName)

    def SetTree(self, *args):
        return _ppLMToolKit.CLMProduce_SetTree(self, *args)

    def ConvertLMFormate(self, nFstLyNdNum):
        return _ppLMToolKit.CLMProduce_ConvertLMFormate(self, nFstLyNdNum)


<mask token>


class intArray(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self, nelements):
        this = _ppLMToolKit.new_intArray(nelements)
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_intArray
    __del__ = lambda self: None

    def __getitem__(self, index):
        return _ppLMToolKit.intArray___getitem__(self, index)

    def __setitem__(self, index, value):
        return _ppLMToolKit.intArray___setitem__(self, index, value)

    def cast(self):
        return _ppLMToolKit.intArray_cast(self)
    frompointer = staticmethod(_ppLMToolKit.intArray_frompointer)


<mask token>


class floatArray(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self, nelements):
        this = _ppLMToolKit.new_floatArray(nelements)
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_floatArray
    __del__ = lambda self: None

    def __getitem__(self, index):
        return _ppLMToolKit.floatArray___getitem__(self, index)

    def __setitem__(self, index, value):
        return _ppLMToolKit.floatArray___setitem__(self, index, value)

    def cast(self):
        return _ppLMToolKit.floatArray_cast(self)
    frompointer = staticmethod(_ppLMToolKit.floatArray_frompointer)


<mask token>


class doubleArray(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self, nelements):
        this = _ppLMToolKit.new_doubleArray(nelements)
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_doubleArray
    __del__ = lambda self: None

    def __getitem__(self, index):
        return _ppLMToolKit.doubleArray___getitem__(self, index)

    def __setitem__(self, index, value):
        return _ppLMToolKit.doubleArray___setitem__(self, index, value)

    def cast(self):
        return _ppLMToolKit.doubleArray_cast(self)
    frompointer = staticmethod(_ppLMToolKit.doubleArray_frompointer)


<mask token>

<mask token>


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:
        object.__setattr__(self, 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_nondynamic(self, class_type, name, static=1):
    if name == 'thisown':
        return self.this.own()
    method = class_type.__swig_getmethods__.get(name, None)
    if method:
        return method(self)
    if not static:
        return object.__getattr__(self, name)
    else:
        raise AttributeError(name)


def _swig_getattr(self, class_type, name):
    return _swig_getattr_nondynamic(self, class_type, name, 0)


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


<mask token>


def _swig_setattr_nondynamic_method(set):

    def set_attr(self, name, value):
        if name == 'thisown':
            return self.this.own(value)
        if hasattr(self, name) or name == 'this':
            set(self, name, value)
        else:
            raise AttributeError('You cannot add attributes to %s' % self)
    return set_attr


<mask token>


class CVector(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self, dimN=0):
        this = _ppLMToolKit.new_CVector(dimN)
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_CVector
    __del__ = lambda self: None

    def __eq__(self, vec):
        return _ppLMToolKit.CVector___eq__(self, vec)

    def resize(self, dimN):
        return _ppLMToolKit.CVector_resize(self, dimN)

    def setConst(self, v):
        return _ppLMToolKit.CVector_setConst(self, v)

    def GetDataPtr(self):
        return _ppLMToolKit.CVector_GetDataPtr(self)

    def GetSize(self):
        return _ppLMToolKit.CVector_GetSize(self)

    def GetMemSize(self):
        return _ppLMToolKit.CVector_GetMemSize(self)

    def __getitem__(self, i):
        return _ppLMToolKit.CVector___getitem__(self, i)

    def __setitem__(self, i, v):
        return _ppLMToolKit.CVector___setitem__(self, i, v)

    def SetOwner(self, inOwner):
        return _ppLMToolKit.CVector_SetOwner(self, inOwner)

    def Read(self, fp):
        return _ppLMToolKit.CVector_Read(self, fp)

    def Write(self, fp):
        return _ppLMToolKit.CVector_Write(self, fp)

    def SetData(self, *args):
        return _ppLMToolKit.CVector_SetData(self, *args)


<mask token>


class SVector(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self, dimN=0):
        this = _ppLMToolKit.new_SVector(dimN)
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_SVector
    __del__ = lambda self: None

    def __eq__(self, vec):
        return _ppLMToolKit.SVector___eq__(self, vec)

    def resize(self, dimN):
        return _ppLMToolKit.SVector_resize(self, dimN)

    def setConst(self, v):
        return _ppLMToolKit.SVector_setConst(self, v)

    def GetDataPtr(self):
        return _ppLMToolKit.SVector_GetDataPtr(self)

    def GetSize(self):
        return _ppLMToolKit.SVector_GetSize(self)

    def GetMemSize(self):
        return _ppLMToolKit.SVector_GetMemSize(self)

    def __getitem__(self, i):
        return _ppLMToolKit.SVector___getitem__(self, i)

    def __setitem__(self, i, v):
        return _ppLMToolKit.SVector___setitem__(self, i, v)

    def SetOwner(self, inOwner):
        return _ppLMToolKit.SVector_SetOwner(self, inOwner)

    def Read(self, fp):
        return _ppLMToolKit.SVector_Read(self, fp)

    def Write(self, fp):
        return _ppLMToolKit.SVector_Write(self, fp)

    def SetData(self, *args):
        return _ppLMToolKit.SVector_SetData(self, *args)


<mask token>


class IVector(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self, dimN=0):
        this = _ppLMToolKit.new_IVector(dimN)
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_IVector
    __del__ = lambda self: None

    def __eq__(self, vec):
        return _ppLMToolKit.IVector___eq__(self, vec)

    def resize(self, dimN):
        return _ppLMToolKit.IVector_resize(self, dimN)

    def setConst(self, v):
        return _ppLMToolKit.IVector_setConst(self, v)

    def GetDataPtr(self):
        return _ppLMToolKit.IVector_GetDataPtr(self)

    def GetSize(self):
        return _ppLMToolKit.IVector_GetSize(self)

    def GetMemSize(self):
        return _ppLMToolKit.IVector_GetMemSize(self)

    def __getitem__(self, i):
        return _ppLMToolKit.IVector___getitem__(self, i)

    def __setitem__(self, i, v):
        return _ppLMToolKit.IVector___setitem__(self, i, v)

    def SetOwner(self, inOwner):
        return _ppLMToolKit.IVector_SetOwner(self, inOwner)

    def Read(self, fp):
        return _ppLMToolKit.IVector_Read(self, fp)

    def Write(self, fp):
        return _ppLMToolKit.IVector_Write(self, fp)

    def SetData(self, *args):
        return _ppLMToolKit.IVector_SetData(self, *args)


<mask token>


class FVector(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self, dimN=0):
        this = _ppLMToolKit.new_FVector(dimN)
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_FVector
    __del__ = lambda self: None

    def __eq__(self, vec):
        return _ppLMToolKit.FVector___eq__(self, vec)

    def resize(self, dimN):
        return _ppLMToolKit.FVector_resize(self, dimN)

    def setConst(self, v):
        return _ppLMToolKit.FVector_setConst(self, v)

    def GetDataPtr(self):
        return _ppLMToolKit.FVector_GetDataPtr(self)

    def GetSize(self):
        return _ppLMToolKit.FVector_GetSize(self)

    def GetMemSize(self):
        return _ppLMToolKit.FVector_GetMemSize(self)

    def __getitem__(self, i):
        return _ppLMToolKit.FVector___getitem__(self, i)

    def __setitem__(self, i, v):
        return _ppLMToolKit.FVector___setitem__(self, i, v)

    def SetOwner(self, inOwner):
        return _ppLMToolKit.FVector_SetOwner(self, inOwner)

    def Read(self, fp):
        return _ppLMToolKit.FVector_Read(self, fp)

    def Write(self, fp):
        return _ppLMToolKit.FVector_Write(self, fp)

    def SetData(self, *args):
        return _ppLMToolKit.FVector_SetData(self, *args)


<mask token>


class DVector(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self, dimN=0):
        this = _ppLMToolKit.new_DVector(dimN)
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_DVector
    __del__ = lambda self: None

    def __eq__(self, vec):
        return _ppLMToolKit.DVector___eq__(self, vec)

    def resize(self, dimN):
        return _ppLMToolKit.DVector_resize(self, dimN)

    def setConst(self, v):
        return _ppLMToolKit.DVector_setConst(self, v)

    def GetDataPtr(self):
        return _ppLMToolKit.DVector_GetDataPtr(self)

    def GetSize(self):
        return _ppLMToolKit.DVector_GetSize(self)

    def GetMemSize(self):
        return _ppLMToolKit.DVector_GetMemSize(self)

    def __getitem__(self, i):
        return _ppLMToolKit.DVector___getitem__(self, i)

    def __setitem__(self, i, v):
        return _ppLMToolKit.DVector___setitem__(self, i, v)

    def SetOwner(self, inOwner):
        return _ppLMToolKit.DVector_SetOwner(self, inOwner)

    def Read(self, fp):
        return _ppLMToolKit.DVector_Read(self, fp)

    def Write(self, fp):
        return _ppLMToolKit.DVector_Write(self, fp)

    def SetData(self, *args):
        return _ppLMToolKit.DVector_SetData(self, *args)


<mask token>


class HashRec(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    __repr__ = _swig_repr
    key = _swig_property(_ppLMToolKit.HashRec_key_get, _ppLMToolKit.
        HashRec_key_set)
    idx = _swig_property(_ppLMToolKit.HashRec_idx_get, _ppLMToolKit.
        HashRec_idx_set)
    next = _swig_property(_ppLMToolKit.HashRec_next_get, _ppLMToolKit.
        HashRec_next_set)

    def __init__(self):
        this = _ppLMToolKit.new_HashRec()
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_HashRec
    __del__ = lambda self: None


<mask token>


class CBinaryStream(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self):
        this = _ppLMToolKit.new_CBinaryStream()
        try:
            self.this.append(this)
        except:
            self.this = this

    def SetData(self, nPdata, nLen):
        return _ppLMToolKit.CBinaryStream_SetData(self, nPdata, nLen)
    __swig_destroy__ = _ppLMToolKit.delete_CBinaryStream
    __del__ = lambda self: None

    def FlowIn(self, pRetData, nSize):
        return _ppLMToolKit.CBinaryStream_FlowIn(self, pRetData, nSize)

    def FlowOut(self, pRetData, nSize):
        return _ppLMToolKit.CBinaryStream_FlowOut(self, pRetData, nSize)

    def setOwer(self, nInOwner):
        return _ppLMToolKit.CBinaryStream_setOwer(self, nInOwner)

    def ClearMem(self):
        return _ppLMToolKit.CBinaryStream_ClearMem(self)

    def clear(self):
        return _ppLMToolKit.CBinaryStream_clear(self)

    def SetPos(self, pos):
        return _ppLMToolKit.CBinaryStream_SetPos(self, pos)

    def getPos(self):
        return _ppLMToolKit.CBinaryStream_getPos(self)

    def getSize(self):
        return _ppLMToolKit.CBinaryStream_getSize(self)

    def getDataPtr(self):
        return _ppLMToolKit.CBinaryStream_getDataPtr(self)


<mask token>


class LMCountCell(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self):
        this = _ppLMToolKit.new_LMCountCell()
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_LMCountCell
    __del__ = lambda self: None
    m_Corpus = _swig_property(_ppLMToolKit.LMCountCell_m_Corpus_get,
        _ppLMToolKit.LMCountCell_m_Corpus_set)
    m_LMTree = _swig_property(_ppLMToolKit.LMCountCell_m_LMTree_get,
        _ppLMToolKit.LMCountCell_m_LMTree_set)
    m_szLexiconFl = _swig_property(_ppLMToolKit.
        LMCountCell_m_szLexiconFl_get, _ppLMToolKit.
        LMCountCell_m_szLexiconFl_set)
    m_szCorpusFl = _swig_property(_ppLMToolKit.LMCountCell_m_szCorpusFl_get,
        _ppLMToolKit.LMCountCell_m_szCorpusFl_set)
    m_curFileAttri = _swig_property(_ppLMToolKit.
        LMCountCell_m_curFileAttri_get, _ppLMToolKit.
        LMCountCell_m_curFileAttri_set)

    def SelfTest(self):
        return _ppLMToolKit.LMCountCell_SelfTest(self)

    def __setstate__(self, szLexFl, szCorpusFl):
        return _ppLMToolKit.LMCountCell___setstate__(self, szLexFl, szCorpusFl)

    def __setstate_SenWt__(self, szLexFl, szCorpusFl):
        return _ppLMToolKit.LMCountCell___setstate_SenWt__(self, szLexFl,
            szCorpusFl)

    def GetCellPyOutput(self, nWordSt, nWordEd, nGram):
        return _ppLMToolKit.LMCountCell_GetCellPyOutput(self, nWordSt,
            nWordEd, nGram)

    def GetCellPyOutput_SenWt(self, nWordSt, nWordEd, nGram):
        return _ppLMToolKit.LMCountCell_GetCellPyOutput_SenWt(self, nWordSt,
            nWordEd, nGram)


<mask token>


class CLMTrain(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self):
        this = _ppLMToolKit.new_CLMTrain()
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_CLMTrain
    __del__ = lambda self: None

    def Init(self, nRealOrder, nGramOrder, szMinCountArr, strOutputKey,
        szMaxCountArr, smooth_type):
        return _ppLMToolKit.CLMTrain_Init(self, nRealOrder, nGramOrder,
            szMinCountArr, strOutputKey, szMaxCountArr, smooth_type)

    def AccuUnigramCounts(self, *args):
        return _ppLMToolKit.CLMTrain_AccuUnigramCounts(self, *args)

    def UpdateUnigram(self):
        return _ppLMToolKit.CLMTrain_UpdateUnigram(self)

    def RecurTrainNgram(self):
        return _ppLMToolKit.CLMTrain_RecurTrainNgram(self)

    def LoadLexicon(self, lexFn):
        return _ppLMToolKit.CLMTrain_LoadLexicon(self, lexFn)

    def StaDiscntState(self, *args):
        return _ppLMToolKit.CLMTrain_StaDiscntState(self, *args)

    def InitialDiscounts(self):
        return _ppLMToolKit.CLMTrain_InitialDiscounts(self)

    def InitWriteResultLM(self, outLMFileName=None, nVersion=0):
        return _ppLMToolKit.CLMTrain_InitWriteResultLM(self, outLMFileName,
            nVersion)

    def WritePartResultLM(self, outLMFileName=None):
        return _ppLMToolKit.CLMTrain_WritePartResultLM(self, outLMFileName)

    def EndWriteResultLM(self, outLMFileName=None):
        return _ppLMToolKit.CLMTrain_EndWriteResultLM(self, outLMFileName)

    def SetTree(self, *args):
        return _ppLMToolKit.CLMTrain_SetTree(self, *args)

    def ConvertLMFormate(self, nFstLyNdNum):
        return _ppLMToolKit.CLMTrain_ConvertLMFormate(self, nFstLyNdNum)

    def SetWeightThreshold(self, threshold, filename):
        return _ppLMToolKit.CLMTrain_SetWeightThreshold(self, threshold,
            filename)

    def SetBlockSize(self, blockSize):
        return _ppLMToolKit.CLMTrain_SetBlockSize(self, blockSize)

    def PrintLM(self, outLMFileName):
        return _ppLMToolKit.CLMTrain_PrintLM(self, outLMFileName)


<mask token>


class FileAttribute(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    __repr__ = _swig_repr
    __swig_destroy__ = _ppLMToolKit.delete_FileAttribute
    __del__ = lambda self: None

    def clear(self):
        return _ppLMToolKit.FileAttribute_clear(self)

    def Write(self, fp):
        return _ppLMToolKit.FileAttribute_Write(self, fp)

    def Read(self, fp):
        return _ppLMToolKit.FileAttribute_Read(self, fp)
    nGram = _swig_property(_ppLMToolKit.FileAttribute_nGram_get,
        _ppLMToolKit.FileAttribute_nGram_set)
    nWm1St = _swig_property(_ppLMToolKit.FileAttribute_nWm1St_get,
        _ppLMToolKit.FileAttribute_nWm1St_set)
    nWm1Ed = _swig_property(_ppLMToolKit.FileAttribute_nWm1Ed_get,
        _ppLMToolKit.FileAttribute_nWm1Ed_set)
    nWm2St = _swig_property(_ppLMToolKit.FileAttribute_nWm2St_get,
        _ppLMToolKit.FileAttribute_nWm2St_set)
    nWm2Ed = _swig_property(_ppLMToolKit.FileAttribute_nWm2Ed_get,
        _ppLMToolKit.FileAttribute_nWm2Ed_set)
    nPieceId = _swig_property(_ppLMToolKit.FileAttribute_nPieceId_get,
        _ppLMToolKit.FileAttribute_nPieceId_set)

    def __init__(self, *args):
        this = _ppLMToolKit.new_FileAttribute(*args)
        try:
            self.this.append(this)
        except:
            self.this = this

    def Init(self, inFile, lFileLen):
        return _ppLMToolKit.FileAttribute_Init(self, inFile, lFileLen)

    def __eq__(self, f):
        return _ppLMToolKit.FileAttribute___eq__(self, f)

    def CalKey(self):
        return _ppLMToolKit.FileAttribute_CalKey(self)

    def GetStr(self, pStr):
        return _ppLMToolKit.FileAttribute_GetStr(self, pStr)

    def GetMemSize(self):
        return _ppLMToolKit.FileAttribute_GetMemSize(self)


<mask token>


class MemFile(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    cAttri = _swig_property(_ppLMToolKit.MemFile_cAttri_get, _ppLMToolKit.
        MemFile_cAttri_set)
    content = _swig_property(_ppLMToolKit.MemFile_content_get, _ppLMToolKit
        .MemFile_content_set)
    m_nMaxMemForTreePrun = _swig_property(_ppLMToolKit.
        MemFile_m_nMaxMemForTreePrun_get, _ppLMToolKit.
        MemFile_m_nMaxMemForTreePrun_set)

    def __init__(self, *args):
        this = _ppLMToolKit.new_MemFile(*args)
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_MemFile
    __del__ = lambda self: None

    def CalKey(self):
        return _ppLMToolKit.MemFile_CalKey(self)

    def __eq__(self, f):
        return _ppLMToolKit.MemFile___eq__(self, f)

    def __repr__(self):
        return _ppLMToolKit.MemFile___repr__(self)

    def Init(self, *args):
        return _ppLMToolKit.MemFile_Init(self, *args)

    def merge(self, *args):
        return _ppLMToolKit.MemFile_merge(self, *args)

    def write(self, szOutFile):
        return _ppLMToolKit.MemFile_write(self, szOutFile)

    def read(self, szInFile):
        return _ppLMToolKit.MemFile_read(self, szInFile)

    def clear(self):
        return _ppLMToolKit.MemFile_clear(self)


<mask token>


class LMTree(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self, inNgram=5):
        this = _ppLMToolKit.new_LMTree(inNgram)
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_LMTree
    __del__ = lambda self: None
    m_nGram = _swig_property(_ppLMToolKit.LMTree_m_nGram_get, _ppLMToolKit.
        LMTree_m_nGram_set)
    m_nNodeNum = _swig_property(_ppLMToolKit.LMTree_m_nNodeNum_get,
        _ppLMToolKit.LMTree_m_nNodeNum_set)
    m_nLastLySt = _swig_property(_ppLMToolKit.LMTree_m_nLastLySt_get,
        _ppLMToolKit.LMTree_m_nLastLySt_set)
    m_nLastLyStMul3 = _swig_property(_ppLMToolKit.
        LMTree_m_nLastLyStMul3_get, _ppLMToolKit.LMTree_m_nLastLyStMul3_set)
    m_nLyStNodeIdVec = _swig_property(_ppLMToolKit.
        LMTree_m_nLyStNodeIdVec_get, _ppLMToolKit.LMTree_m_nLyStNodeIdVec_set)

    def clear(self):
        return _ppLMToolKit.LMTree_clear(self)

    def setNgram(self, inNgram):
        return _ppLMToolKit.LMTree_setNgram(self, inNgram)

    def IsEmpty(self):
        return _ppLMToolKit.LMTree_IsEmpty(self)

    def Init(self, inNgram):
        return _ppLMToolKit.LMTree_Init(self, inNgram)

    def ShrinkMem(self):
        return _ppLMToolKit.LMTree_ShrinkMem(self)

    def GetMemPtr(self):
        return _ppLMToolKit.LMTree_GetMemPtr(self)

    def getStrSize(self):
        return _ppLMToolKit.LMTree_getStrSize(self)

    def getStr(self, pAllocedMem):
        return _ppLMToolKit.LMTree_getStr(self, pAllocedMem)

    def setStr(self, pIndata, stIdx, inOwner):
        return _ppLMToolKit.LMTree_setStr(self, pIndata, stIdx, inOwner)

    def index(self, ii):
        return _ppLMToolKit.LMTree_index(self, ii)

    def resizeMem(self, nNewSize):
        return _ppLMToolKit.LMTree_resizeMem(self, nNewSize)

    def InsertMemNode(self, *args):
        return _ppLMToolKit.LMTree_InsertMemNode(self, *args)


<mask token>


class LMAdaptTree(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    __repr__ = _swig_repr
    m_nGram = _swig_property(_ppLMToolKit.LMAdaptTree_m_nGram_get,
        _ppLMToolKit.LMAdaptTree_m_nGram_set)
    m_nLyStNodeIdVec = _swig_property(_ppLMToolKit.
        LMAdaptTree_m_nLyStNodeIdVec_get, _ppLMToolKit.
        LMAdaptTree_m_nLyStNodeIdVec_set)

    def __init__(self, inNgram=5):
        this = _ppLMToolKit.new_LMAdaptTree(inNgram)
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_LMAdaptTree
    __del__ = lambda self: None

    def ClearMem(self):
        return _ppLMToolKit.LMAdaptTree_ClearMem(self)

    def PrintTree(self):
        return _ppLMToolKit.LMAdaptTree_PrintTree(self)

    def UpdateCountArray(self, count):
        return _ppLMToolKit.LMAdaptTree_UpdateCountArray(self, count)

    def ComputeCutOffValue(self, mult):
        return _ppLMToolKit.LMAdaptTree_ComputeCutOffValue(self, mult)

    def PrunLastLayer(self, cut_off, flagArray):
        return _ppLMToolKit.LMAdaptTree_PrunLastLayer(self, cut_off, flagArray)

    def UpdateMidLayerFlag(self, flagArray):
        return _ppLMToolKit.LMAdaptTree_UpdateMidLayerFlag(self, flagArray)

    def CheckMemNeed(self, cutNum):
        return _ppLMToolKit.LMAdaptTree_CheckMemNeed(self, cutNum)

    def RebuildPrunTree(self, flagArray):
        return _ppLMToolKit.LMAdaptTree_RebuildPrunTree(self, flagArray)

    def TreePrunUsingCount(self):
        return _ppLMToolKit.LMAdaptTree_TreePrunUsingCount(self)

    def Init(self, inNgram):
        return _ppLMToolKit.LMAdaptTree_Init(self, inNgram)

    def setNgram(self, inNgram):
        return _ppLMToolKit.LMAdaptTree_setNgram(self, inNgram)

    def Clear(self):
        return _ppLMToolKit.LMAdaptTree_Clear(self)

    def IsEmpty(self):
        return _ppLMToolKit.LMAdaptTree_IsEmpty(self)

    def ShrinkMem(self):
        return _ppLMToolKit.LMAdaptTree_ShrinkMem(self)

    def MergeTree(self, cTree1, cTree2, nMaxMemForTreePrun):
        return _ppLMToolKit.LMAdaptTree_MergeTree(self, cTree1, cTree2,
            nMaxMemForTreePrun)

    def GetStrSize(self):
        return _ppLMToolKit.LMAdaptTree_GetStrSize(self)

    def GetStr(self, pAllocedMem):
        return _ppLMToolKit.LMAdaptTree_GetStr(self, pAllocedMem)

    def SetStr(self, pIndata, nLen, inOwner):
        return _ppLMToolKit.LMAdaptTree_SetStr(self, pIndata, nLen, inOwner)

    def index(self, ii):
        return _ppLMToolKit.LMAdaptTree_index(self, ii)

    def FindNodeIdx(self, wordid, order):
        return _ppLMToolKit.LMAdaptTree_FindNodeIdx(self, wordid, order)

    def SortLast2LyTree(self, nNodeIdx, long_wordVec, CountVec, SeqVec):
        return _ppLMToolKit.LMAdaptTree_SortLast2LyTree(self, nNodeIdx,
            long_wordVec, CountVec, SeqVec)


<mask token>


class CWordIndex(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    __repr__ = _swig_repr
    nWordId = _swig_property(_ppLMToolKit.CWordIndex_nWordId_get,
        _ppLMToolKit.CWordIndex_nWordId_set)
    stIdx = _swig_property(_ppLMToolKit.CWordIndex_stIdx_get, _ppLMToolKit.
        CWordIndex_stIdx_set)
    edIdx = _swig_property(_ppLMToolKit.CWordIndex_edIdx_get, _ppLMToolKit.
        CWordIndex_edIdx_set)

    def __eq__(self, curWdIdx):
        return _ppLMToolKit.CWordIndex___eq__(self, curWdIdx)

    def __init__(self):
        this = _ppLMToolKit.new_CWordIndex()
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_CWordIndex
    __del__ = lambda self: None


<mask token>


class TwoIntTuple(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    __repr__ = _swig_repr
    A = _swig_property(_ppLMToolKit.TwoIntTuple_A_get, _ppLMToolKit.
        TwoIntTuple_A_set)

    def __init__(self, *args):
        this = _ppLMToolKit.new_TwoIntTuple(*args)
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_TwoIntTuple
    __del__ = lambda self: None


<mask token>


class BuildCorpusIndex(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self):
        this = _ppLMToolKit.new_BuildCorpusIndex()
        try:
            self.this.append(this)
        except:
            self.this = this

    def ClearMem(self):
        return _ppLMToolKit.BuildCorpusIndex_ClearMem(self)
    __swig_destroy__ = _ppLMToolKit.delete_BuildCorpusIndex
    __del__ = lambda self: None
    m_lex = _swig_property(_ppLMToolKit.BuildCorpusIndex_m_lex_get,
        _ppLMToolKit.BuildCorpusIndex_m_lex_set)
    m_corpusVec = _swig_property(_ppLMToolKit.
        BuildCorpusIndex_m_corpusVec_get, _ppLMToolKit.
        BuildCorpusIndex_m_corpusVec_set)
    m_SenWtVec = _swig_property(_ppLMToolKit.
        BuildCorpusIndex_m_SenWtVec_get, _ppLMToolKit.
        BuildCorpusIndex_m_SenWtVec_set)
    m_cpusSortIdx = _swig_property(_ppLMToolKit.
        BuildCorpusIndex_m_cpusSortIdx_get, _ppLMToolKit.
        BuildCorpusIndex_m_cpusSortIdx_set)
    m_SenPosVec = _swig_property(_ppLMToolKit.
        BuildCorpusIndex_m_SenPosVec_get, _ppLMToolKit.
        BuildCorpusIndex_m_SenPosVec_set)
    m_poswtPairVec = _swig_property(_ppLMToolKit.
        BuildCorpusIndex_m_poswtPairVec_get, _ppLMToolKit.
        BuildCorpusIndex_m_poswtPairVec_set)

    def LoadLexicon(self, lexFileName):
        return _ppLMToolKit.BuildCorpusIndex_LoadLexicon(self, lexFileName)

    def BuildIndex4Corpus(self):
        return _ppLMToolKit.BuildCorpusIndex_BuildIndex4Corpus(self)

    def ReleaseMemory(self):
        return _ppLMToolKit.BuildCorpusIndex_ReleaseMemory(self)

    def AnalysisCorpus(self, corpusFileName):
        return _ppLMToolKit.BuildCorpusIndex_AnalysisCorpus(self,
            corpusFileName)

    def AnalysisCorpus_SenWt(self, corpusFileName):
        return _ppLMToolKit.BuildCorpusIndex_AnalysisCorpus_SenWt(self,
            corpusFileName)

    def ExtractNGramTree(self, nGram, wordSt, wordEd):
        return _ppLMToolKit.BuildCorpusIndex_ExtractNGramTree(self, nGram,
            wordSt, wordEd)

    def ExtractNGramTree_SenWt(self, nGram, wordSt, wordEd):
        return _ppLMToolKit.BuildCorpusIndex_ExtractNGramTree_SenWt(self,
            nGram, wordSt, wordEd)

    def GetTreeContent(self, pTreeAddr, nTreeSize):
        return _ppLMToolKit.BuildCorpusIndex_GetTreeContent(self, pTreeAddr,
            nTreeSize)


<mask token>


class CPPMixLM(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self):
        this = _ppLMToolKit.new_CPPMixLM()
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_CPPMixLM
    __del__ = lambda self: None

    def Init(self, szLexName, order, nBlockSize, nLmVersion):
        return _ppLMToolKit.CPPMixLM_Init(self, szLexName, order,
            nBlockSize, nLmVersion)

    def Mix(self, inLm1Name, inLm2Name, lm2Weight, outLmName, nLmVersion):
        return _ppLMToolKit.CPPMixLM_Mix(self, inLm1Name, inLm2Name,
            lm2Weight, outLmName, nLmVersion)

    def MixV0(self, inLm1Name, inLm2Name, lm2Weight, outLmName):
        return _ppLMToolKit.CPPMixLM_MixV0(self, inLm1Name, inLm2Name,
            lm2Weight, outLmName)

    def MixV1(self, inLm1Name, inLm2Name, lm2Weight, outLmName):
        return _ppLMToolKit.CPPMixLM_MixV1(self, inLm1Name, inLm2Name,
            lm2Weight, outLmName)


<mask token>


class CLMInvert(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self, nGramOrder, threadNum, tmpPath, nBlockSize, fDftBow):
        this = _ppLMToolKit.new_CLMInvert(nGramOrder, threadNum, tmpPath,
            nBlockSize, fDftBow)
        try:
            self.this.append(this)
        except:
            self.this = this

    def InvertLM(self, szOutLMFileName, needWriteArpa):
        return _ppLMToolKit.CLMInvert_InvertLM(self, szOutLMFileName,
            needWriteArpa)

    def LoadLexicon(self, szLexFile):
        return _ppLMToolKit.CLMInvert_LoadLexicon(self, szLexFile)
    __swig_destroy__ = _ppLMToolKit.delete_CLMInvert
    __del__ = lambda self: None


<mask token>


class CEntropyPrune(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self):
        this = _ppLMToolKit.new_CEntropyPrune()
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_CEntropyPrune
    __del__ = lambda self: None

    def Init(self, szLexName, nLmVersion, nOrder, nBlockSize, szThresholdArr):
        return _ppLMToolKit.CEntropyPrune_Init(self, szLexName, nLmVersion,
            nOrder, nBlockSize, szThresholdArr)

    def Prune(self, infile, outKey, nLmVersion):
        return _ppLMToolKit.CEntropyPrune_Prune(self, infile, outKey,
            nLmVersion)

    def PruneV0(self, infile, outKey):
        return _ppLMToolKit.CEntropyPrune_PruneV0(self, infile, outKey)

    def PruneV1(self, infile, outKey):
        return _ppLMToolKit.CEntropyPrune_PruneV1(self, infile, outKey)


<mask token>


class CConvToFsn(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def Convert(self, lmKey, version):
        return _ppLMToolKit.CConvToFsn_Convert(self, lmKey, version)

    def __init__(self, nGramOrder):
        this = _ppLMToolKit.new_CConvToFsn(nGramOrder)
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_CConvToFsn
    __del__ = lambda self: None


<mask token>


class CEvaluate(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self):
        this = _ppLMToolKit.new_CEvaluate()
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_CEvaluate
    __del__ = lambda self: None

    def Init(self, sznGramOrder, szLmKey, szLexFn, szLmFsn):
        return _ppLMToolKit.CEvaluate_Init(self, sznGramOrder, szLmKey,
            szLexFn, szLmFsn)

    def ComputePPL(self, szFile, szOutFile):
        return _ppLMToolKit.CEvaluate_ComputePPL(self, szFile, szOutFile)


<mask token>


class CExpandDict(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def ExpandDict(self, szInLm, szOutLm, szInLex, szOutLex, nGramOrder):
        return _ppLMToolKit.CExpandDict_ExpandDict(self, szInLm, szOutLm,
            szInLex, szOutLex, nGramOrder)

    def ExpandDictV1(self, szInLm, szOutLm, szOriLex, szNewLex, nGramOrder):
        return _ppLMToolKit.CExpandDict_ExpandDictV1(self, szInLm, szOutLm,
            szOriLex, szNewLex, nGramOrder)

    def __init__(self):
        this = _ppLMToolKit.new_CExpandDict()
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_CExpandDict
    __del__ = lambda self: None


<mask token>


class CBlockAdapt(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    __repr__ = _swig_repr
    m_nGramOrder = _swig_property(_ppLMToolKit.CBlockAdapt_m_nGramOrder_get,
        _ppLMToolKit.CBlockAdapt_m_nGramOrder_set)
    m_nTreeOrder = _swig_property(_ppLMToolKit.CBlockAdapt_m_nTreeOrder_get,
        _ppLMToolKit.CBlockAdapt_m_nTreeOrder_set)
    m_nBlockNum = _swig_property(_ppLMToolKit.CBlockAdapt_m_nBlockNum_get,
        _ppLMToolKit.CBlockAdapt_m_nBlockNum_set)
    m_nBlockSize = _swig_property(_ppLMToolKit.CBlockAdapt_m_nBlockSize_get,
        _ppLMToolKit.CBlockAdapt_m_nBlockSize_set)
    m_fpIn = _swig_property(_ppLMToolKit.CBlockAdapt_m_fpIn_get,
        _ppLMToolKit.CBlockAdapt_m_fpIn_set)
    m_pProbUnigm = _swig_property(_ppLMToolKit.CBlockAdapt_m_pProbUnigm_get,
        _ppLMToolKit.CBlockAdapt_m_pProbUnigm_set)
    m_pProbBigm = _swig_property(_ppLMToolKit.CBlockAdapt_m_pProbBigm_get,
        _ppLMToolKit.CBlockAdapt_m_pProbBigm_set)
    m_pBackUnigm = _swig_property(_ppLMToolKit.CBlockAdapt_m_pBackUnigm_get,
        _ppLMToolKit.CBlockAdapt_m_pBackUnigm_set)
    m_pBackBigm = _swig_property(_ppLMToolKit.CBlockAdapt_m_pBackBigm_get,
        _ppLMToolKit.CBlockAdapt_m_pBackBigm_set)
    m_nProbUniNum = _swig_property(_ppLMToolKit.
        CBlockAdapt_m_nProbUniNum_get, _ppLMToolKit.
        CBlockAdapt_m_nProbUniNum_set)
    m_nProbBigmNum = _swig_property(_ppLMToolKit.
        CBlockAdapt_m_nProbBigmNum_get, _ppLMToolKit.
        CBlockAdapt_m_nProbBigmNum_set)
    m_ppProbMiNum = _swig_property(_ppLMToolKit.
        CBlockAdapt_m_ppProbMiNum_get, _ppLMToolKit.
        CBlockAdapt_m_ppProbMiNum_set)
    m_pProbFiNum = _swig_property(_ppLMToolKit.CBlockAdapt_m_pProbFiNum_get,
        _ppLMToolKit.CBlockAdapt_m_pProbFiNum_set)
    m_nBackUniNum = _swig_property(_ppLMToolKit.
        CBlockAdapt_m_nBackUniNum_get, _ppLMToolKit.
        CBlockAdapt_m_nBackUniNum_set)
    m_nBackBigmNum = _swig_property(_ppLMToolKit.
        CBlockAdapt_m_nBackBigmNum_get, _ppLMToolKit.
        CBlockAdapt_m_nBackBigmNum_set)
    m_ppBackMiNum = _swig_property(_ppLMToolKit.
        CBlockAdapt_m_ppBackMiNum_get, _ppLMToolKit.
        CBlockAdapt_m_ppBackMiNum_set)
    m_pBackFiNum = _swig_property(_ppLMToolKit.CBlockAdapt_m_pBackFiNum_get,
        _ppLMToolKit.CBlockAdapt_m_pBackFiNum_set)
    m_ppProbOffset = _swig_property(_ppLMToolKit.
        CBlockAdapt_m_ppProbOffset_get, _ppLMToolKit.
        CBlockAdapt_m_ppProbOffset_set)
    m_ppBackOffset = _swig_property(_ppLMToolKit.
        CBlockAdapt_m_ppBackOffset_get, _ppLMToolKit.
        CBlockAdapt_m_ppBackOffset_set)
    m_pOutLmKey = _swig_property(_ppLMToolKit.CBlockAdapt_m_pOutLmKey_get,
        _ppLMToolKit.CBlockAdapt_m_pOutLmKey_set)
    m_nOutBlockNum = _swig_property(_ppLMToolKit.
        CBlockAdapt_m_nOutBlockNum_get, _ppLMToolKit.
        CBlockAdapt_m_nOutBlockNum_set)
    m_nOutBlockSize = _swig_property(_ppLMToolKit.
        CBlockAdapt_m_nOutBlockSize_get, _ppLMToolKit.
        CBlockAdapt_m_nOutBlockSize_set)

    def __init__(self):
        this = _ppLMToolKit.new_CBlockAdapt()
        try:
            self.this.append(this)
        except:
            self.this = this

    def BlockAdapt(self, GramOrder, BlockSize, szLmKey, outLmKey):
        return _ppLMToolKit.CBlockAdapt_BlockAdapt(self, GramOrder,
            BlockSize, szLmKey, outLmKey)
    __swig_destroy__ = _ppLMToolKit.delete_CBlockAdapt
    __del__ = lambda self: None


<mask token>


class CDecreaseDict(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def DecreaseDict(self, szInLm, szOutLm, szInLex, szOutLex, nGramOrder):
        return _ppLMToolKit.CDecreaseDict_DecreaseDict(self, szInLm,
            szOutLm, szInLex, szOutLex, nGramOrder)

    def __init__(self):
        this = _ppLMToolKit.new_CDecreaseDict()
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_CDecreaseDict
    __del__ = lambda self: None


<mask token>


class CArpaToLM(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self):
        this = _ppLMToolKit.new_CArpaToLM()
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_CArpaToLM
    __del__ = lambda self: None

    def Init(self, szLexName, nOrder):
        return _ppLMToolKit.CArpaToLM_Init(self, szLexName, nOrder)

    def Convert(self, infile, outKey):
        return _ppLMToolKit.CArpaToLM_Convert(self, infile, outKey)


<mask token>


class CLMProduce(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self):
        this = _ppLMToolKit.new_CLMProduce()
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_CLMProduce
    __del__ = lambda self: None

    def Init(self, nRealOrder, nGramOrder, strOutputKey, strBaseLm):
        return _ppLMToolKit.CLMProduce_Init(self, nRealOrder, nGramOrder,
            strOutputKey, strBaseLm)

    def UpdateUnigram(self):
        return _ppLMToolKit.CLMProduce_UpdateUnigram(self)

    def RecurProduceNgram(self):
        return _ppLMToolKit.CLMProduce_RecurProduceNgram(self)

    def LoadLexicon(self, lexFn):
        return _ppLMToolKit.CLMProduce_LoadLexicon(self, lexFn)

    def InitWriteResultLM(self, outLMFileName=None):
        return _ppLMToolKit.CLMProduce_InitWriteResultLM(self, outLMFileName)

    def WritePartResultLM(self, outLMFileName=None):
        return _ppLMToolKit.CLMProduce_WritePartResultLM(self, outLMFileName)

    def EndWriteResultLM(self, outLMFileName=None):
        return _ppLMToolKit.CLMProduce_EndWriteResultLM(self, outLMFileName)

    def SetTree(self, *args):
        return _ppLMToolKit.CLMProduce_SetTree(self, *args)

    def ConvertLMFormate(self, nFstLyNdNum):
        return _ppLMToolKit.CLMProduce_ConvertLMFormate(self, nFstLyNdNum)


<mask token>


class intArray(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self, nelements):
        this = _ppLMToolKit.new_intArray(nelements)
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_intArray
    __del__ = lambda self: None

    def __getitem__(self, index):
        return _ppLMToolKit.intArray___getitem__(self, index)

    def __setitem__(self, index, value):
        return _ppLMToolKit.intArray___setitem__(self, index, value)

    def cast(self):
        return _ppLMToolKit.intArray_cast(self)
    frompointer = staticmethod(_ppLMToolKit.intArray_frompointer)


<mask token>


def intArray_frompointer(t):
    return _ppLMToolKit.intArray_frompointer(t)


<mask token>


class floatArray(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self, nelements):
        this = _ppLMToolKit.new_floatArray(nelements)
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_floatArray
    __del__ = lambda self: None

    def __getitem__(self, index):
        return _ppLMToolKit.floatArray___getitem__(self, index)

    def __setitem__(self, index, value):
        return _ppLMToolKit.floatArray___setitem__(self, index, value)

    def cast(self):
        return _ppLMToolKit.floatArray_cast(self)
    frompointer = staticmethod(_ppLMToolKit.floatArray_frompointer)


<mask token>


def floatArray_frompointer(t):
    return _ppLMToolKit.floatArray_frompointer(t)


<mask token>


class doubleArray(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.
        own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self, nelements):
        this = _ppLMToolKit.new_doubleArray(nelements)
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_doubleArray
    __del__ = lambda self: None

    def __getitem__(self, index):
        return _ppLMToolKit.doubleArray___getitem__(self, index)

    def __setitem__(self, index, value):
        return _ppLMToolKit.doubleArray___setitem__(self, index, value)

    def cast(self):
        return _ppLMToolKit.doubleArray_cast(self)
    frompointer = staticmethod(_ppLMToolKit.doubleArray_frompointer)


<mask token>


def doubleArray_frompointer(t):
    return _ppLMToolKit.doubleArray_frompointer(t)


<mask token>

# This file was automatically generated by SWIG (http://www.swig.org).
# Version 3.0.5
#
# 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('_ppLMToolKit', [dirname(__file__)])
        except ImportError:
            import _ppLMToolKit
            return _ppLMToolKit
        if fp is not None:
            try:
                _mod = imp.load_module('_ppLMToolKit', fp, pathname, description)
            finally:
                fp.close()
            return _mod
    _ppLMToolKit = swig_import_helper()
    del swig_import_helper
else:
    import _ppLMToolKit
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):
        object.__setattr__(self, 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_nondynamic(self, class_type, name, static=1):
    if (name == "thisown"):
        return self.this.own()
    method = class_type.__swig_getmethods__.get(name, None)
    if method:
        return method(self)
    if (not static):
        return object.__getattr__(self, name)
    else:
        raise AttributeError(name)

def _swig_getattr(self, class_type, name):
    return _swig_getattr_nondynamic(self, class_type, name, 0)


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



def _swig_setattr_nondynamic_method(set):
    def set_attr(self, name, value):
        if (name == "thisown"):
            return self.this.own(value)
        if hasattr(self, name) or (name == "this"):
            set(self, name, value)
        else:
            raise AttributeError("You cannot add attributes to %s" % self)
    return set_attr



_ppLMToolKit.FLT_MIN_swigconstant(_ppLMToolKit)
FLT_MIN = _ppLMToolKit.FLT_MIN

_ppLMToolKit.FLT_MAX_swigconstant(_ppLMToolKit)
FLT_MAX = _ppLMToolKit.FLT_MAX

_ppLMToolKit.M_LOG10E_swigconstant(_ppLMToolKit)
M_LOG10E = _ppLMToolKit.M_LOG10E

_ppLMToolKit.M_PI_swigconstant(_ppLMToolKit)
M_PI = _ppLMToolKit.M_PI

_ppLMToolKit.FLT_MIN_EXP_swigconstant(_ppLMToolKit)
FLT_MIN_EXP = _ppLMToolKit.FLT_MIN_EXP

_ppLMToolKit.FLT_MAX_EXP_swigconstant(_ppLMToolKit)
FLT_MAX_EXP = _ppLMToolKit.FLT_MAX_EXP

_ppLMToolKit.DBL_MAX_EXP_swigconstant(_ppLMToolKit)
DBL_MAX_EXP = _ppLMToolKit.DBL_MAX_EXP

_ppLMToolKit.UINT_MAX_VALUE_swigconstant(_ppLMToolKit)
UINT_MAX_VALUE = _ppLMToolKit.UINT_MAX_VALUE

_ppLMToolKit.INT_MAX_VALUE_swigconstant(_ppLMToolKit)
INT_MAX_VALUE = _ppLMToolKit.INT_MAX_VALUE

_ppLMToolKit.USHORT_MAX_VALUE_swigconstant(_ppLMToolKit)
USHORT_MAX_VALUE = _ppLMToolKit.USHORT_MAX_VALUE

_ppLMToolKit.QUANT_MAX_VALUE_swigconstant(_ppLMToolKit)
QUANT_MAX_VALUE = _ppLMToolKit.QUANT_MAX_VALUE

_ppLMToolKit.QUANT_MIN_VALUE_swigconstant(_ppLMToolKit)
QUANT_MIN_VALUE = _ppLMToolKit.QUANT_MIN_VALUE

_ppLMToolKit.BACK_LARGE_THRESHOLD_swigconstant(_ppLMToolKit)
BACK_LARGE_THRESHOLD = _ppLMToolKit.BACK_LARGE_THRESHOLD

_ppLMToolKit.BACK_LOW_THRESHOLD_swigconstant(_ppLMToolKit)
BACK_LOW_THRESHOLD = _ppLMToolKit.BACK_LOW_THRESHOLD

_ppLMToolKit.REV_MAGIC_swigconstant(_ppLMToolKit)
REV_MAGIC = _ppLMToolKit.REV_MAGIC

_ppLMToolKit.DSK_MAGIC_swigconstant(_ppLMToolKit)
DSK_MAGIC = _ppLMToolKit.DSK_MAGIC

_ppLMToolKit.POS_MAGIC_swigconstant(_ppLMToolKit)
POS_MAGIC = _ppLMToolKit.POS_MAGIC
class CVector(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self, dimN=0):
        this = _ppLMToolKit.new_CVector(dimN)
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_CVector
    __del__ = lambda self: None

    def __eq__(self, vec):
        return _ppLMToolKit.CVector___eq__(self, vec)

    def resize(self, dimN):
        return _ppLMToolKit.CVector_resize(self, dimN)

    def setConst(self, v):
        return _ppLMToolKit.CVector_setConst(self, v)

    def GetDataPtr(self):
        return _ppLMToolKit.CVector_GetDataPtr(self)

    def GetSize(self):
        return _ppLMToolKit.CVector_GetSize(self)

    def GetMemSize(self):
        return _ppLMToolKit.CVector_GetMemSize(self)

    def __getitem__(self, i):
        return _ppLMToolKit.CVector___getitem__(self, i)

    def __setitem__(self, i, v):
        return _ppLMToolKit.CVector___setitem__(self, i, v)

    def SetOwner(self, inOwner):
        return _ppLMToolKit.CVector_SetOwner(self, inOwner)

    def Read(self, fp):
        return _ppLMToolKit.CVector_Read(self, fp)

    def Write(self, fp):
        return _ppLMToolKit.CVector_Write(self, fp)

    def SetData(self, *args):
        return _ppLMToolKit.CVector_SetData(self, *args)
CVector_swigregister = _ppLMToolKit.CVector_swigregister
CVector_swigregister(CVector)
cvar = _ppLMToolKit.cvar
ULONG_MAX_VALUE = cvar.ULONG_MAX_VALUE
MAX_TOTCOUNT = cvar.MAX_TOTCOUNT
MAX_COUNT = cvar.MAX_COUNT
BAD_WID = cvar.BAD_WID
BAD_GID = cvar.BAD_GID
PROB_EPSILON = cvar.PROB_EPSILON
LOG_ZERO = cvar.LOG_ZERO
MAX_ORDER = cvar.MAX_ORDER
MIN_ORDER = cvar.MIN_ORDER
LN_10 = cvar.LN_10
MAX_PATH_LEN = cvar.MAX_PATH_LEN
MAX_TEXT_LEN = cvar.MAX_TEXT_LEN
MAX_WORD_LEN = cvar.MAX_WORD_LEN
MAX_WNUM_ONE_LINE = cvar.MAX_WNUM_ONE_LINE
INIT_CORPUS_SIZE = cvar.INIT_CORPUS_SIZE
RET_ERROR = cvar.RET_ERROR
RET_OK = cvar.RET_OK
RET_NOT_FOUND = cvar.RET_NOT_FOUND
ERR_THROW = cvar.ERR_THROW
DEFAULT_CUTOFF_ARR = cvar.DEFAULT_CUTOFF_ARR
DEFAULT_MAXCNT_ARR = cvar.DEFAULT_MAXCNT_ARR
SENT_START_STR = cvar.SENT_START_STR
SENT_END_STR = cvar.SENT_END_STR
UNK_STR = cvar.UNK_STR
FILE_IO_BUFFER = cvar.FILE_IO_BUFFER

class SVector(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self, dimN=0):
        this = _ppLMToolKit.new_SVector(dimN)
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_SVector
    __del__ = lambda self: None

    def __eq__(self, vec):
        return _ppLMToolKit.SVector___eq__(self, vec)

    def resize(self, dimN):
        return _ppLMToolKit.SVector_resize(self, dimN)

    def setConst(self, v):
        return _ppLMToolKit.SVector_setConst(self, v)

    def GetDataPtr(self):
        return _ppLMToolKit.SVector_GetDataPtr(self)

    def GetSize(self):
        return _ppLMToolKit.SVector_GetSize(self)

    def GetMemSize(self):
        return _ppLMToolKit.SVector_GetMemSize(self)

    def __getitem__(self, i):
        return _ppLMToolKit.SVector___getitem__(self, i)

    def __setitem__(self, i, v):
        return _ppLMToolKit.SVector___setitem__(self, i, v)

    def SetOwner(self, inOwner):
        return _ppLMToolKit.SVector_SetOwner(self, inOwner)

    def Read(self, fp):
        return _ppLMToolKit.SVector_Read(self, fp)

    def Write(self, fp):
        return _ppLMToolKit.SVector_Write(self, fp)

    def SetData(self, *args):
        return _ppLMToolKit.SVector_SetData(self, *args)
SVector_swigregister = _ppLMToolKit.SVector_swigregister
SVector_swigregister(SVector)

class IVector(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self, dimN=0):
        this = _ppLMToolKit.new_IVector(dimN)
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_IVector
    __del__ = lambda self: None

    def __eq__(self, vec):
        return _ppLMToolKit.IVector___eq__(self, vec)

    def resize(self, dimN):
        return _ppLMToolKit.IVector_resize(self, dimN)

    def setConst(self, v):
        return _ppLMToolKit.IVector_setConst(self, v)

    def GetDataPtr(self):
        return _ppLMToolKit.IVector_GetDataPtr(self)

    def GetSize(self):
        return _ppLMToolKit.IVector_GetSize(self)

    def GetMemSize(self):
        return _ppLMToolKit.IVector_GetMemSize(self)

    def __getitem__(self, i):
        return _ppLMToolKit.IVector___getitem__(self, i)

    def __setitem__(self, i, v):
        return _ppLMToolKit.IVector___setitem__(self, i, v)

    def SetOwner(self, inOwner):
        return _ppLMToolKit.IVector_SetOwner(self, inOwner)

    def Read(self, fp):
        return _ppLMToolKit.IVector_Read(self, fp)

    def Write(self, fp):
        return _ppLMToolKit.IVector_Write(self, fp)

    def SetData(self, *args):
        return _ppLMToolKit.IVector_SetData(self, *args)
IVector_swigregister = _ppLMToolKit.IVector_swigregister
IVector_swigregister(IVector)

class FVector(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self, dimN=0):
        this = _ppLMToolKit.new_FVector(dimN)
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_FVector
    __del__ = lambda self: None

    def __eq__(self, vec):
        return _ppLMToolKit.FVector___eq__(self, vec)

    def resize(self, dimN):
        return _ppLMToolKit.FVector_resize(self, dimN)

    def setConst(self, v):
        return _ppLMToolKit.FVector_setConst(self, v)

    def GetDataPtr(self):
        return _ppLMToolKit.FVector_GetDataPtr(self)

    def GetSize(self):
        return _ppLMToolKit.FVector_GetSize(self)

    def GetMemSize(self):
        return _ppLMToolKit.FVector_GetMemSize(self)

    def __getitem__(self, i):
        return _ppLMToolKit.FVector___getitem__(self, i)

    def __setitem__(self, i, v):
        return _ppLMToolKit.FVector___setitem__(self, i, v)

    def SetOwner(self, inOwner):
        return _ppLMToolKit.FVector_SetOwner(self, inOwner)

    def Read(self, fp):
        return _ppLMToolKit.FVector_Read(self, fp)

    def Write(self, fp):
        return _ppLMToolKit.FVector_Write(self, fp)

    def SetData(self, *args):
        return _ppLMToolKit.FVector_SetData(self, *args)
FVector_swigregister = _ppLMToolKit.FVector_swigregister
FVector_swigregister(FVector)

class DVector(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self, dimN=0):
        this = _ppLMToolKit.new_DVector(dimN)
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_DVector
    __del__ = lambda self: None

    def __eq__(self, vec):
        return _ppLMToolKit.DVector___eq__(self, vec)

    def resize(self, dimN):
        return _ppLMToolKit.DVector_resize(self, dimN)

    def setConst(self, v):
        return _ppLMToolKit.DVector_setConst(self, v)

    def GetDataPtr(self):
        return _ppLMToolKit.DVector_GetDataPtr(self)

    def GetSize(self):
        return _ppLMToolKit.DVector_GetSize(self)

    def GetMemSize(self):
        return _ppLMToolKit.DVector_GetMemSize(self)

    def __getitem__(self, i):
        return _ppLMToolKit.DVector___getitem__(self, i)

    def __setitem__(self, i, v):
        return _ppLMToolKit.DVector___setitem__(self, i, v)

    def SetOwner(self, inOwner):
        return _ppLMToolKit.DVector_SetOwner(self, inOwner)

    def Read(self, fp):
        return _ppLMToolKit.DVector_Read(self, fp)

    def Write(self, fp):
        return _ppLMToolKit.DVector_Write(self, fp)

    def SetData(self, *args):
        return _ppLMToolKit.DVector_SetData(self, *args)
DVector_swigregister = _ppLMToolKit.DVector_swigregister
DVector_swigregister(DVector)

class HashRec(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
    __repr__ = _swig_repr
    key = _swig_property(_ppLMToolKit.HashRec_key_get, _ppLMToolKit.HashRec_key_set)
    idx = _swig_property(_ppLMToolKit.HashRec_idx_get, _ppLMToolKit.HashRec_idx_set)
    next = _swig_property(_ppLMToolKit.HashRec_next_get, _ppLMToolKit.HashRec_next_set)

    def __init__(self):
        this = _ppLMToolKit.new_HashRec()
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_HashRec
    __del__ = lambda self: None
HashRec_swigregister = _ppLMToolKit.HashRec_swigregister
HashRec_swigregister(HashRec)

class CBinaryStream(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self):
        this = _ppLMToolKit.new_CBinaryStream()
        try:
            self.this.append(this)
        except:
            self.this = this

    def SetData(self, nPdata, nLen):
        return _ppLMToolKit.CBinaryStream_SetData(self, nPdata, nLen)
    __swig_destroy__ = _ppLMToolKit.delete_CBinaryStream
    __del__ = lambda self: None

    def FlowIn(self, pRetData, nSize):
        return _ppLMToolKit.CBinaryStream_FlowIn(self, pRetData, nSize)

    def FlowOut(self, pRetData, nSize):
        return _ppLMToolKit.CBinaryStream_FlowOut(self, pRetData, nSize)

    def setOwer(self, nInOwner):
        return _ppLMToolKit.CBinaryStream_setOwer(self, nInOwner)

    def ClearMem(self):
        return _ppLMToolKit.CBinaryStream_ClearMem(self)

    def clear(self):
        return _ppLMToolKit.CBinaryStream_clear(self)

    def SetPos(self, pos):
        return _ppLMToolKit.CBinaryStream_SetPos(self, pos)

    def getPos(self):
        return _ppLMToolKit.CBinaryStream_getPos(self)

    def getSize(self):
        return _ppLMToolKit.CBinaryStream_getSize(self)

    def getDataPtr(self):
        return _ppLMToolKit.CBinaryStream_getDataPtr(self)
CBinaryStream_swigregister = _ppLMToolKit.CBinaryStream_swigregister
CBinaryStream_swigregister(CBinaryStream)

class LMCountCell(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self):
        this = _ppLMToolKit.new_LMCountCell()
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_LMCountCell
    __del__ = lambda self: None
    m_Corpus = _swig_property(_ppLMToolKit.LMCountCell_m_Corpus_get, _ppLMToolKit.LMCountCell_m_Corpus_set)
    m_LMTree = _swig_property(_ppLMToolKit.LMCountCell_m_LMTree_get, _ppLMToolKit.LMCountCell_m_LMTree_set)
    m_szLexiconFl = _swig_property(_ppLMToolKit.LMCountCell_m_szLexiconFl_get, _ppLMToolKit.LMCountCell_m_szLexiconFl_set)
    m_szCorpusFl = _swig_property(_ppLMToolKit.LMCountCell_m_szCorpusFl_get, _ppLMToolKit.LMCountCell_m_szCorpusFl_set)
    m_curFileAttri = _swig_property(_ppLMToolKit.LMCountCell_m_curFileAttri_get, _ppLMToolKit.LMCountCell_m_curFileAttri_set)

    def SelfTest(self):
        return _ppLMToolKit.LMCountCell_SelfTest(self)

    def __setstate__(self, szLexFl, szCorpusFl):
        return _ppLMToolKit.LMCountCell___setstate__(self, szLexFl, szCorpusFl)

    def __setstate_SenWt__(self, szLexFl, szCorpusFl):
        return _ppLMToolKit.LMCountCell___setstate_SenWt__(self, szLexFl, szCorpusFl)

    def GetCellPyOutput(self, nWordSt, nWordEd, nGram):
        return _ppLMToolKit.LMCountCell_GetCellPyOutput(self, nWordSt, nWordEd, nGram)

    def GetCellPyOutput_SenWt(self, nWordSt, nWordEd, nGram):
        return _ppLMToolKit.LMCountCell_GetCellPyOutput_SenWt(self, nWordSt, nWordEd, nGram)
LMCountCell_swigregister = _ppLMToolKit.LMCountCell_swigregister
LMCountCell_swigregister(LMCountCell)

class CLMTrain(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self):
        this = _ppLMToolKit.new_CLMTrain()
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_CLMTrain
    __del__ = lambda self: None

    def Init(self, nRealOrder, nGramOrder, szMinCountArr, strOutputKey, szMaxCountArr, smooth_type):
        return _ppLMToolKit.CLMTrain_Init(self, nRealOrder, nGramOrder, szMinCountArr, strOutputKey, szMaxCountArr, smooth_type)

    def AccuUnigramCounts(self, *args):
        return _ppLMToolKit.CLMTrain_AccuUnigramCounts(self, *args)

    def UpdateUnigram(self):
        return _ppLMToolKit.CLMTrain_UpdateUnigram(self)

    def RecurTrainNgram(self):
        return _ppLMToolKit.CLMTrain_RecurTrainNgram(self)

    def LoadLexicon(self, lexFn):
        return _ppLMToolKit.CLMTrain_LoadLexicon(self, lexFn)

    def StaDiscntState(self, *args):
        return _ppLMToolKit.CLMTrain_StaDiscntState(self, *args)

    def InitialDiscounts(self):
        return _ppLMToolKit.CLMTrain_InitialDiscounts(self)

    def InitWriteResultLM(self, outLMFileName=None, nVersion=0):
        return _ppLMToolKit.CLMTrain_InitWriteResultLM(self, outLMFileName, nVersion)

    def WritePartResultLM(self, outLMFileName=None):
        return _ppLMToolKit.CLMTrain_WritePartResultLM(self, outLMFileName)

    def EndWriteResultLM(self, outLMFileName=None):
        return _ppLMToolKit.CLMTrain_EndWriteResultLM(self, outLMFileName)

    def SetTree(self, *args):
        return _ppLMToolKit.CLMTrain_SetTree(self, *args)

    def ConvertLMFormate(self, nFstLyNdNum):
        return _ppLMToolKit.CLMTrain_ConvertLMFormate(self, nFstLyNdNum)

    def SetWeightThreshold(self, threshold, filename):
        return _ppLMToolKit.CLMTrain_SetWeightThreshold(self, threshold, filename)

    def SetBlockSize(self, blockSize):
        return _ppLMToolKit.CLMTrain_SetBlockSize(self, blockSize)

    def PrintLM(self, outLMFileName):
        return _ppLMToolKit.CLMTrain_PrintLM(self, outLMFileName)
CLMTrain_swigregister = _ppLMToolKit.CLMTrain_swigregister
CLMTrain_swigregister(CLMTrain)

class FileAttribute(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
    __repr__ = _swig_repr
    __swig_destroy__ = _ppLMToolKit.delete_FileAttribute
    __del__ = lambda self: None

    def clear(self):
        return _ppLMToolKit.FileAttribute_clear(self)

    def Write(self, fp):
        return _ppLMToolKit.FileAttribute_Write(self, fp)

    def Read(self, fp):
        return _ppLMToolKit.FileAttribute_Read(self, fp)
    nGram = _swig_property(_ppLMToolKit.FileAttribute_nGram_get, _ppLMToolKit.FileAttribute_nGram_set)
    nWm1St = _swig_property(_ppLMToolKit.FileAttribute_nWm1St_get, _ppLMToolKit.FileAttribute_nWm1St_set)
    nWm1Ed = _swig_property(_ppLMToolKit.FileAttribute_nWm1Ed_get, _ppLMToolKit.FileAttribute_nWm1Ed_set)
    nWm2St = _swig_property(_ppLMToolKit.FileAttribute_nWm2St_get, _ppLMToolKit.FileAttribute_nWm2St_set)
    nWm2Ed = _swig_property(_ppLMToolKit.FileAttribute_nWm2Ed_get, _ppLMToolKit.FileAttribute_nWm2Ed_set)
    nPieceId = _swig_property(_ppLMToolKit.FileAttribute_nPieceId_get, _ppLMToolKit.FileAttribute_nPieceId_set)

    def __init__(self, *args):
        this = _ppLMToolKit.new_FileAttribute(*args)
        try:
            self.this.append(this)
        except:
            self.this = this

    def Init(self, inFile, lFileLen):
        return _ppLMToolKit.FileAttribute_Init(self, inFile, lFileLen)

    def __eq__(self, f):
        return _ppLMToolKit.FileAttribute___eq__(self, f)

    def CalKey(self):
        return _ppLMToolKit.FileAttribute_CalKey(self)

    def GetStr(self, pStr):
        return _ppLMToolKit.FileAttribute_GetStr(self, pStr)

    def GetMemSize(self):
        return _ppLMToolKit.FileAttribute_GetMemSize(self)
FileAttribute_swigregister = _ppLMToolKit.FileAttribute_swigregister
FileAttribute_swigregister(FileAttribute)

class MemFile(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
    cAttri = _swig_property(_ppLMToolKit.MemFile_cAttri_get, _ppLMToolKit.MemFile_cAttri_set)
    content = _swig_property(_ppLMToolKit.MemFile_content_get, _ppLMToolKit.MemFile_content_set)
    m_nMaxMemForTreePrun = _swig_property(_ppLMToolKit.MemFile_m_nMaxMemForTreePrun_get, _ppLMToolKit.MemFile_m_nMaxMemForTreePrun_set)

    def __init__(self, *args):
        this = _ppLMToolKit.new_MemFile(*args)
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_MemFile
    __del__ = lambda self: None

    def CalKey(self):
        return _ppLMToolKit.MemFile_CalKey(self)

    def __eq__(self, f):
        return _ppLMToolKit.MemFile___eq__(self, f)

    def __repr__(self):
        return _ppLMToolKit.MemFile___repr__(self)

    def Init(self, *args):
        return _ppLMToolKit.MemFile_Init(self, *args)

    def merge(self, *args):
        return _ppLMToolKit.MemFile_merge(self, *args)

    def write(self, szOutFile):
        return _ppLMToolKit.MemFile_write(self, szOutFile)

    def read(self, szInFile):
        return _ppLMToolKit.MemFile_read(self, szInFile)

    def clear(self):
        return _ppLMToolKit.MemFile_clear(self)
MemFile_swigregister = _ppLMToolKit.MemFile_swigregister
MemFile_swigregister(MemFile)

class LMTree(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self, inNgram=5):
        this = _ppLMToolKit.new_LMTree(inNgram)
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_LMTree
    __del__ = lambda self: None
    m_nGram = _swig_property(_ppLMToolKit.LMTree_m_nGram_get, _ppLMToolKit.LMTree_m_nGram_set)
    m_nNodeNum = _swig_property(_ppLMToolKit.LMTree_m_nNodeNum_get, _ppLMToolKit.LMTree_m_nNodeNum_set)
    m_nLastLySt = _swig_property(_ppLMToolKit.LMTree_m_nLastLySt_get, _ppLMToolKit.LMTree_m_nLastLySt_set)
    m_nLastLyStMul3 = _swig_property(_ppLMToolKit.LMTree_m_nLastLyStMul3_get, _ppLMToolKit.LMTree_m_nLastLyStMul3_set)
    m_nLyStNodeIdVec = _swig_property(_ppLMToolKit.LMTree_m_nLyStNodeIdVec_get, _ppLMToolKit.LMTree_m_nLyStNodeIdVec_set)

    def clear(self):
        return _ppLMToolKit.LMTree_clear(self)

    def setNgram(self, inNgram):
        return _ppLMToolKit.LMTree_setNgram(self, inNgram)

    def IsEmpty(self):
        return _ppLMToolKit.LMTree_IsEmpty(self)

    def Init(self, inNgram):
        return _ppLMToolKit.LMTree_Init(self, inNgram)

    def ShrinkMem(self):
        return _ppLMToolKit.LMTree_ShrinkMem(self)

    def GetMemPtr(self):
        return _ppLMToolKit.LMTree_GetMemPtr(self)

    def getStrSize(self):
        return _ppLMToolKit.LMTree_getStrSize(self)

    def getStr(self, pAllocedMem):
        return _ppLMToolKit.LMTree_getStr(self, pAllocedMem)

    def setStr(self, pIndata, stIdx, inOwner):
        return _ppLMToolKit.LMTree_setStr(self, pIndata, stIdx, inOwner)

    def index(self, ii):
        return _ppLMToolKit.LMTree_index(self, ii)

    def resizeMem(self, nNewSize):
        return _ppLMToolKit.LMTree_resizeMem(self, nNewSize)

    def InsertMemNode(self, *args):
        return _ppLMToolKit.LMTree_InsertMemNode(self, *args)
LMTree_swigregister = _ppLMToolKit.LMTree_swigregister
LMTree_swigregister(LMTree)


_ppLMToolKit.MEMORY_CUT_OFF_swigconstant(_ppLMToolKit)
MEMORY_CUT_OFF = _ppLMToolKit.MEMORY_CUT_OFF

_ppLMToolKit.PRUN_COUNT_ARRAY_SIZE_swigconstant(_ppLMToolKit)
PRUN_COUNT_ARRAY_SIZE = _ppLMToolKit.PRUN_COUNT_ARRAY_SIZE
class LMAdaptTree(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
    __repr__ = _swig_repr
    m_nGram = _swig_property(_ppLMToolKit.LMAdaptTree_m_nGram_get, _ppLMToolKit.LMAdaptTree_m_nGram_set)
    m_nLyStNodeIdVec = _swig_property(_ppLMToolKit.LMAdaptTree_m_nLyStNodeIdVec_get, _ppLMToolKit.LMAdaptTree_m_nLyStNodeIdVec_set)

    def __init__(self, inNgram=5):
        this = _ppLMToolKit.new_LMAdaptTree(inNgram)
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_LMAdaptTree
    __del__ = lambda self: None

    def ClearMem(self):
        return _ppLMToolKit.LMAdaptTree_ClearMem(self)

    def PrintTree(self):
        return _ppLMToolKit.LMAdaptTree_PrintTree(self)

    def UpdateCountArray(self, count):
        return _ppLMToolKit.LMAdaptTree_UpdateCountArray(self, count)

    def ComputeCutOffValue(self, mult):
        return _ppLMToolKit.LMAdaptTree_ComputeCutOffValue(self, mult)

    def PrunLastLayer(self, cut_off, flagArray):
        return _ppLMToolKit.LMAdaptTree_PrunLastLayer(self, cut_off, flagArray)

    def UpdateMidLayerFlag(self, flagArray):
        return _ppLMToolKit.LMAdaptTree_UpdateMidLayerFlag(self, flagArray)

    def CheckMemNeed(self, cutNum):
        return _ppLMToolKit.LMAdaptTree_CheckMemNeed(self, cutNum)

    def RebuildPrunTree(self, flagArray):
        return _ppLMToolKit.LMAdaptTree_RebuildPrunTree(self, flagArray)

    def TreePrunUsingCount(self):
        return _ppLMToolKit.LMAdaptTree_TreePrunUsingCount(self)

    def Init(self, inNgram):
        return _ppLMToolKit.LMAdaptTree_Init(self, inNgram)

    def setNgram(self, inNgram):
        return _ppLMToolKit.LMAdaptTree_setNgram(self, inNgram)

    def Clear(self):
        return _ppLMToolKit.LMAdaptTree_Clear(self)

    def IsEmpty(self):
        return _ppLMToolKit.LMAdaptTree_IsEmpty(self)

    def ShrinkMem(self):
        return _ppLMToolKit.LMAdaptTree_ShrinkMem(self)

    def MergeTree(self, cTree1, cTree2, nMaxMemForTreePrun):
        return _ppLMToolKit.LMAdaptTree_MergeTree(self, cTree1, cTree2, nMaxMemForTreePrun)

    def GetStrSize(self):
        return _ppLMToolKit.LMAdaptTree_GetStrSize(self)

    def GetStr(self, pAllocedMem):
        return _ppLMToolKit.LMAdaptTree_GetStr(self, pAllocedMem)

    def SetStr(self, pIndata, nLen, inOwner):
        return _ppLMToolKit.LMAdaptTree_SetStr(self, pIndata, nLen, inOwner)

    def index(self, ii):
        return _ppLMToolKit.LMAdaptTree_index(self, ii)

    def FindNodeIdx(self, wordid, order):
        return _ppLMToolKit.LMAdaptTree_FindNodeIdx(self, wordid, order)

    def SortLast2LyTree(self, nNodeIdx, long_wordVec, CountVec, SeqVec):
        return _ppLMToolKit.LMAdaptTree_SortLast2LyTree(self, nNodeIdx, long_wordVec, CountVec, SeqVec)
LMAdaptTree_swigregister = _ppLMToolKit.LMAdaptTree_swigregister
LMAdaptTree_swigregister(LMAdaptTree)

class CWordIndex(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
    __repr__ = _swig_repr
    nWordId = _swig_property(_ppLMToolKit.CWordIndex_nWordId_get, _ppLMToolKit.CWordIndex_nWordId_set)
    stIdx = _swig_property(_ppLMToolKit.CWordIndex_stIdx_get, _ppLMToolKit.CWordIndex_stIdx_set)
    edIdx = _swig_property(_ppLMToolKit.CWordIndex_edIdx_get, _ppLMToolKit.CWordIndex_edIdx_set)

    def __eq__(self, curWdIdx):
        return _ppLMToolKit.CWordIndex___eq__(self, curWdIdx)

    def __init__(self):
        this = _ppLMToolKit.new_CWordIndex()
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_CWordIndex
    __del__ = lambda self: None
CWordIndex_swigregister = _ppLMToolKit.CWordIndex_swigregister
CWordIndex_swigregister(CWordIndex)

class TwoIntTuple(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
    __repr__ = _swig_repr
    A = _swig_property(_ppLMToolKit.TwoIntTuple_A_get, _ppLMToolKit.TwoIntTuple_A_set)

    def __init__(self, *args):
        this = _ppLMToolKit.new_TwoIntTuple(*args)
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_TwoIntTuple
    __del__ = lambda self: None
TwoIntTuple_swigregister = _ppLMToolKit.TwoIntTuple_swigregister
TwoIntTuple_swigregister(TwoIntTuple)

class BuildCorpusIndex(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self):
        this = _ppLMToolKit.new_BuildCorpusIndex()
        try:
            self.this.append(this)
        except:
            self.this = this

    def ClearMem(self):
        return _ppLMToolKit.BuildCorpusIndex_ClearMem(self)
    __swig_destroy__ = _ppLMToolKit.delete_BuildCorpusIndex
    __del__ = lambda self: None
    m_lex = _swig_property(_ppLMToolKit.BuildCorpusIndex_m_lex_get, _ppLMToolKit.BuildCorpusIndex_m_lex_set)
    m_corpusVec = _swig_property(_ppLMToolKit.BuildCorpusIndex_m_corpusVec_get, _ppLMToolKit.BuildCorpusIndex_m_corpusVec_set)
    m_SenWtVec = _swig_property(_ppLMToolKit.BuildCorpusIndex_m_SenWtVec_get, _ppLMToolKit.BuildCorpusIndex_m_SenWtVec_set)
    m_cpusSortIdx = _swig_property(_ppLMToolKit.BuildCorpusIndex_m_cpusSortIdx_get, _ppLMToolKit.BuildCorpusIndex_m_cpusSortIdx_set)
    m_SenPosVec = _swig_property(_ppLMToolKit.BuildCorpusIndex_m_SenPosVec_get, _ppLMToolKit.BuildCorpusIndex_m_SenPosVec_set)
    m_poswtPairVec = _swig_property(_ppLMToolKit.BuildCorpusIndex_m_poswtPairVec_get, _ppLMToolKit.BuildCorpusIndex_m_poswtPairVec_set)

    def LoadLexicon(self, lexFileName):
        return _ppLMToolKit.BuildCorpusIndex_LoadLexicon(self, lexFileName)

    def BuildIndex4Corpus(self):
        return _ppLMToolKit.BuildCorpusIndex_BuildIndex4Corpus(self)

    def ReleaseMemory(self):
        return _ppLMToolKit.BuildCorpusIndex_ReleaseMemory(self)

    def AnalysisCorpus(self, corpusFileName):
        return _ppLMToolKit.BuildCorpusIndex_AnalysisCorpus(self, corpusFileName)

    def AnalysisCorpus_SenWt(self, corpusFileName):
        return _ppLMToolKit.BuildCorpusIndex_AnalysisCorpus_SenWt(self, corpusFileName)

    def ExtractNGramTree(self, nGram, wordSt, wordEd):
        return _ppLMToolKit.BuildCorpusIndex_ExtractNGramTree(self, nGram, wordSt, wordEd)

    def ExtractNGramTree_SenWt(self, nGram, wordSt, wordEd):
        return _ppLMToolKit.BuildCorpusIndex_ExtractNGramTree_SenWt(self, nGram, wordSt, wordEd)

    def GetTreeContent(self, pTreeAddr, nTreeSize):
        return _ppLMToolKit.BuildCorpusIndex_GetTreeContent(self, pTreeAddr, nTreeSize)
BuildCorpusIndex_swigregister = _ppLMToolKit.BuildCorpusIndex_swigregister
BuildCorpusIndex_swigregister(BuildCorpusIndex)

class CPPMixLM(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self):
        this = _ppLMToolKit.new_CPPMixLM()
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_CPPMixLM
    __del__ = lambda self: None

    def Init(self, szLexName, order, nBlockSize, nLmVersion):
        return _ppLMToolKit.CPPMixLM_Init(self, szLexName, order, nBlockSize, nLmVersion)

    def Mix(self, inLm1Name, inLm2Name, lm2Weight, outLmName, nLmVersion):
        return _ppLMToolKit.CPPMixLM_Mix(self, inLm1Name, inLm2Name, lm2Weight, outLmName, nLmVersion)

    def MixV0(self, inLm1Name, inLm2Name, lm2Weight, outLmName):
        return _ppLMToolKit.CPPMixLM_MixV0(self, inLm1Name, inLm2Name, lm2Weight, outLmName)

    def MixV1(self, inLm1Name, inLm2Name, lm2Weight, outLmName):
        return _ppLMToolKit.CPPMixLM_MixV1(self, inLm1Name, inLm2Name, lm2Weight, outLmName)
CPPMixLM_swigregister = _ppLMToolKit.CPPMixLM_swigregister
CPPMixLM_swigregister(CPPMixLM)

class CLMInvert(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self, nGramOrder, threadNum, tmpPath, nBlockSize, fDftBow):
        this = _ppLMToolKit.new_CLMInvert(nGramOrder, threadNum, tmpPath, nBlockSize, fDftBow)
        try:
            self.this.append(this)
        except:
            self.this = this

    def InvertLM(self, szOutLMFileName, needWriteArpa):
        return _ppLMToolKit.CLMInvert_InvertLM(self, szOutLMFileName, needWriteArpa)

    def LoadLexicon(self, szLexFile):
        return _ppLMToolKit.CLMInvert_LoadLexicon(self, szLexFile)
    __swig_destroy__ = _ppLMToolKit.delete_CLMInvert
    __del__ = lambda self: None
CLMInvert_swigregister = _ppLMToolKit.CLMInvert_swigregister
CLMInvert_swigregister(CLMInvert)

class CEntropyPrune(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self):
        this = _ppLMToolKit.new_CEntropyPrune()
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_CEntropyPrune
    __del__ = lambda self: None

    def Init(self, szLexName, nLmVersion, nOrder, nBlockSize, szThresholdArr):
        return _ppLMToolKit.CEntropyPrune_Init(self, szLexName, nLmVersion, nOrder, nBlockSize, szThresholdArr)

    def Prune(self, infile, outKey, nLmVersion):
        return _ppLMToolKit.CEntropyPrune_Prune(self, infile, outKey, nLmVersion)

    def PruneV0(self, infile, outKey):
        return _ppLMToolKit.CEntropyPrune_PruneV0(self, infile, outKey)

    def PruneV1(self, infile, outKey):
        return _ppLMToolKit.CEntropyPrune_PruneV1(self, infile, outKey)
CEntropyPrune_swigregister = _ppLMToolKit.CEntropyPrune_swigregister
CEntropyPrune_swigregister(CEntropyPrune)

class CConvToFsn(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def Convert(self, lmKey, version):
        return _ppLMToolKit.CConvToFsn_Convert(self, lmKey, version)

    def __init__(self, nGramOrder):
        this = _ppLMToolKit.new_CConvToFsn(nGramOrder)
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_CConvToFsn
    __del__ = lambda self: None
CConvToFsn_swigregister = _ppLMToolKit.CConvToFsn_swigregister
CConvToFsn_swigregister(CConvToFsn)

class CEvaluate(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self):
        this = _ppLMToolKit.new_CEvaluate()
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_CEvaluate
    __del__ = lambda self: None

    def Init(self, sznGramOrder, szLmKey, szLexFn, szLmFsn):
        return _ppLMToolKit.CEvaluate_Init(self, sznGramOrder, szLmKey, szLexFn, szLmFsn)

    def ComputePPL(self, szFile, szOutFile):
        return _ppLMToolKit.CEvaluate_ComputePPL(self, szFile, szOutFile)
CEvaluate_swigregister = _ppLMToolKit.CEvaluate_swigregister
CEvaluate_swigregister(CEvaluate)


_ppLMToolKit.FILL_PROB_swigconstant(_ppLMToolKit)
FILL_PROB = _ppLMToolKit.FILL_PROB
class CExpandDict(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def ExpandDict(self, szInLm, szOutLm, szInLex, szOutLex, nGramOrder):
        return _ppLMToolKit.CExpandDict_ExpandDict(self, szInLm, szOutLm, szInLex, szOutLex, nGramOrder)

    def ExpandDictV1(self, szInLm, szOutLm, szOriLex, szNewLex, nGramOrder):
        return _ppLMToolKit.CExpandDict_ExpandDictV1(self, szInLm, szOutLm, szOriLex, szNewLex, nGramOrder)

    def __init__(self):
        this = _ppLMToolKit.new_CExpandDict()
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_CExpandDict
    __del__ = lambda self: None
CExpandDict_swigregister = _ppLMToolKit.CExpandDict_swigregister
CExpandDict_swigregister(CExpandDict)

class CBlockAdapt(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
    __repr__ = _swig_repr
    m_nGramOrder = _swig_property(_ppLMToolKit.CBlockAdapt_m_nGramOrder_get, _ppLMToolKit.CBlockAdapt_m_nGramOrder_set)
    m_nTreeOrder = _swig_property(_ppLMToolKit.CBlockAdapt_m_nTreeOrder_get, _ppLMToolKit.CBlockAdapt_m_nTreeOrder_set)
    m_nBlockNum = _swig_property(_ppLMToolKit.CBlockAdapt_m_nBlockNum_get, _ppLMToolKit.CBlockAdapt_m_nBlockNum_set)
    m_nBlockSize = _swig_property(_ppLMToolKit.CBlockAdapt_m_nBlockSize_get, _ppLMToolKit.CBlockAdapt_m_nBlockSize_set)
    m_fpIn = _swig_property(_ppLMToolKit.CBlockAdapt_m_fpIn_get, _ppLMToolKit.CBlockAdapt_m_fpIn_set)
    m_pProbUnigm = _swig_property(_ppLMToolKit.CBlockAdapt_m_pProbUnigm_get, _ppLMToolKit.CBlockAdapt_m_pProbUnigm_set)
    m_pProbBigm = _swig_property(_ppLMToolKit.CBlockAdapt_m_pProbBigm_get, _ppLMToolKit.CBlockAdapt_m_pProbBigm_set)
    m_pBackUnigm = _swig_property(_ppLMToolKit.CBlockAdapt_m_pBackUnigm_get, _ppLMToolKit.CBlockAdapt_m_pBackUnigm_set)
    m_pBackBigm = _swig_property(_ppLMToolKit.CBlockAdapt_m_pBackBigm_get, _ppLMToolKit.CBlockAdapt_m_pBackBigm_set)
    m_nProbUniNum = _swig_property(_ppLMToolKit.CBlockAdapt_m_nProbUniNum_get, _ppLMToolKit.CBlockAdapt_m_nProbUniNum_set)
    m_nProbBigmNum = _swig_property(_ppLMToolKit.CBlockAdapt_m_nProbBigmNum_get, _ppLMToolKit.CBlockAdapt_m_nProbBigmNum_set)
    m_ppProbMiNum = _swig_property(_ppLMToolKit.CBlockAdapt_m_ppProbMiNum_get, _ppLMToolKit.CBlockAdapt_m_ppProbMiNum_set)
    m_pProbFiNum = _swig_property(_ppLMToolKit.CBlockAdapt_m_pProbFiNum_get, _ppLMToolKit.CBlockAdapt_m_pProbFiNum_set)
    m_nBackUniNum = _swig_property(_ppLMToolKit.CBlockAdapt_m_nBackUniNum_get, _ppLMToolKit.CBlockAdapt_m_nBackUniNum_set)
    m_nBackBigmNum = _swig_property(_ppLMToolKit.CBlockAdapt_m_nBackBigmNum_get, _ppLMToolKit.CBlockAdapt_m_nBackBigmNum_set)
    m_ppBackMiNum = _swig_property(_ppLMToolKit.CBlockAdapt_m_ppBackMiNum_get, _ppLMToolKit.CBlockAdapt_m_ppBackMiNum_set)
    m_pBackFiNum = _swig_property(_ppLMToolKit.CBlockAdapt_m_pBackFiNum_get, _ppLMToolKit.CBlockAdapt_m_pBackFiNum_set)
    m_ppProbOffset = _swig_property(_ppLMToolKit.CBlockAdapt_m_ppProbOffset_get, _ppLMToolKit.CBlockAdapt_m_ppProbOffset_set)
    m_ppBackOffset = _swig_property(_ppLMToolKit.CBlockAdapt_m_ppBackOffset_get, _ppLMToolKit.CBlockAdapt_m_ppBackOffset_set)
    m_pOutLmKey = _swig_property(_ppLMToolKit.CBlockAdapt_m_pOutLmKey_get, _ppLMToolKit.CBlockAdapt_m_pOutLmKey_set)
    m_nOutBlockNum = _swig_property(_ppLMToolKit.CBlockAdapt_m_nOutBlockNum_get, _ppLMToolKit.CBlockAdapt_m_nOutBlockNum_set)
    m_nOutBlockSize = _swig_property(_ppLMToolKit.CBlockAdapt_m_nOutBlockSize_get, _ppLMToolKit.CBlockAdapt_m_nOutBlockSize_set)

    def __init__(self):
        this = _ppLMToolKit.new_CBlockAdapt()
        try:
            self.this.append(this)
        except:
            self.this = this

    def BlockAdapt(self, GramOrder, BlockSize, szLmKey, outLmKey):
        return _ppLMToolKit.CBlockAdapt_BlockAdapt(self, GramOrder, BlockSize, szLmKey, outLmKey)
    __swig_destroy__ = _ppLMToolKit.delete_CBlockAdapt
    __del__ = lambda self: None
CBlockAdapt_swigregister = _ppLMToolKit.CBlockAdapt_swigregister
CBlockAdapt_swigregister(CBlockAdapt)

class CDecreaseDict(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def DecreaseDict(self, szInLm, szOutLm, szInLex, szOutLex, nGramOrder):
        return _ppLMToolKit.CDecreaseDict_DecreaseDict(self, szInLm, szOutLm, szInLex, szOutLex, nGramOrder)

    def __init__(self):
        this = _ppLMToolKit.new_CDecreaseDict()
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_CDecreaseDict
    __del__ = lambda self: None
CDecreaseDict_swigregister = _ppLMToolKit.CDecreaseDict_swigregister
CDecreaseDict_swigregister(CDecreaseDict)

class CArpaToLM(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self):
        this = _ppLMToolKit.new_CArpaToLM()
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_CArpaToLM
    __del__ = lambda self: None

    def Init(self, szLexName, nOrder):
        return _ppLMToolKit.CArpaToLM_Init(self, szLexName, nOrder)

    def Convert(self, infile, outKey):
        return _ppLMToolKit.CArpaToLM_Convert(self, infile, outKey)
CArpaToLM_swigregister = _ppLMToolKit.CArpaToLM_swigregister
CArpaToLM_swigregister(CArpaToLM)

class CLMProduce(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self):
        this = _ppLMToolKit.new_CLMProduce()
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_CLMProduce
    __del__ = lambda self: None

    def Init(self, nRealOrder, nGramOrder, strOutputKey, strBaseLm):
        return _ppLMToolKit.CLMProduce_Init(self, nRealOrder, nGramOrder, strOutputKey, strBaseLm)

    def UpdateUnigram(self):
        return _ppLMToolKit.CLMProduce_UpdateUnigram(self)

    def RecurProduceNgram(self):
        return _ppLMToolKit.CLMProduce_RecurProduceNgram(self)

    def LoadLexicon(self, lexFn):
        return _ppLMToolKit.CLMProduce_LoadLexicon(self, lexFn)

    def InitWriteResultLM(self, outLMFileName=None):
        return _ppLMToolKit.CLMProduce_InitWriteResultLM(self, outLMFileName)

    def WritePartResultLM(self, outLMFileName=None):
        return _ppLMToolKit.CLMProduce_WritePartResultLM(self, outLMFileName)

    def EndWriteResultLM(self, outLMFileName=None):
        return _ppLMToolKit.CLMProduce_EndWriteResultLM(self, outLMFileName)

    def SetTree(self, *args):
        return _ppLMToolKit.CLMProduce_SetTree(self, *args)

    def ConvertLMFormate(self, nFstLyNdNum):
        return _ppLMToolKit.CLMProduce_ConvertLMFormate(self, nFstLyNdNum)
CLMProduce_swigregister = _ppLMToolKit.CLMProduce_swigregister
CLMProduce_swigregister(CLMProduce)

class intArray(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self, nelements):
        this = _ppLMToolKit.new_intArray(nelements)
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_intArray
    __del__ = lambda self: None

    def __getitem__(self, index):
        return _ppLMToolKit.intArray___getitem__(self, index)

    def __setitem__(self, index, value):
        return _ppLMToolKit.intArray___setitem__(self, index, value)

    def cast(self):
        return _ppLMToolKit.intArray_cast(self)
    frompointer = staticmethod(_ppLMToolKit.intArray_frompointer)
intArray_swigregister = _ppLMToolKit.intArray_swigregister
intArray_swigregister(intArray)

def intArray_frompointer(t):
    return _ppLMToolKit.intArray_frompointer(t)
intArray_frompointer = _ppLMToolKit.intArray_frompointer

class floatArray(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self, nelements):
        this = _ppLMToolKit.new_floatArray(nelements)
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_floatArray
    __del__ = lambda self: None

    def __getitem__(self, index):
        return _ppLMToolKit.floatArray___getitem__(self, index)

    def __setitem__(self, index, value):
        return _ppLMToolKit.floatArray___setitem__(self, index, value)

    def cast(self):
        return _ppLMToolKit.floatArray_cast(self)
    frompointer = staticmethod(_ppLMToolKit.floatArray_frompointer)
floatArray_swigregister = _ppLMToolKit.floatArray_swigregister
floatArray_swigregister(floatArray)

def floatArray_frompointer(t):
    return _ppLMToolKit.floatArray_frompointer(t)
floatArray_frompointer = _ppLMToolKit.floatArray_frompointer

class doubleArray(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self, nelements):
        this = _ppLMToolKit.new_doubleArray(nelements)
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _ppLMToolKit.delete_doubleArray
    __del__ = lambda self: None

    def __getitem__(self, index):
        return _ppLMToolKit.doubleArray___getitem__(self, index)

    def __setitem__(self, index, value):
        return _ppLMToolKit.doubleArray___setitem__(self, index, value)

    def cast(self):
        return _ppLMToolKit.doubleArray_cast(self)
    frompointer = staticmethod(_ppLMToolKit.doubleArray_frompointer)
doubleArray_swigregister = _ppLMToolKit.doubleArray_swigregister
doubleArray_swigregister(doubleArray)

def doubleArray_frompointer(t):
    return _ppLMToolKit.doubleArray_frompointer(t)
doubleArray_frompointer = _ppLMToolKit.doubleArray_frompointer



