马拉雅拉姆语语音分析器

mlphon的Python项目详细描述


PyPI Version

这是Malayalam phonetic analyser - mlphon的python接口。

安装

python 3是必需的。建议与venv一起使用

$ pip install mlphon

用法

图形到音素分析示例

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

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java在JSP中添加自定义隐式对象   java MasterMindResource泄漏?   不同的c#java结果加密   java为什么安卓 studio显示“constraintlayout中缺少约束”错误?   java Make Logback将日志打印到文件中   java如何在Google应用程序引擎中设置日期时间?   jeditorpane如何阻止java HTMLEditorKit自动关闭我的标记   返回到Activity onCreate()时,不会调用java函数   java为什么我在这个对象上得到一个NullPointerException?   在java中,如何使用包含数组的参数调用图形方法?   java如何在Play framework 2应用程序中存储Akka参与者列表?   ssh使用java将文件从一个solaris 9复制到另一个solaris 9   网络Java服务器正在等待客户端响应   java Spring mvc从formBackingObject()重定向到页面   java Spark:JavaRDD<Tuple2>到javapairdd<>   java如何动态调用基类中由字符串值指定的子类方法?