leizongmin / leizongmin/node-segment
特定的省市分不出来
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.2k
- Forks
- 132
- PR merge metrics
- No merged PRs in 30d
Description
console.log(segment.doSegment('2015-2016学年新疆乌鲁木齐九十八中七年级
(上)期中数学试卷', {stripStopword: true,stripPunctuation: true}));
[ { w: '2015', p: 4194304 },
{ w: '2016', p: [ 4194304 ] },
{ w: '学年', p: 1048576 },
{ w: '新疆乌鲁木齐', p: 1048576 },
{ w: '九十八', p: 6291456 },
{ w: '中', p: 33558528 },
{ w: '七年级', p: 2097152 },
{ w: '上', p: 33554432 },
{ w: '期中', p: 16384 },
{ w: '数学试卷', p: 1048576 } ]
不能将省(新疆)和市(乌鲁木齐)分出来,但是新疆的其他城市却能分出来(比如:新疆克拉玛依),而且分词的词典中也有新疆、乌鲁木齐这些词,不知道是不是一个bug
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 example with segment.doSegment using the supplied Chinese text and options. Inspect how dictionary entries for 新疆 and 乌鲁木齐 are matched, then verify that the result separates the province and city while preserving the existing behavior for 新疆克拉玛依.
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