H2WL is a Java library/tool generating every possible word from Hunspell dictionaries.
Currently, the tool is designed to handle the french Dictionary by Dicollecte.org but it should handle other dictionaries as well.
You can run it directly in the shell like this:
$ java -jar hunspell2wordlist
Or you can specify input and output files.
$ java -jar hunspell2wordlist data/dictionaryName outputFile.txt
First, add the Jar to the library path of your Java project. Then, you should be able to use it like this:
WordListGenerator generator = new WordListGenerator();
WordListGeneratorListener listener = new WordListGeneratorListener() {
@Override
public void onNewWord(Word newWord) {
System.out.println(newWord.getContent());
}
@Override
public void onGenerationEnd() { }
};
generator.setFileName("path/to/dictionary");
generator.addListener(listener);
generator.readFile();
generator.displayStatistics();
- Elouan Poupard-Cosquer aka Fanaen ([email protected])