# This file was automatically generated by SWIG (http://www.swig.org). # Version 1.3.40 # # Do not make changes to this file unless you know what you are doing--modify # the SWIG interface file instead. # This file is compatible with both classic and new-style classes. 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('_EST_Ngrammar', [dirname(__file__)]) except ImportError: import _EST_Ngrammar return _EST_Ngrammar if fp is not None: try: _mod = imp.load_module('_EST_Ngrammar', fp, pathname, description) finally: fp.close() return _mod _EST_Ngrammar = swig_import_helper() del swig_import_helper else: import _EST_Ngrammar 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) or hasattr(self,name): self.__dict__[name] = value else: raise AttributeError("You cannot add attributes to %s" % self) def _swig_setattr(self,class_type,name,value): return _swig_setattr_nondynamic(self,class_type,name,value,0) def _swig_getattr(self,class_type,name): if (name == "thisown"): return self.this.own() method = class_type.__swig_getmethods__.get(name,None) if method: return method(self) raise AttributeError(name) def _swig_repr(self): try: strthis = "proxy of " + self.this.__repr__() except: strthis = "" return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) try: _object = object _newclass = 1 except AttributeError: class _object : pass _newclass = 0 read_ok = _EST_Ngrammar.read_ok read_format_error = _EST_Ngrammar.read_format_error read_not_found_error = _EST_Ngrammar.read_not_found_error read_error = _EST_Ngrammar.read_error write_ok = _EST_Ngrammar.write_ok write_fail = _EST_Ngrammar.write_fail write_error = _EST_Ngrammar.write_error write_partial = _EST_Ngrammar.write_partial connect_ok = _EST_Ngrammar.connect_ok connect_not_found_error = _EST_Ngrammar.connect_not_found_error connect_not_allowed_error = _EST_Ngrammar.connect_not_allowed_error connect_system_error = _EST_Ngrammar.connect_system_error connect_error = _EST_Ngrammar.connect_error class EST_Ngrammar(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, EST_Ngrammar, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, EST_Ngrammar, name) __repr__ = _swig_repr sparse = _EST_Ngrammar.EST_Ngrammar_sparse dense = _EST_Ngrammar.EST_Ngrammar_dense backoff = _EST_Ngrammar.EST_Ngrammar_backoff frequencies = _EST_Ngrammar.EST_Ngrammar_frequencies log_frequencies = _EST_Ngrammar.EST_Ngrammar_log_frequencies def __init__(self, *args): this = _EST_Ngrammar.new_EST_Ngrammar(*args) try: self.this.append(this) except: self.this = this __swig_destroy__ = _EST_Ngrammar.delete_EST_Ngrammar __del__ = lambda self : None; def clear(self): return _EST_Ngrammar.EST_Ngrammar_clear(self) def init(self, *args): return _EST_Ngrammar.EST_Ngrammar_init(self, *args) def num_states(self): return _EST_Ngrammar.EST_Ngrammar_num_states(self) def samples(self): return _EST_Ngrammar.EST_Ngrammar_samples(self) def order(self): return _EST_Ngrammar.EST_Ngrammar_order(self) def get_vocab_length(self): return _EST_Ngrammar.EST_Ngrammar_get_vocab_length(self) def get_vocab_word(self, *args): return _EST_Ngrammar.EST_Ngrammar_get_vocab_word(self, *args) def get_pred_vocab_length(self): return _EST_Ngrammar.EST_Ngrammar_get_pred_vocab_length(self) def get_pred_vocab_word(self, *args): return _EST_Ngrammar.EST_Ngrammar_get_pred_vocab_word(self, *args) def closed_vocab(self): return _EST_Ngrammar.EST_Ngrammar_closed_vocab(self) def entry_type(self): return _EST_Ngrammar.EST_Ngrammar_entry_type(self) def representation(self): return _EST_Ngrammar.EST_Ngrammar_representation(self) def build(self, *args): return _EST_Ngrammar.EST_Ngrammar_build(self, *args) def accumulate(self, *args): return _EST_Ngrammar.EST_Ngrammar_accumulate(self, *args) def load(self, *args): return _EST_Ngrammar.EST_Ngrammar_load(self, *args) def save(self, *args): return _EST_Ngrammar.EST_Ngrammar_save(self, *args) def wordlist_index(self, *args): return _EST_Ngrammar.EST_Ngrammar_wordlist_index(self, *args) def predlist_index(self, *args): return _EST_Ngrammar.EST_Ngrammar_predlist_index(self, *args) def set_entry_type(self, *args): return _EST_Ngrammar.EST_Ngrammar_set_entry_type(self, *args) def set_representation(self, *args): return _EST_Ngrammar.EST_Ngrammar_set_representation(self, *args) def probability(self, *args): return _EST_Ngrammar.EST_Ngrammar_probability(self, *args) def frequency(self, *args): return _EST_Ngrammar.EST_Ngrammar_frequency(self, *args) def predict(self, *args): return _EST_Ngrammar.EST_Ngrammar_predict(self, *args) def find_state_id(self, *args): return _EST_Ngrammar.EST_Ngrammar_find_state_id(self, *args) def find_next_state_id(self, *args): return _EST_Ngrammar.EST_Ngrammar_find_next_state_id(self, *args) def reverse_probability(self, *args): return _EST_Ngrammar.EST_Ngrammar_reverse_probability(self, *args) def prob_dist(self, *args): return _EST_Ngrammar.EST_Ngrammar_prob_dist(self, *args) def fill_window_start(self, *args): return _EST_Ngrammar.EST_Ngrammar_fill_window_start(self, *args) def ngram_exists(self, *args): return _EST_Ngrammar.EST_Ngrammar_ngram_exists(self, *args) def get_backoff_weight(self, *args): return _EST_Ngrammar.EST_Ngrammar_get_backoff_weight(self, *args) def set_backoff_weight(self, *args): return _EST_Ngrammar.EST_Ngrammar_set_backoff_weight(self, *args) def print_freqs(self, *args): return _EST_Ngrammar.EST_Ngrammar_print_freqs(self, *args) def compute_backoff_weights(self, mincount = 1, maxcount = 10): return _EST_Ngrammar.EST_Ngrammar_compute_backoff_weights(self, mincount, maxcount) def merge(self, *args): return _EST_Ngrammar.EST_Ngrammar_merge(self, *args) EST_Ngrammar_swigregister = _EST_Ngrammar.EST_Ngrammar_swigregister EST_Ngrammar_swigregister(EST_Ngrammar) def fs_build_backoff_ngrams(*args): return _EST_Ngrammar.fs_build_backoff_ngrams(*args) fs_build_backoff_ngrams = _EST_Ngrammar.fs_build_backoff_ngrams def fs_backoff_smooth(*args): return _EST_Ngrammar.fs_backoff_smooth(*args) fs_backoff_smooth = _EST_Ngrammar.fs_backoff_smooth def Ngram_freqsmooth(*args): return _EST_Ngrammar.Ngram_freqsmooth(*args) Ngram_freqsmooth = _EST_Ngrammar.Ngram_freqsmooth def frequency_of_frequencies(*args): return _EST_Ngrammar.frequency_of_frequencies(*args) frequency_of_frequencies = _EST_Ngrammar.frequency_of_frequencies def map_frequencies(*args): return _EST_Ngrammar.map_frequencies(*args) map_frequencies = _EST_Ngrammar.map_frequencies def Good_Turing_smooth(*args): return _EST_Ngrammar.Good_Turing_smooth(*args) Good_Turing_smooth = _EST_Ngrammar.Good_Turing_smooth def Good_Turing_discount(*args): return _EST_Ngrammar.Good_Turing_discount(*args) Good_Turing_discount = _EST_Ngrammar.Good_Turing_discount def test_stats(*args): return _EST_Ngrammar.test_stats(*args) test_stats = _EST_Ngrammar.test_stats