たぶんあなたが探しているのは形態素解析器です。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
}
});