Skip to content

Java library/tool generating every possible word from Hunspell dictionaries

License

Notifications You must be signed in to change notification settings

Fanaen/Hunspell2WordList

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hunspell2WordList

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.

Use it as a tool

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

Use it as a library

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();

Contributors

About

Java library/tool generating every possible word from Hunspell dictionaries

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages