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

Method run

python/LAC/models.py:238–241  ·  view source on GitHub ↗
(self, texts)

Source from the content-addressed store, hash-verified

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']
240 result = [[word, tag] for word, tag, tag_for_rank in crf_result] if self.batch else crf_result[0][:-1]
241 return result
242
243 def call_run(self, texts):
244 """lac被rank模型调用时返回的结果"""

Callers

nothing calls this directly

Calls 1

runMethod · 0.45

Tested by

no test coverage detected