Crates.io | dada-poem-generator |
lib.rs | dada-poem-generator |
version | 0.1.1 |
source | src |
created_at | 2021-10-20 21:59:00.512463 |
updated_at | 2021-10-20 22:03:14.932229 |
description | Dadaist Poem Generator |
homepage | |
repository | https://github.com/HGHimself/dada |
max_upload_size | |
id | 468133 |
size | 4,022 |
https://en.wikipedia.org/wiki/Dada
TO MAKE A DADAIST POEM
Take a newspaper.
Take some scissors.
Choose from this paper an article of the length you want to make your poem.
Cut out the article.
Next carefully cut out each of the words that makes up this article and put them all in a bag.
Shake gently.
Next take out each cutting one after the other.
Copy conscientiously in the order in which they left the bag.
The poem will resemble you.
And there you are – an infinitely original author of charming sensibility, even though unappreciated by the vulgar herd.
This is a function that will take a string of any length and convert it into a Dadaist poem. Essentially rearranging the words into a random order.
use dada_poem_generator::dada;
fn main() {
let text = "TO MAKE A DADAIST POEM
Take a newspaper.
Take some scissors.
Choose from this paper an article of the length you want to make your poem.
Cut out the article.
Next carefully cut out each of the words that makes up this article and put them all in a bag.
Shake gently.
Next take out each cutting one after the other.
Copy conscientiously in the order in which they left the bag.
The poem will resemble you.
And there you are – an infinitely original author of charming sensibility, even though unappreciated by the vulgar herd.";
println!("{}", dada(text));
/* OUTPUTS
bag charming want all article
left in newspaper.
the some you.
POEM Take though words cut in an each out carefully the a each will makes.
a put they the.
this infinitely after of vulgar by an Choose one of The order out which Next Next length cutting make them.
other Take.
And you resemble scissors poem the to paper this.
unappreciated even the of Copy the out and your in author.
you original there from DADAIST.
Shake that bag MAKE – sensibility up TO Cut conscientiously take poem, gently herd article are A the article.
*/
}