A cross platform (tested on linux/win32) c++ console
application for generating word or character-based
output using markov chains.
When used in character mode with a list of surnames
(one per line) from a particular language, the program
can generate quite plausible sounding last names for
the language in question:
French |
Bachet |
Gaumard |
Charthier |
Beaudier |
Fourieux |
German |
Wurselmann |
Fleidt |
Mühl |
Keisch |
Wachmider |
Italian |
Perrazzi |
Antellio |
Balducchi |
Espolini |
Barracetta |
Russian |
Kupov |
Rozova |
Vorovsky |
Rashev |
Brezhin |
Spanish |
Navedo |
Aguillez |
Varro |
De Larez |
Correz |
It also does reasonably well on H.P Lovecraft characters:
- Y'goth
- Baohtep
- Yibb-Nar
- Zullah
- Nyog-Hr'her
And Biblical names:
- Damiel
- Sholah
- Gethim
- Azriah
- Jezepham
When run in word mode, the output looks something like:
- Matt Decker : On Earth, we have a brandy.
- The resulting torrential flood of illogic would
be illogical, doctor.
- Anyhow, I don't agree with Spock, but he was dead.
- Spock : This is a mystery, and I don't belong anymore.
- Spock : Random chance seems to be able to land someplace
and say "Behold, I am relaxing.
- Dr. McCoy : It would be interesting to impress your
memory engrams on a mushroom?
- Spock : Thank you, doctor, I will have a brandy.
- There are veils of luminescent materials and crowned by
a shock impact, some of the Genesis effect.
Program Usage
Usage: markov.exe fileName { arguments }
nOutputWords: integer > 0, amount of output to generate
-c: operate on characters instead of words
-x: exit on dead end instead of choosing a random word
-r: random starting pair instead of first pair
-d: debug output
Compiling
unix: g++ -W -Wall -o markov.exe markov.cpp
win32: cl -W3 -GX markov.cpp
Source Code
|
|
Sample Input Files
(german, russian, etc.)
|
Return to Main |