def __init__(self, modeldir, normalize=True): self.ldig = ldig.ldig(modeldir) self.features = self.ldig.load_features() self.trie = self.ldig.load_da() self.labels = self.ldig.load_labels() self.param = np.load(self.ldig.param) if normalize: self.detect = self._detect_normalize else: self.detect = self._detect
def __init__(self, modeldir): self.ldig = ldig.ldig(modeldir) self.features = self.ldig.load_features() self.trie = self.ldig.load_da() self.labels = self.ldig.load_labels() self.param = numpy.load(self.ldig.param)