英语单词database with plurals / conjugations

时间:2012-04-17 16:27:07

标签: mysql database nlp

  

可能重复:
  Verb Conjugations Database

我正在寻找MySQL中的英文单词数据库,或者可以轻松转换为MySQL,其中包含动词变形和复数/单数形式。我看了几个选项:WordNet,GCIDE等。

然而,GCIDE似乎并不全面,WordNet似乎没有用时态标记结合(如果我错了,请纠正我)。

我的问题与此类似: Verb Conjugations Database

但似乎没有令人满意的免费解决方案。

1 个答案:

答案 0 :(得分:0)

也许您正在寻找的是形态分析仪。尝试WebJspell检查JSpell是否会对您有所帮助。

您可以使用Lingua::Jspell使用Perl的Jspell。其文档包含大量示例。

如果您确实需要添加到数据库的单词列表,可以从JSpell字典中提取它。看一下foreach_word方法。下面的示例代码应该指导您,但我无法尝试,所以我不确定它是否会起作用。

$dic = jspell::dict::init("../en/en.dic") or die "could not open en.dic";
$en_dict = jspell::new("en") or die "could not load en

$dic->foreach_word(
    sub {
        # gets each word from dictionary

        my @der = $en_dict->der($word);

        foreach $dword (@der) {
            # gets the features
        my @fea = $pt_dict->fea($dword);
            # do something with the $dword and the array of features @fea
        }
    });