leizongmin / leizongmin/node-segment
BUG: 被忽略的空格
Open
Nobody has claimed this yet.
Bug
- Dominant language
- JavaScript
- Stars
- 1.2k
- Forks
- 132
- PR merge metrics
- No merged PRs in 30d
Description
console.log(segment.doSegment("a a")); // [ { w: 'a', p: 16 }, { w: 'a', p: 16 } ]
console.log(segment.doSegment("一 一")); // [ { w: '一一', p: 6291456 } ]
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the two doSegment examples from the issue, then trace the segmentation entry point to find where spaces are discarded. Confirm the intended handling of spaces between Chinese characters and add a regression check showing that separated input is not merged unexpectedly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100