MCPcopy Index your code
hub / github.com/clips/pattern / save

Method save

pattern/vector/__init__.py:2349–2361  ·  view source on GitHub ↗
(self, path)

Source from the content-addressed store, hash-verified

2347 return self._classify(document, probability=not discrete)
2348
2349 def save(self, path):
2350 svm, model = self._svm, self._model
2351 if model is not None:
2352 # Convert the SVM model to a string, save the string:
2353 _save = self.extension == LIBLINEAR and \
2354 svm.liblinearutil.save_model or \
2355 svm.libsvmutil.svm_save_model
2356 _save(path, model[0])
2357 self._svm = None
2358 self._model = ((open(path).read(),) + model[1:]) if model else None
2359 Classifier.save(self, path)
2360 self._svm = svm
2361 self._model = model
2362
2363 @classmethod
2364 def load(cls, path):

Callers

nothing calls this directly

Calls 1

readMethod · 0.45

Tested by

no test coverage detected