Skip to content

Commit

Permalink
show x flag in jieba results
Browse files Browse the repository at this point in the history
  • Loading branch information
rikumi authored Oct 24, 2024
1 parent 8cfa803 commit 855fe54
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/commands/jieba.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const handleSlashCommand = async (message: GenericMessage) => {
return '句子太长了!';
}
try {
return jieba.tag(sentence).map(({ word, tag }) => tag === 'x' ? word : `${word}(${tag})`).join('');
return jieba.tag(sentence).map(({ word, tag }) => `${word}(${tag})`).join('');
} catch (e) {
return '分词失败!';
}
Expand Down

0 comments on commit 855fe54

Please sign in to comment.