Skip to content

自定义切词错误 #5739

@guoandzhong

Description

@guoandzhong

from LAC import LAC, custom

lac = LAC()
lac.model.custom = custom.Customization()

lac.model.custom.add_word('中华人民共和国/国家')
lac.model.custom.add_word('国2/标准')
print(lac.run('中华人民共和国2008年奥运会'))

// 返回 [['中华人民共和', '国2', '008年', '奥运会'], ['国家', '标准', 'TIME', 'nz']]

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions