Source code for harvesttext

#coding=utf-8
#!/usr/bin/env python
import pickle
from .harvesttext import HarvestText
from .resources import *

__version__ = '0.8.1.4'

[docs]def saveHT(htModel,filename): with open(filename, "wb") as f: htModel.prepared = False htModel.hanlp_prepared = False pickle.dump(htModel,f)
[docs]def loadHT(filename): with open(filename, "rb") as f: ht = pickle.load(f) ht.prepare() return ht