1

可能重复:
动词变位数据库

我在 MySQL 中寻找一个英文单词数据库,或者很容易转换为 MySQL,它包含动词变位和复数/单数形式。我查看了几个选项:WordNet、GCIDE 等。

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

我的问题类似于这个: 动词共轭数据库

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

4

1 回答 1

0

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

您可以使用来自 Perl 的 Jspell 使用Lingua::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
        }
    });
于 2012-04-17T17:32:23.477 回答