马拉雅拉姆语语音分析器
mlphon的Python项目详细描述
这是Malayalam phonetic analyser - mlphon的python接口。
用法
图形到音素分析示例
frommlphonimportG2Panalyser=G2P()analyser.analyse('കേരളം')
给出
[(('<BoS>k<plosive><voiceless><unaspirated><velar>eː<v_sign><EoS><BoS>ɾ<flapped><alveolar>a<schwa><EoS><BoS>ɭ<lateral><retroflex>a<schwa>m<anuswara><EoS>',0.0),))]
这个结果中的第二项是重量。 这与目前的执行情况无关。
图形到音素生成示例
frommlphonimportG2Pgenerator=G2P()generator.generate('<BoS>k<plosive><voiceless><unaspirated><velar>eː<v_sign><EoS><BoS>ɾ<flapped><alveolar>a<schwa><EoS><BoS>ɭ<lateral><retroflex>a<schwa>m<anuswara><EoS>')
给出
(('കേരളം',0.0),)
这个结果中的第二项是重量。 这与目前的执行情况无关。
图形到IPA分析
frommlphonimportIPAanalyser=IPA()analyser.analyse("കേരളം")
给出
(('keːɾaɭam<anuswara>',0.0),)
<;anauswara>;、<;visarga>;、<;chillu>;标记在IPA分析中明确显示。
从ipa生成石墨烯
frommlphonimportIPAgenerator=IPA()generator.generate('keːɾaɭam<anuswara>')
给出
(('കേരളം',0.0),)
在这一代人中可能有多个结果。 如果有不相关的,请忽略。
音节化器
frommlphonimportSyllablizersyl=Syllablizer()syl.syllablize('കേരളം')
给出
(('<BoS>കേ<EoS><BoS>ര<EoS><BoS>ളം<EoS>',0.0),)
命令行界面
G2P
$ mlg2p --help usage: mlg2p [-h] [-i INFILE] [-o OUTFILE] [-a] [-g] [-v] optional arguments: -h, --help show this help message and exit -i INFILE, --input INFILE source of analysis data -o OUTFILE, --output OUTFILE target of generated strings -a, --analyse Analyse the input file strings -g, --generate Generate the input file strings -v, --verbose print verbosely while processing
IPA
$ mlipa --help usage: mlipa [-h] [-i INFILE] [-o OUTFILE] [-a] [-g] [-v] optional arguments: -h, --help show this help message and exit -i INFILE, --input INFILE source of analysis data -o OUTFILE, --output OUTFILE target of generated strings -a, --analyse Analyse the input file strings -g, --generate Generate the input file strings -v, --verbose print verbosely while processing
音节分析器
$ mlsyllablize --help usage: mlsyllablize [-h] [-i INFILE] [-o OUTFILE] optional arguments: -h, --help show this help message and exit -i INFILE, --input INFILE source of analysis data -o OUTFILE, --output OUTFILE target of generated strings