Settings

Theme

Show HN: Rant, a procedural text generation language

github.com

155 points by atlantique 11 years ago · 36 comments

Reader

sloanesturz 11 years ago

I think this is how Peyton Manning chooses his audibles. <midwest-city> <soup-brand> <num:1:200>!

troels 11 years ago

Looks like an advanced version of "spintax"[0], which is popular amongst seo blackhatters. I could certainly see this as a replacement.

[0] http://umstrategies.com/what-is-spintax/

drcomputer 11 years ago

This is really cool, I had been working on something similar.

I do think it's a little 'pejorative' to try to computationally define creativity, though.

Creativity seems to involve so many levels of cognition, and it really seems like you can automate it, describe it, or define it.

But as soon as you seem to define it methodically, and think you've got it, it changes in a way you can't anticipate, but which draws you into it with this force you can't ignore or escape. It's incredibly frustrating, but it's also very human.

personjerry 11 years ago

Sorry, newbie here. Is there some sort of way to keep a reference to a generated term? For example if I generated the name "Mike" and wanted to use that same name several times.

dandelany 11 years ago

Very cool! I attempted a very primitive version of this for generating band names[1]. Now I'm tempted to port it to Rant :) One bit of advice though - the "getting started" section could be a bit more helpful for new users... it should at least mention the language it's written in (C#)!

[1] https://github.com/dandelany/band-name/blob/master/templates...

aton 11 years ago

What are some real world applications which use this approach of text generation?

  • untothebreach 11 years ago

    Well, they say that naming things is one of the hard problems in CS, right? Use this to generate names for all your functions/classes/variables. Just preprocess your source code before you compile!

  • webwarrior 11 years ago

    Procedural content generation in computer games.

jdp 11 years ago

I think these languages for generating data are really useful. There is one called Protodata (https://github.com/evincarofautumn/protodata) for generating binary data. From the README: "Protodata is a language for describing binary data, originally written for prototyping and reverse engineering binary file formats. It is particularly useful for generating annotated data in a custom format, without having to write custom editing tools."

e12e 11 years ago

This reminds me of polygen[1,2] that I discovered among the many programs packaged for Debian... but looks at least in some ways friendlier. Is it very limited/tailored/specialized for English?

[1] https://github.com/Enucatl/polygen [2} https://www.polygen.org [Mostly in Italian. I seem to recall there was a section in English ... but if there is I can't find any more]

fdb 11 years ago

I've made a similar project about two years ago in Python, called Choice Words [1]. I've had some really interesting results by encoding the grammar of SVG, which generates procedural drawings (the GitHub project shows an example).

My project was based on the Kant Generator, an example project from Dive Into Python[2].

[1] https://github.com/fdb/choicewords

[2] http://www.diveintopython.net/

cstross 11 years ago

Very cool.

I just wish I wasn't so certain that the developers of spamming tools will rip this off with shrieks of glee and use it to stuff our inboxes with yet more junk.

  • ssully 11 years ago

    Or to spam disqus comments on various sites. I always see similar spam bots with comments like "I agree with bob here. Let me also mention a great way to make 895 dollars a day from home".

    Also more on topic I could see Rant being helpful for online language lessons or something. I remember exercises in grammar school where you would have to identify parts of a sentence(ex: possessive pronouns, transitive verbs, etc). I think it would be fairly easy to use Rant to generate unique questions for each student. Not sure how practical or useful that actually is, but it could be fun to make.

  • aaronem 11 years ago

    Bit too complicated for them, really.

RexRollman 11 years ago

Interesting tool. I can't help but wonder if it could be used as a way to resist forensic linguistics.

krick 11 years ago

Maybe not bad, definitely has few very cool features (rhymes impressed me), but I'm struggling to imagine when I'd actually need to use it. Sometimes I do need some random natural language text for testing, but then I usually just copy something from wikipedia or some book and it's guaranteed to be more random and more natural than anything I'd generate myself. No, hardly I'll ever need to generate natural-language sentences using this. Generating something more primitive, like random IPs? Well, if I need few I hardly would struggle to remember syntax (or even name) of some tool I downloaded long time ago and never used since, or I need many structured data of some sort and then it's almost certain that using this DSL wouldn't be enough or simply practical, and I'd end up using Python (which already has libraries for generating random data anyway).

Edit: to guys who are actively minusing this comment, I would be grateful if somebody could actually suggest any use case.

  • doorhammer 11 years ago

    I think people are downvoting you because you're post reads something like, "This is neat, but useless and it's been done before."

    Fwiw I didn't downvote you, but it'd probably be taken better if you just said something like, "This is really interesting. I'm not sure what I'd use it for personally, but I'm interested in knowing if you had specific use cases in mind, and what sorts of projects are you seeing it be used in now?"

    For me, it looks like it'd be handy to use to generate test data and/or to make fun/weird little game apps, but still be able to keep everything in a .net language, since I work for a .net shop. (I could use python or whatever I want, really. we're flexible. it's just nice to keep things uniform)

  • drcomputer 11 years ago

    Being someone who wants to build something like this: there are plenty of uses that can build on top of text that is readable or meaningful. If you can get a computer to have a random conversation with itself, then that is very interesting.

Pinn2 11 years ago

I find the .gitignore a good way to gauge the quality of a repo. This one does not exhibit quality.

azinman2 11 years ago

I'm seeing a lot of people in comments talking about how they wrote something similar or other tools exist. Can someone explain their use cases that don't involce SEO or some other kind of thing that's "bad"?

dsplatonov 11 years ago

Very nice tool, thanks. Where can i find a documentation or a list of commands?

kagia 11 years ago

One place I can see this really shining is as part of a script that generates fixtures for Django apps.

sambeau 11 years ago

Fascinating - I've just written one of these for a project in Go.

Houshalter 11 years ago

Could this be used in reverse to match text?

chillzilla 11 years ago

Very fun!

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection