Poetry Machine 3.0
Poetry Machine is a non-profit project for the Vietnamese community.
Introduction
Nowadays, young people get used to many types of modern entertainment and forget the traditional culture such as novels or poems. Poetry Machine is a non-profit project which aimed to assist people to make a (fun) poem and promote traditional arts and literature in Vietnam. The project was supported by TinhVan Group and ran under teams of TinhVan Incubator which was a place for young people and intern students who wanted to learn more about the business environment and the latest technologies.
Each type of poem strictly defines how to form a proper poem. For example, the numbers of words in each line (a sentence) depend on the order of the sentence. The next sentence might be longer than the previous sentence. The intonation of a specific sentence also might be restricted to make the poem sound melodious. Especially, syllables are very important to hold a poem smoothly, hence, picking up suitable words is the key to making a good poem.
Design of system
Two previous versions of Poetry Machine were programmed by Mr. HTo, and me. They were very simple forms of a webpage with a logical core in PHP. To improve its accuracy and enhance the user experience by adding more features, the project was large enough to involve multiple specific tasks.
The project was led by me and I was also the owner of logical core, services at the backend. The GUI and mobile apps on Android and iOS were developed by TinhVan incubators.

The logical core was coded in PHP and wrapped by XML API which can be publically queried by an app on a mobile or web browser by a user.
To work with literature and sentences, different tokenizers were deployed because in Vietnamese blanks are not only used to separate words but are also used to separate syllables that make up words. To tokenize (chop) words precisely, a word tagger was also running to know the group of words. During the time of development of the Poetry Machine, the NLP tools were not prominent for Vietnamese.
Another service was set up to monitor the system and investigated the network and resources while running backend services for the Poetry Machine.
The Algorithms
First of all, the algorithm to pick a word and fill a sentence was restricted to the rule of a specific type of poem. To choose a suitable word, the pool of words was limited to the same subject or content. Any non-sense and not-fairly meaningful words would be removed due to the limitation of the length of a sentence.
The words were randomly selected (after filtering non-suitable words). Many questions were asked, for example, the order of words or the meaning of the chosen words was inappropriate. However, the poem is very strict but also very open. Many famous authors came up with extraordinary ways or new words or strange orders of words and succeeded to create an eternal poem that stays deep in the reader’s heart.
The most successful was that the Machine created easily many poems with very impressive random content and highly enjoyable/entertaining. It also gives a good idea or word to assist one to make their own poem.
In version 3.0, people can make a poem with many types of sources. The Machine is able to roughly summarize a paragraph and make a poem out of it. Or it can make a poem with a secret message in it. Even more, one can make a future teller poem for himself/herself.
Final words
Although the Machine brings fun and laughter to people, it lessens the process of creating a poem and assists people to make their own with ease. To improve the meaning of a poem, better NLP tools should be developed and deployed. There was a try to use Machine Learning to learn from famous poems and authors to mimic to create a poem. But it sounds like copying rather than “creating” a poem. Nonetheless, Machine Learning is growing very fast in NLP and promising to be human-like.
source: http://thomay.vn/
You May Also Like
Machine Learning: Natural Language Processing
31 January 2023
Zimbra multi-tenancy service
1 September 2011