MCPcopy Create free account
hub / github.com/hankcs/HanLP / test_space

Method test_space

tests/test_mtl.py:76–82  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

74 self.assertSequenceEqual(mtl('͡', tasks='tok/fine')['tok/fine'], ['͡'])
75
76 def test_space(self):
77 task = 'tok/fine'
78 doc: Document = mtl('商品 和服务', tasks=task)
79 self.assertSequenceEqual(doc[task], ["商品", "和", "服务"])
80 mtl[task].dict_combine = {('iPad', 'Pro'), '2个空格'}
81 self.assertSequenceEqual(mtl("如何评价iPad Pro ?iPad Pro有2个空格", tasks=task)[task],
82 ['如何', '评价', 'iPad Pro', '?', 'iPad Pro', '有', '2个空格'])
83
84 def test_transform(self):
85 task = 'tok/fine'

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected