Skip to content

Commit

Permalink
fix: 修正 复上 , 复分析 , 为重 的分詞錯誤
Browse files Browse the repository at this point in the history
  • Loading branch information
bluelovers committed Feb 18, 2022
1 parent a4ad82b commit 8156539
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
10 changes: 8 additions & 2 deletions lib/segment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ export function initIdeaSegmentText()
},
}).then(async (segment) =>
{
let db_dict = segment.getDictDatabase(EnumDictDatabase.TABLE);
let db_synonym = segment.getDictDatabase(EnumDictDatabase.SYNONYM);
const db_dict = segment.getDictDatabase(EnumDictDatabase.TABLE);
const db_synonym = segment.getDictDatabase(EnumDictDatabase.SYNONYM);

const autoCjk = db_dict.options.autoCjk;
db_dict.options.autoCjk = true;
Expand All @@ -37,6 +37,12 @@ export function initIdeaSegmentText()
;
*/

db_dict
.remove('复上')
.remove('复分析')
.remove('为重')
;

await loadTable(__dict_table_txt)
.each(data =>
{
Expand Down
4 changes: 4 additions & 0 deletions test/segment.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,10 @@ describe(`should include`, () =>
[`應用`, `CFDeploymentEditor.dialog.title.reload.application.settings=重新加载应用程序设置`],
[`套用`, `plugins.dialog.button=应用变更`],

[`複`, `,并为重复语言结构设定初始大小。`],
[`複`, `重复上一条命令`],
[`複`, `程式码重复分析`],

]).forEach(text =>
{

Expand Down

0 comments on commit 8156539

Please sign in to comment.