Topic 3 Activities

Objective: to introduce students to the basic concepts on NLP using a fun and engaging activity that combines music and language.

Duration: 25 minutes

Materials: A list of simple sentences or phrases, such as “The cat is on the mat” or “I like ice cream“, A musical instrument or digital audio workstation (DAW) software that can be used to create simple melodies or rhythms, A microphone (optional)


  1. Teacher introduces the concept of NLP and explains how computers can be trained to understand and process human language. T explains that in this activity, Ss will use music to represent different aspects of language (e.g meaning of words)
  2. Students are divided into small groups and provided with a list of simple sentences/ phrases.
  3. Each group chooses one sentence or phrase from the list, and use the musical instrument or DAW software to create a melody or rhythm that represents the meaning or structure of the sentence (e.g. “The cat is on the mat” might be represented by a melody that starts low and gradually climbs higher, to represent the movement of the cat from the floor to the mat.)
  4. Students experiment with different musical elements, such as rhythm, tempo, and pitch, to create unique and expressive interpretations of their sentences.
  5. When completed with their musical representation, Ss are invited to perform or play their compositions for the class, and see if the rest of the class can guess what sentence or phrase they are representing.

Activity extension

As an extension activity, students can use a microphone and speech-to-text software to convert their spoken sentences into text, and then use natural language processing tools to analyse the text and extract information such as parts of speech or sentiment.

Software examples:

  • Goodle docs Voice Typing
  • Speechnotes
  • Otter voice notes

Objective: to demonstrate how to use NLP to analyze sentiment in text, and to use musical techniques to express that sentiment.

Duration: 45 minutes (depends on text length)

Materials: Text with varying degrees of sentiment, such as news articles, blog posts, or social media updates. (if students don’t bring themselves), a musical instrument or music software that can generate sounds (e.g., a keyboard, a digital audio workstation).


  1. Students select a piece of text to analyze for sentiment. This could be a short news article, a tweet, or any other text that has an emotional tone.
  2. Using a natural language processing library or tool (such as spaCy in Python), students will analyze the sentiment of the text and assign it a score (e.g., positive, negative, or neutral). The sentiment score can be represented as a numerical value, such as a score from -1 (very negative) to +1 (very positive).
  3. Using the sentiment score as a guide, students use a musical instrument or music software to create a musical piece that expresses the sentiment of the text. For example, if the sentiment score is very negative, students might use dissonant chords or harsh sounds to express the negative sentiment. Conversely, if the sentiment score is positive, students might use more consonant chords or softer sounds to express the positive sentiment.
  4. Groups present their musical pieces to the class and discuss how they used the sentiment analysis to guide their musical choices.

This exercise can be adjusted to suit the skill level of the students and can be done with a background in music. It provides a fun and creative way to demonstrate the application of natural language processing to music, and can help students better understand how sentiment analysis can be used to analyse and interpret text.

Objective: to introduce students to the concept of chatbots and how they can be used to interact with humans in natural ways, while also using music to reinforce the concepts learned.

Materials: A computer with internet access, access to a chatbot platform such as Chatfuel, ManyChat, or Chat GTP. a set of musical instruments or software that can be used to create music


  • Introduce the concept of chatbots to students, explaining how they are computer programs that can simulate conversation with humans. Explain that chatbots can be used for a variety of purposes, such as customer service, entertainment, and education.
  • Demonstrate how to create a simple chatbot using a platform such as Chatfuel or ManyChat. Explain that chatbots can be trained to recognize certain keywords or phrases and respond with pre-written messages or actions.
  • Divide students into pairs or small groups and have them create their own chatbots using the platform of their choice. Encourage them to think about the types of questions or responses their chatbots will need to handle, and to create a set of pre-written messages or actions to respond to those inputs.
  • Once the chatbots have been created, have each group share their chatbot with the class and allow students to test them out by typing in different questions or inputs.
  • Finally, have students use the musical instruments or software to create a piece of music that reflects the conversation they had with their chatbot. For example, they could assign different notes or chords to different types of responses, such as happy or sad emotions, and use those to create a musical composition that reflects the conversation.