Question: Overview A Diastic Machine is a poetry algorithm create by Jackson MacLinks to an external site.. The big picture: A file of text ( a
Overview
A Diastic Machine is a poetry algorithm create by Jackson MacLinks to an external site..
The big picture:
A file of text a story or something is used to grab words from
A seed phrase is used to determine which words are pulled from the document
A poem is generated
Example:
Seed Phrase: "magic show"
The first line of the poem is based on the word "magic"
The second line of the poem is based on the word "show"
Possible Output:
Line : My was beg register stances
Line : suppose Then whose showed
Notice that on line one, The first letter of the first word is the same as the first letter of the seed word, magic M
The second letter of the second word is the same as the second letter of the first seed word, magic A
and so on for each letter of the first seed word
Line follows the same pattern for the second word, show
If there were a third word in the seed phrase, then the third line would follow the same pattern with the third word
and so on for every word in the seed phrase
Related Lectures
Bonus Lecture #: Building a Diastic Machine Together
Details
Your version will have the following features:
The user will input the seed phrase in a web form
Using JavaScript realtime validation:
Do not enable the "SUBMIT" button unless they've entered only letters and spaces
As the user types, the button will enable and disable as the user types based on the validity of their input
The user will choose using a radio button or a drop down list which text story their poem will be based on
The page indexphp will either display the form or the resulting poem
There will be at least three tables created, one for each of the stories
You'll need to import the stories like we did in class.
Create a page with a link to it called stories.php
This page will have one button for each story you have in your database
Each button will say for example "view brain table" ie whatever the three or more table names you created
Upon clicking the button, it will print out records from the table in a random order
Every time I click the button, I'll get different records
Here's the query for a table called brain with the field holding the words called name:
"SELECT name FROM brain ORDER BY RAND LIMIT ;
CRITICAL NOTE: Without the above stories.php file and functionality, the assignment will not be graded. This must be present to get any points.
NOTES:
Create a folder called "diastic" to be placed in the root directory of your server or in the htdocs folder if you have one
Inside the folder will have the index.php file with the code described above
You can get the stories from the text file siteLinks to an external site. or any other resource you'd like.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
