我正在使用卡内基梅隆大学的发音词典来检测Python中的韵律,我想知道:我如何估计两个单词之间的音素相似性?换句话说,是否有一种算法可以识别“手”和“计划”比“手”和“薯条”更接近押韵的事实?一些背景:首先,我愿意说两个单词押韵,如果它们的重音音节和所有后续音节是相同的(如果您想在Python中复制的话,请使用):
with open('resources/c06d/c06d') a
尝试使用python 包装器,但抛出了以下错误: at cmu.arktweetnlp.util.BasicFileIO.openFileToReadUTF8(BasicFileIO.java:50)
at cmu.arktweetnlp.RunTagger.runTagger(RunTagger.ja
latitude = row[9]050000
编辑:也许这不是熊猫的问题,而是一般Python我对python相当陌生,我试图实现的是逐行解析选项卡分隔的文件,并将数据分配给变量并在一个循环中打印它们。这是输入文件示例:
050263 128.2.211.113 planetlab-1.cmcl.cs.cmu.edu NA US Allegheny County Pittsburghhttp:
at edu.cmu.sphinx.util.props.PropertySheet.getOwner() at edu.cmu.sphinx.frontend.FrontEnd.newProperties(PropertySheet ps)
at edu.cmu.sphinx.util.props.PropertySheet.getOwner(PropertySheet ps)
)at edu.cmu.sphinx.frontend.AutoCepstrum.newPropertiesat edu.cmu.sphinx.util.props.PropertySheet.getOwner(PropertySheet.java:508)
at edu.cmu.sphinx.util.props.PropertySheet.g
)at edu.cmu.sphinx.frontend.AutoCepstrum.newPropertiesat edu.cmu.sphinx.util.props.PropertySheet.getOwner(PropertySheet.java:508)
at edu.cmu.sphinx.util.props.PropertySheet.g
下面编写的代码使用Java 1.6和Eclipse Helios中的CMU Sphinx将音频转换为文本。;import edu.cmu.sphinx.api.StreamSpeechRecognizer;
at edu.cmu.sphinx.decoder.AbstractDecoder.newProperties(AbstractDecoder.java:71)
at edu.