MCPcopy Create free account
hub / github.com/baidu/lac / __init__

Method __init__

python/LAC/models.py:232–236  ·  view source on GitHub ↗
(self, model_path, mode, use_cuda)

Source from the content-addressed store, hash-verified

230class LacModel(Model):
231 """Docstring for LAC Model"""
232 def __init__(self, model_path, mode, use_cuda):
233 super(LacModel, self).__init__(model_path, mode, use_cuda)
234
235 seg_dict_path = os.path.join(model_path, "conf", "small_seg.dic")
236 self.segment_tool = Segment(dict_path=seg_dict_path)
237
238 def run(self, texts):
239 crf_result = super(LacModel, self).run(texts)['crf_result']

Callers

nothing calls this directly

Calls 2

SegmentClass · 0.85
__init__Method · 0.45

Tested by

no test coverage detected