Skip to content

Commit

Permalink
Merge pull request #341 from ufec/master
Browse files Browse the repository at this point in the history
fix: 行不行 hang bu hang -> xing bu xing with segment
  • Loading branch information
hotoo committed Jul 12, 2022
2 parents b43646f + a7480bc commit 7950833
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/data/phrases-dict.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36891,6 +36891,7 @@ const phrases_dict: Record<string,string[][]> = {
"行不苟合": [["xíng"], ["bù"], ["gǒu"], ["hé"]],
"行不履危": [["xíng"], ["bù"], ["lǚ"], ["wēi"]],
"行不通": [["xíng"], ["bù"], ["tōng"]],
"行不行": [["xíng"], ["bù"], ["xíng"]],
"行不胜衣": [["xíng"], ["bù"], ["shèng"], ["yī"]],
"行步如飞": [["xíng"], ["bù"], ["rú"], ["fēi"]],
"行不逾方": [["xíng"], ["bù"], ["yú"], ["fāng"]],
Expand Down
6 changes: 6 additions & 0 deletions test/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -365,4 +365,10 @@ describe("pinyin compact", function() {
const py = pinyin(han, { style: "FIRST_LETTER", heteronym: true, compact: true });
expect(py).toEqual([["w", "m", "d", "a", "z", "y"], ["w", "m", "d", "a", "c", "y"]]);
});

it("行不行 compact without heternonyms, normal style", function() {
const han = "行不行";
const py = pinyin(han, { style: pinyin.STYLE_NORMAL, segment: true, heteronym: false, compact: true });
expect(py).toEqual([["xing", "bu", "xing"]]);
});
});

0 comments on commit 7950833

Please sign in to comment.