baidu / baidu/lac

badcase: "你喜欢吃蟹肉棒吗"

Open
#130 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
4k
Forks
592
PR merge metrics
No merged PRs in 30d

Description

>>> lac = LAC(mode = 'lac')
>>> lac.run(["你喜欢吃蟹肉棒吗"])
[[['你', '喜欢', '吃', '蟹', '肉棒', '吗'], ['r', 'v', 'v', 'n', 'n', 'xc']]]

lac 1.0 可以把“蟹肉棒”识别成一个
{
"ret": 0,
"msg": "",
"content": {
"status": 0,
"version": "ver_1_0_0",
"results": [
{
"retcode": 0,
"text": "你喜欢吃蟹肉棒吗",
"items": [
{
"byte_length": 2,
"byte_offset": 0,
"item": "你",
"type": "r"
},
{
"byte_length": 4,
"byte_offset": 2,
"item": "喜欢",
"type": "v"
},
{
"byte_length": 2,
"byte_offset": 6,
"item": "吃",
"type": "v"
},
{
"byte_length": 6,
"byte_offset": 8,
"item": "蟹肉棒",
"type": "nz"
},
{
"byte_length": 2,
"byte_offset": 14,
"item": "吗",
"type": "xc"
}
]
}
]
}
}

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the reported output with LAC(mode='lac') and the sentence “你喜欢吃蟹肉棒吗”. Compare the current segmentation and part-of-speech tags with the expected single token “蟹肉棒” tagged as “nz”; done means this case produces the expected result and remains covered by a regression check.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.