Creating a Poetry Classifier: A Step-by-Step Guide

Back to top

1) Machine Learning for Kids Platform

"Machine Learning for Kids" is an educational platform designed to introduce children to the concepts of machine learning and artificial intelligence (AI). This tool typically provides a hands-on, user-friendly experience where kids can create projects that use and demonstrate basic machine learning principles.

The platform often allows children to train simple models using data they collect or create. For example, they might train a model to recognize certain words, images or patterns. These projects are usually integrated with Scratch, a popular block-based visual programming language and online community targeted primarily at children. This integration allows kids to apply machine learning models in their Scratch projects, enabling them to see the practical applications of AI in a fun and engaging way.

The goal of such platforms is to make the complex and often abstract concepts of machine learning accessible to younger audiences, fostering interest in science, technology, engineering and mathematics (STEM) fields from an early age. By engaging with these platforms, children can learn about AI ethics, data collection, model training and how AI can be applied in real-world scenarios.

Back to top

2) Step by Step Guide

In the context of the Tensile project, students will be encouraged to discover their own poetic talent by writing their poems. Following this, through the program they develop, they will train their model to find correspondences with well-known poems or poets. This will enable further discussion and analysis of these models within the classroom setting, allowing students to explore poetic influences and how different poetic styles and themes are interconnected.

STEP 1:

Visit the website Machine Learning for Kids and either sign in to your existing account or create a new one

STEP2: 

Start a new project by selecting the "Text" project type, which is suitable for working with poems as they are text data.

STEP3:

Name your project, choosing a title related to poetry, such as "Greek Poets" or another poetry-themed title.

Enter your project and click the "Train" button. Ιn the train phase you collect examples of what the computer to learn to recognize. So, at this stage, you'll begin collecting examples of the data you want the computer to learn from.

Click on the "New Label" button and create a label, for instance, "SEFERIS". In the space provided (a created bucket for each subcategory) add examples from Seferis's poetry.

Include as many poets as possible, adding numerous poems under each poet's category. The more poems you add, the better the training will be. For example, in our following sample project we have started with just three poets, each with seven poems. However, we aim to build a more extensive repository with a broader range of poets and a larger collection of poems for each.

Remember, the more extensive and varied your collection of poems, the more effective the training process will be!

Once you have collected enough examples, you are ready to use them to train an ML model. Now, to start the training process, click: Train the Machine Learning model

The durations of this process depends on the type of project and the number of examples you have collected.

The training process might take 30 seconds, or it might take a few minutes. After the completion of training process, use the following frame to add a key-phrase to test your model.

ATTENTION!!! Immediately below there is the following frame:

If you press the button 'Train new machine learning model', your program will be trained again and the existing model will be automatically deleted and refreshed for 24 hours. Therefore, to maintain a model with many examples for each poet and many poets in your database, daily renewal of the model is required until you create it in Scratch and complete it.

Step 5: Now we will continue by getting a project ready in Scratch. Click “Make”.

Step 6: From the menu you can choose any programming language, we choose Scratch.

Click Scratch 3 and then click Open in Scratch 3 to open a new window with Scratch.

Step 6: Navigate directly to the Scratch interface.

Image removed.

Step 7: In the section list, your project will appear at the end in the Toolbox. Press it and you should see new blocks representing your ML model 

Image removed.

  • Step 8: In the following image, you can see an example of a simple training model, where you input verses and it recognizes the poet. Try to write your own poem, input it into the model you created and let it produce results on which poet your poem resembles.

You can think of much more complex projects with text analysis. You just need to feed your database with the appropriate data. Let your imagination create!!

Back to top

Alturayeif, N., Alturaief, N., & Alhathloul, Z. (2020). DeepScratch: Scratch programming language extension for deep learning education. International Journal of Advanced Computer Science and Applications, 11(7).

Chung, C. J., & Shamir, L. (2020). Introducing machine learning with scratch and robots as a pilot program for K-12 computer science education. science education, 6(7).

Lane, D. (2021). Machine learning for kids: A project-based introduction to artificial intelligence. No Starch Press.

 

Back to top