PHP音节检测 [英] PHP Syllable Detection

查看:122
本文介绍了PHP音节检测的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想找到一种方法,可以用PHP将单词拆分成音节.例如,单词"nevermore"遍历了detect_syllables(),将返回"nev-er-more".有没有好的API或其他东西?

I would like to find a way to be able to split a word into syllables with PHP. For example, the word "nevermore" ran through detect_syllables(), would return "nev-er-more." Are there any good APIs or something out there?

推荐答案

Frank Liang撰写了一篇有用的 PHd论文对此描述了一种非常精确的算法:它写在25年前,仍然有效.但是我不知道在PHP中有任何实现方式

There's a useful PHd thesis paper by Frank Liang that describes an exceptionally accurate algorithm for this: written over 25 years ago, it's still valid. But I'm not aware of any implementation in PHP

编辑

一个快速的Google已经识别出此链接,该链接指向PHP中的文本统计库,其中包括用于单词内音节计数的算法(以及其他可读性测量算法).您应该可以在这里找到用于音节分割的代码.

A quick google has identified this link to a Text Statistics library in PHP, which includes algorithms for syllable counting within words (among other readability measuring algorithms). You should be able to find the code for syllable splitting here.

这篇关于PHP音节检测的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