
Rant – An all-purpose procedural text engine - sansnomme
https://github.com/TheBerkin/rant
======
mdaniel
I was expecting to find a reference in the comments to Baba
[https://github.com/Lokaltog/baba-
core#readme](https://github.com/Lokaltog/baba-core#readme) and its [in]famous
example [https://git-man-page-generator.lokaltog.net](https://git-man-page-
generator.lokaltog.net)

------
Space_Lord_
Related, if you're looking for more information:

[https://www.reddit.com/r/gamedev/comments/2nagbb/i_created_r...](https://www.reddit.com/r/gamedev/comments/2nagbb/i_created_rant_a_language_to_make_procedural_text/)

[https://berkin.me/rant/](https://berkin.me/rant/)

------
abledon
This would be a cool addon into a Unity C# game, easily spin up some
procedural dialog by NPCs, have some rhyming characters, spit out some 'clues'
in their rhymes then save those as text variables and store them in the
environments puzzle as solution pieces. Kind of dehumanizing though for the
game, like sucking out the soul.

~~~
Eli_P
That's the way the heart of games like _Event[0]_ or _Façade_ works.

------
IngoK
This is really a fun library to play with! :)

I've just written a little post about using Rant in Python if someone doesn't
want to go into C#.

[https://kleiber.me/blog/2019/02/08/quick-tip-text-
generation...](https://kleiber.me/blog/2019/02/08/quick-tip-text-generation-
rant-python/)

~~~
mboto
Excellent post, I was looking for something in python.

------
evacchi
Reminds me of polygen (Italian)
[https://polygen.org/it/manuale](https://polygen.org/it/manuale)

------
benj111
I'm reading the replies here trying to ID the one generated by Rant.

------
arduinomancer
Really neat. This is something I wouldn’t even know to look for as a library.

------
atemerev
Nice! Let’s write some Twitter bots with that...

------
theandrewbailey
I made a random sentence generator in Python about 10 years ago. It doesn't
have any kind of pattern control (totally random), but it has different lists
of nouns, verbs, adjectives, etc, and outputs grammatically correct sentences.
I might steal some ideas from this, if I ever get around to working on it
again.

------
porker
I've looked for this and never found the right search term. Nice!

Likewise, I can't identify the search terms to find a library for extracting
data from a text corpus - e.g. to identify addresses, dates, names, phone
numbers. Does one exist?

I've smashed together a few regular expressions to brute-force it, but the
accuracy is very low.

~~~
thom
Loosely you're talking about named entity recognition/extraction (strictly you
might not include addresses etc under this definition who but who cares). You
might get some mileage out of tools like:

[https://nlp.stanford.edu/software/CRF-
NER.shtml](https://nlp.stanford.edu/software/CRF-NER.shtml)

~~~
najarvg
Stanford NER is very powerful. If you dont want to mess around with Java,
there are also Python libraries that do this very effectively and easier to
get started on (e.g. NLTK or Spacy). A high level intro for both with code
snippets - [https://towardsdatascience.com/named-entity-recognition-
with...](https://towardsdatascience.com/named-entity-recognition-with-nltk-
and-spacy-8c4a7d88e7da)

------
midgetjones
This looks great! Is there anything similar available in other languages?

BTW if the author is about, there's a broken link at the bottom of the
homepage, to [https://berkin.me/rantdocs](https://berkin.me/rantdocs)

~~~
Jenz
How I wish this was in C.

~~~
gameswithgo
could ahead of time compile it to a native dll and pretend

~~~
Jenz
Oh? Friend, may you link me to wherever I can learn more about this? I wanted
this in C, so that I could bind it to Crystal [1].

[1]: [https://crystal-lang.org](https://crystal-lang.org)

------
moomin
Funnily enough, there was a procedural text generation system in Cambridge
(Phoenix) back in the day called... RANT.

There was also one called TOAD which was more venerable and popular. Anyone
posting word salad was inevitably accused of using TOAD’s output.

------
moopling
I used this a while back when I was researching a way to help people with
macular degeneration. I'd created some visual distortions which could be
applied to a VR headset (if you had eye-tracking information) which I hoped
would improve reading ability in MD patients. I used Rant to generate some
random text in Unity and then measured how reading speed varied.

~~~
TheBerkin
Rant dev here-- Wow! This has to be the most interesting use case I've heard
of in a while.

------
mmastrac
This reminds me of an unrelated C program called "rant" from 30+ years ago:

[https://grack.com/code/legacy/rant/rant.c](https://grack.com/code/legacy/rant/rant.c)

------
mastrsushi
Sounds like a fun personal project, but looks like another esoteric language
no one will use.

------
hsndmoose
Download link on website busted for me. Hugged to death? Getting BlobNotFound.

------
kemitchell
It's just a rabbit!

> It has been refined to include a dizzying array of features...

RUN AWAY!

------
appleflaxen
this is a topic related to spintext, which is a technique for spam-filter
avoidance.

------
dmix
But, why?

------
rdiddly
This is the most hilarious package. Can't wait to try it out!

------
PM_ME_YOUR_PUFZ
I was bored of regular expressions anyway

------
onion-soup
AAaaaaand it still looks like a machine code, not human readable code:

[rs:10;\s]{[rn]. - what is this?

::&a> ?? what is a? what is $?

~~~
TheBerkin
Hi, most of this is shorthand for either several functions or functions with
longer names. For example, [rs:10;\s] is the same as [rep:10][sep:\s].

The last example is used to synchronize results between dictionary queries.
This particular one is short for "output the same word as any other query to
this table with the match ID 'a'."

In retrospect it was a poor decision to use shorthand forms in prominent
example snippets, and I'll consider revising them.

