algorithm - NLP语法: fixing a to an?

标签 algorithm language-agnostic nlp

有没有办法检查a是否真的应该是句子中的an

例如,它确实应该修复以下问题:

一个苹果 => 一个苹果

但以下是正确的:

泌尿科医生

In English, the correct choice of a and an depends on the initial sound of a word, not on the initial letter, of the word that they precede. The letter a should be used before all words beginning with a consonant sound except silent h (an honor) and before words beginning with vowels that represent combined consonant and vowel sounds (university, unit).

最佳答案

使用文本到音标转换器并检查单词是否以元音开头。

英文拼音 http://www.phon.ucl.ac.uk/home/wells/phoneticsymbolsforenglish.htm

apple     ->  ˈæpl̩ 
urologist ->  jʊəˈrɒlədʒi 

编辑: 有一些特殊情况不适用该规则。

  • 历史悠久 -> hɪˈstɒrɪk
  • 可怕 -> həˈrɪfɪk
  • 酒店 -> ˌhəʊˈtel

更多信息请点击这里 http://www.oxforddictionaries.com/words/a-historic-event-or-an-historic-event

关于algorithm - NLP语法: fixing a to an?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23101198/

相关文章:

rest - 网页开发 : Complex processes: Are state machines the (only? ) 该怎么走?

language-agnostic - DRY 没有单个代码?

math - float 学有问题吗?

elasticsearch - Elasticsearch 中基于人类语言的搜索

c - 从包含数组的文件中存储/检索特定数组

javascript - 寻找三次贝塞尔曲线控制点的算法(实现细节)

algorithm - 有谁知道显示约翰逊算法动画的小程序?

r - 按组计算的累计最小值和最大值

java - Stanford NLP 中的所有注释都支持阿拉伯语吗?

java - 构建词性标注器(词性标注器)