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

Method __init__

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

Source from the content-addressed store, hash-verified

305class RankModel(Model):
306 """Docstring for Rank Model"""
307 def __init__(self, model_path, mode, use_cuda):
308 # init rank model
309 super(RankModel, self).__init__(model_path, mode, use_cuda)
310
311 # parsing the lac model address
312 parent_path = os.path.split(model_path)[0]
313 lac_path = os.path.join(parent_path, 'lac_model')
314
315 # init lac model
316 self.lac = LacModel(model_path=lac_path, mode='lac', use_cuda=use_cuda)
317
318 def run(self, texts):
319 if self.custom is not None:

Callers

nothing calls this directly

Calls 2

LacModelClass · 0.85
__init__Method · 0.45

Tested by

no test coverage detected