Once Upon A Time STORIES

This is a Generative Story Project by using context-Free Grammar with Tracery.

Code - github

DEMO

tracery.gif

TEXTS FROM APP

Once upon a time, there was a cold girl and it was a weird and lonely night. The girl was very cold. So, she wanted to go out to take some air.. On her way, she felt like she's slowly hungry and she decided to buy some 🍞 from the store. But Wait! Yehhuuuuuuuuu, she couldn't believe what she saw in front of her. There was a slowly bad prince in the store. Don't you be in the space? she asked confidently. No, I'm here to love you, He answered. It makes the girl so empty and they lived happily after.
Once upon a time, there was a 😎 girl and it was a sexy and lonely night. The girl was very dark. So, she wanted to go out to take some air.. On her way, she felt like she's enourmousy hungry and she decided to buy some 🍌 from the store. But Wait! Nooooooo, she couldn't believe what she saw in front of her. There was a kindly dark jaguar in the store. Don't you be in the backyard? she asked innocently. No, I'm here to hug you, He answered. It makes the girl so boring and they lived happily after.
Once upon a time, there was a sad girl and it was a 🔥 and lonely night. The girl was very sexy. So, she wanted to go out to take some air.. On her way, she felt like she's slowly hungry and she decided to buy some 🌯 from the store. But Wait! Whaaaat, she coudn't believe what she saw in front of her. There was a enormousy dark man in the store. Don't you be in the grave? she asked curiously. No, I'm here to murder you, He answered. It makes the girl so weird and they lived happily after.

The Fairy Tale Story

The Fairy Tale Story is a project which generates text from a Markov chain. The program reads in text from Levis Carroll's Alice’s Adventures in Wonderland and text from Franz Kafka's Metamorphosis generates a new text from character-based "n-gram" probabilities from the source texts. Each text is weighted accordingly to the slider.

The Metamorphosis by Franz Kafka

The Metamorphosis by Franz Kafka

Alice's Adventures in Wonderland by Lewis Caroll

Alice's Adventures in Wonderland by Lewis Caroll

The Metamorphosis plays an important part in fairy tales. People transformed into animals, princes into frogs, magical shifts of shape, size or color, have constituted one of the main pleasures of the fairy tale mode and Lewis Carroll is considered one of the best writers of fantastic stories for children's fiction. I wanted to combine these two novels which investigates uncertain “self“.

The Project can be improved by using uppercase letters in each paragraph.

DEMO

You can reach to code from below;

Code - Github
 

paragraphs generated from the project

Only bound friend of any agenda that the painting each pressive that it's importance. With no jurymen opened and final and he had cold it were place in the had never occasions. Redistribute corridor, probably trial was Germanently, as looked at the fact we ought K. came influenced. All that of course, said the words to be heard work and the lawyers." Mrs. Grubach by people had new items around him the cassociated it spoken front of the trial. They're all you," said the same floor, she course,” he bed, the Project Gutenberg" is attained to the businessman, had to gain eBooks laying tones for this indeed: she took down with Mrs. Grubach, "in my replied; he court is painterrupted with dragged himself down nature waited to achieved, as a longer. "Listened the could be a long time. They had presential standing this is a reflect that he turn. "I don't know of prompted he was saying and on that then K. nodding, and the air and herself. He senses, instantiated in the policeman, he's an object, with in passed; if you heard something him, love his big box her had thought to be arrest - it will also quickly look up at he said, "Get out to know of all round. "Look at you; what yourse, his like that had already talks of light to school ever you wanted like this is hope the Mock Turtle shrinking and had see but all. I need to speak to fresher will. Then she trial, and now what he was hard round then nodded loud, in a physical to have ground at it looked forgetting. K. had already, "I still surprised her, "why did not be don't knowing on now hastily, just he shadow building. "Don't needed it is," said, longer unsuspension was nothing seemed to Alice; “you now. And it's quickly as point from day more under that it not afraid the serving more. He dreadfully except that mad, you doubt," he first," said they do. Now what would nothing about you imagine you stay the last, you control of the party I can be of the time." "That's just needed and some not wanted, and brought.
Attentioner’s remark, and recognised you knew to get in - if Franz had became here were having very long to with a living round at regular works to the court of me? You grand put there was in the repeating delayed in them into alarm. It's only greeting." But she drew out it had on the could fall ridge of this head. "The one like today. There he walls of the trial's been putting his uncle, reason for him. "I'm sure I wanted and wanted to him to hold it. He would never at least time, to say it and would see Dr. Gregory B. Newby.
Plenty of all she went to beautiful Soup! Who is it had been in a ring, but it would do at length in that off!" Sometimes he meant to the efforts when he top and the judge wanted lessons,” the song, pleasantness was his woman had been have seems to sit onto the bank nothings!” Alice has an elegant and think the houses themselves against its are the wintercom, he hall. “But what no rest so that the long since gone theatre doorkeeper with electronic works, and for Block the drew his short, span often. What arises, included with he hand, and as Miss Bürstner, "the two policement over!” cried out of lower his first doorkeeper exclaimed K., and defections.”

Word Cloud

 
me.gif
 
Word Art.png
Word Art.jpeg
Word Art (1).png

I’ve explored the power of visual representation of text data by creating word cloud portrait

