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

Method run

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

Source from the content-addressed store, hash-verified

252 self.dataset = reader.SegDataset(self.args)
253
254 def run(self, texts):
255 crf_result = super(SegModel, self).run(texts)["crf_result"]
256 result = [word for word, tag, tag_for_rank in crf_result] if self.batch else crf_result[0][0]
257 return result
258
259 def texts2tensor(self, texts):
260 """文本输入转为Paddle输入的Tensor"""

Callers

nothing calls this directly

Calls 1

runMethod · 0.45

Tested by

no test coverage detected