THOTH

What is Thoth? Language generation made simple

Have you ever needed to use random words in your program? What about a novel? Do you have trouble coming up with names? Well you're in luck, because LugoCorp's Thoth is here to save the day! Thoth isn't just a word generator, it creates entire languages! All you have to do is pass in a random seed to get a word generator. From there Thoth will spit out as many lexigraphically similar words as your little heart desires.

Developers can use Thoth as a C++ library to embed in their own projects or as a command line tool for quick and dirty word generation. You can generate a couple words on this site in the try it out section or you can download the Thoth app. We're even considering making a movie. There's just no limit to the ways Thoth can be used!


Try it out Online word generator

Thoth builds quality word generators both quickly and efficiently. But don't take my word for it, try it out for yourself! Click generate to watch procedural words appear before your very eyes.

Disclaimer nothing will appear before your eyes if your browser does not support WebAssembly :(


Getting started Language generation in C++

Want to start using Thoth in your products? Great! Once you download and install our library from the Thoth GitHub repo, just copy/paste the boilerplate code provided below. Happy Thothing!

Hint compile the example above with "g++ -std=c++11 file.cpp -lthoth"


Documentation Learn Thoth

namespace thoth

This is the namespace for the entire Thoth library.

void init()

You'll need to call this function before using any other Thoth functions or classes. It initializes the ban table so that Thoth knows what syllables are too random-looking.

class thoth::Language

This class is where all the magic happens!

Language()

Initializes a Language object with random language and word seeds.

Language(unsigned long seed)

Initializes a Language object with a random word seed and specified language seed.

void clear_model()

Resets the Language object to its initial state just after construction. This removes all syllables added by novel_syllables and destroys the word generator created by generate_model.

void generate_model()

Processes a list of syllables into an internal word generator.

unsigned long get_lang_seed()

Returns the Language object's language seed.

unsigned long get_word_seed()

Returns the Language object's word seed.

void load_model(string filename)

Calls clear_model and then loads the syllables and word generator stored in the file at filename.

string new_word(int l)

Returns a brand new word from the Language's internal word generator.

void novel_syllables(int n)

Loads the Language object with n syllables to be used for later word generation.

void print_model()

Prints some internal information on the Language object. This method is used for debugging purposes.

void print_syllables()

Prints all of the Language object's syllables. This method is used for debugging purposes.

void save_model(string filename)

Serializes the Language object (including its syllables and word generator) into the file at filename.

void set_seed(unsigned long seed)

Sets the Language object's word seed to the specified number.