kakaobrain/g2pm

polyphone's classification

HeYingnan opened this issue · 1 comments

hi, i find for anyone polyphone the netwok's output is a id, and then you can get pinyin from idx2class, i want to know how can you
ensure the output id is one of the classifications? thank you.

We map every pinyin to unique number (id) and save its inverse map (Id -> pinyin) into the dictionary, which is idx2class.

So we can convert the network's output into unique pinyin.