Word Art (1).jpeg

PROCESS

Word cloud text portrait design, I’ve created this project by using WordArt, which is an online word cloud art creator that enables you to create amazing word cloud art. I’ve tried other word cloud tools but this one was very powerful and flexible to use. This online tools have 5 features (words, shapes, fonts, layout and style). The tool provides you to import text either by directly typing it or using the web which will copy all the text from a particular website. You have the flexibility to remove common words such as ”and”, “an“, “the” etc .and numbers. There is an option “Stemming“ reduces words in to a single root. I found the tool very powerful, it populates the individual words within the text. You have the option to make your texts uppercase, lowercase sensitive. The fonts section contains some interesting display fonts but you can also add fonts if you like to. The layout section you can choose how you want your texts to be arrange (horizontal, vertical, random etc.)

I wanted to use my own portrait but the tool also provides some shapes that you can fill with wordclouds. After I downloaded my image I’ve adjust the size and density of text as well as the portrait itself like threshold and edges. you can use the image’s own colors or pick custom color palette.

I’ve used the website Words to Use and selected “Women“ as my subject for this project and use the words to describe women. I don’t know how ethical to use a website like this to describe very sensitive word that contains a lot of meaning. Maybe that would be interesting to use a poem you wrote or lyrics that reflects more personalized adjectives about you.

ADOBE PHOTOSHOP

STEP 1: Insert the image in to photoshop

STEP 1: Insert the image in to photoshop

STEP 2: Outline the image with Quick Selection tool

STEP 2: Outline the image with Quick Selection tool

STEP 3: Mask it and Convert to Smart Object

STEP 3: Mask it and Convert to Smart Object

I’ve explored a lot of ways to create word cloud with the images you like to use. It is also possible to create word cloud directly with photoshop without using any external website. After the 3 step above you can add another layer and write the texts you like to use with type tool and arrange the positions. Then, cmd+click the thumbnail of the text to make a selection of your text and mask it.

I had so much fun doing this assignment. I believe combining the words with an image itself have a very strong impact. It’s also very interesting thinking about what words we choose while we’re describing an image, a portrait or an object is an another subject. What if I would improve this project by trying to describe an abstract form/object with the description of most likely used words.

Working with API's

This week’s assignment was to work with an API and use loadJSON() function. I’ve worked on JavaScript fetch API and used await and async. I’ve created two apps for this week.

TEXT’N SPEECH

For one of my project I’ve used Web Speech API. Basically, Web Speech API makes web apps able to handle voice data. It provides two distinct functionality. One of them is speech recognition the other one is speech synthesis. I’ve worked on text to speech functionality and created an app where you can write whatever you want get the results in speech. You can also select a voice and accent.

Web's powerful scriptability, including the DOM and all of the related APIs and interfaces you can use to build Web content and apps.

Screen Shot 2020-09-27 at 5.47.50 PM.png
  • Speech synthesis is accessed via the SpeechSynthesis interface, a text-to-speech component that allows programs to read out their text content (normally via the device's default speech synthesiser.) Different voice types are represented by SpeechSynthesisVoice objects, and different parts of text that you want to be spoken are represented by SpeechSynthesisUtterance objects. You can get these spoken by passing them to the SpeechSynthesis.speak() method.

Screen Shot 2020-09-27 at 5.52.15 PM.png

COVID 19 TRACKER APP USING ASYNC AWAIT AND FETCH API

For my second project, I’ve built a coronavirus (Covid19) tracker app. using async and await and fetch api. The idea is simple I’ve an input and you write the country name and click on get data button. As a result you can get the latest confirmed, recovered cases and number of deaths.

Screen Shot 2020-09-27 at 6.04.23 PM.png

The API I’ve used for this project is covid19api which you can reach the documentation from here. Data is sourced from Johns Hopkins CSSE. John Hopkins University is one of the most trusted sources of COVID-19 data. We can say the relaying information is from a reputable source.

Covid-19 API is free and doesn’t require a subscribtion. This API allows you to follow the progress of the coronavirus around the world. Data returned includes the number of new, active, critical, recovered, and total cases by country. You can also get historical COVID-19 data filtered by country.

Screen Shot 2020-09-27 at 6.15.42 PM.png

You can reach the codes from below;

CONSTRAINED WRITING

By using Frank Sinatra’s New York lyrics as a text file, I’ve manually performed Erasure(artform) constrained writing technique but by changing it with “replace”. I’ve created a webpage with the results using some combination of HTML, CSS and JavaScript. I’ve included the text file and loadStrings() from my JS file. By using the method String.prototype.replace() I’ve returned a new string with the word New York and replace with my town Istanbul. I’ve include interactive elements by looking at the text file, count the words and depending how frequently they are used draw them randomly on to the canvas in size order. In this case, the word “New York“ was the most frequently used string so it has the bigger font size.

ny.gif

You can reach the code below;

Github

Glitch

During this project, I’ve hard time by using above method because it wasn’t getting p(my text) with the strings. So I’ve used p.toString() to get the words from my variable.

My other struggle was not being able to use join(p”,<br/>”) function to get the lyrics lines in the order. The line of code i’ve used was;

createP(p.toString().replace(regex,”Istanbul“));