×
1 Choose EITC/EITCA Certificates
2 Learn and take online exams
3 Get your IT skills certified

Confirm your IT skills and competencies under the European IT Certification framework from anywhere in the world fully online.

EITCA Academy

Digital skills attestation standard by the European IT Certification Institute aiming to support Digital Society development

SIGN IN YOUR ACCOUNT TO HAVE ACCESS TO DIFFERENT FEATURES

CREATE AN ACCOUNT FORGOT YOUR PASSWORD?

FORGOT YOUR DETAILS?

AAH, WAIT, I REMEMBER NOW!

CREATE ACCOUNT

ALREADY HAVE AN ACCOUNT?
EUROPEAN INFORMATION TECHNOLOGIES CERTIFICATION ACADEMY - ATTESTING YOUR PROFESSIONAL DIGITAL SKILLS
  • SIGN UP
  • LOGIN
  • SUPPORT

EITCA Academy

EITCA Academy

The European Information Technologies Certification Institute - EITCI ASBL

Certification Provider

EITCI Institute ASBL

Brussels, European Union

Governing European IT Certification (EITC) framework in support of the IT professionalism and Digital Society

  • CERTIFICATES
    • EITCA ACADEMIES
      • EITCA ACADEMIES CATALOGUE<
      • EITCA/CG COMPUTER GRAPHICS
      • EITCA/IS INFORMATION SECURITY
      • EITCA/BI BUSINESS INFORMATION
      • EITCA/KC KEY COMPETENCIES
      • EITCA/EG E-GOVERNMENT
      • EITCA/WD WEB DEVELOPMENT
      • EITCA/AI ARTIFICIAL INTELLIGENCE
    • EITC CERTIFICATES
      • EITC CERTIFICATES CATALOGUE<
      • COMPUTER GRAPHICS CERTIFICATES
      • WEB DESIGN CERTIFICATES
      • 3D DESIGN CERTIFICATES
      • OFFICE IT CERTIFICATES
      • BITCOIN BLOCKCHAIN CERTIFICATE
      • WORDPRESS CERTIFICATE
      • CLOUD PLATFORM CERTIFICATENEW
    • EITC CERTIFICATES
      • INTERNET CERTIFICATES
      • CRYPTOGRAPHY CERTIFICATES
      • BUSINESS IT CERTIFICATES
      • TELEWORK CERTIFICATES
      • PROGRAMMING CERTIFICATES
      • DIGITAL PORTRAIT CERTIFICATE
      • WEB DEVELOPMENT CERTIFICATES
      • DEEP LEARNING CERTIFICATESNEW
    • CERTIFICATES FOR
      • EU PUBLIC ADMINISTRATION
      • TEACHERS AND EDUCATORS
      • IT SECURITY PROFESSIONALS
      • GRAPHICS DESIGNERS & ARTISTS
      • BUSINESSMEN AND MANAGERS
      • BLOCKCHAIN DEVELOPERS
      • WEB DEVELOPERS
      • CLOUD AI EXPERTSNEW
  • FEATURED
  • SUBSIDY
  • HOW IT WORKS
  •   IT ID
  • ABOUT
  • CONTACT
  • MY ORDER
    Your current order is empty.
EITCIINSTITUTE
CERTIFIED

How are n-grams used in the training process of training an AI model to create poetry?

by EITCA Academy / Saturday, 05 August 2023 / Published in Artificial Intelligence, EITC/AI/TFF TensorFlow Fundamentals, Natural Language Processing with TensorFlow, Training AI to create poetry, Examination review

In the realm of Artificial Intelligence (AI), the training process of training an AI model to create poetry involves various techniques to generate coherent and aesthetically pleasing text. One such technique is the use of n-grams, which play a important role in capturing the contextual relationships between words or characters in a given text corpus. By understanding how n-grams are utilized in the training process, we can gain insights into the mechanics of AI poetry generation.

To begin, let us first define what n-grams are. In the context of natural language processing (NLP), an n-gram refers to a contiguous sequence of n items, where an item can be a word, character, or even a subword unit. For instance, in the sentence "The cat is sitting on the mat," the 2-grams (also known as bigrams) would be "The cat," "cat is," "is sitting," "sitting on," and "on the," among others.

In the training process of training an AI model to create poetry, n-grams are used to learn the statistical patterns and dependencies within the text corpus. This knowledge is then leveraged to generate new text that adheres to the learned patterns. By analyzing the frequencies of different n-grams in the training data, the AI model can understand the likelihood of certain sequences occurring and use this information to generate coherent and contextually appropriate text.

One common approach is to use n-grams in conjunction with language models, such as the n-gram language model or more advanced models like recurrent neural networks (RNNs) or transformers. These models learn to predict the next word or character given the previous n-1 words or characters. By training the model on a large corpus of poetry, it can learn the stylistic and semantic nuances of poetic language.

For example, suppose we have a training corpus consisting of various poems. We can tokenize the text into n-grams of a specific size, such as 2-grams or 3-grams. Each n-gram sequence becomes a training example, where the first n-1 words or characters are used as input, and the last word or character is the target for prediction. This process is repeated for all n-grams in the corpus, allowing the model to learn the conditional probabilities of different words or characters given the preceding sequence.

During the training phase, the AI model adjusts its internal parameters to minimize the prediction error. By iteratively updating these parameters using optimization algorithms like stochastic gradient descent, the model gradually improves its ability to generate poetry that aligns with the patterns observed in the training data.

Once the AI model is trained, it can be used to generate new poetry by sampling from the learned probability distributions. Starting with an initial seed or prompt, the model generates the next word or character based on the probabilities learned during training. This process is repeated iteratively, with each generated word or character becoming part of the input for predicting the next one. By considering the context provided by the preceding words or characters, the model generates poetry that exhibits coherence and adherence to the learned patterns.

N-grams are an integral part of training AI models to create poetry. By capturing the contextual relationships between words or characters, n-grams enable the model to learn the statistical patterns and dependencies within the training data. Leveraging this knowledge, the model can generate new poetry that aligns with the learned patterns, resulting in aesthetically pleasing and contextually appropriate text.

Other recent questions and answers regarding EITC/AI/TFF TensorFlow Fundamentals:

  • What is the maximum number of steps that a RNN can memorize avoiding the vanishing gradient problem and the maximum steps that LSTM can memorize?
  • Is a backpropagation neural network similar to a recurrent neural network?
  • How can one use an embedding layer to automatically assign proper axes for a plot of representation of words as vectors?
  • What is the purpose of max pooling in a CNN?
  • How is the feature extraction process in a convolutional neural network (CNN) applied to image recognition?
  • Is it necessary to use an asynchronous learning function for machine learning models running in TensorFlow.js?
  • What is the TensorFlow Keras Tokenizer API maximum number of words parameter?
  • Can TensorFlow Keras Tokenizer API be used to find most frequent words?
  • What is TOCO?
  • What is the relationship between a number of epochs in a machine learning model and the accuracy of prediction from running the model?

View more questions and answers in EITC/AI/TFF TensorFlow Fundamentals

More questions and answers:

  • Field: Artificial Intelligence
  • Programme: EITC/AI/TFF TensorFlow Fundamentals (go to the certification programme)
  • Lesson: Natural Language Processing with TensorFlow (go to related lesson)
  • Topic: Training AI to create poetry (go to related topic)
  • Examination review
Tagged under: AI Training, Artificial Intelligence, Language Models, N-grams, Natural Language Processing, Poetry Generation
Home » Artificial Intelligence / EITC/AI/TFF TensorFlow Fundamentals / Examination review / Natural Language Processing with TensorFlow / Training AI to create poetry » How are n-grams used in the training process of training an AI model to create poetry?

Certification Center

USER MENU

  • My Account

CERTIFICATE CATEGORY

  • EITC Certification (106)
  • EITCA Certification (9)

What are you looking for?

  • Introduction
  • How it works?
  • EITCA Academies
  • EITCI DSJC Subsidy
  • Full EITC catalogue
  • Your order
  • Featured
  •   IT ID
  • EITCA reviews (Reddit publ.)
  • About
  • Contact
  • Cookie Policy (EU)

EITCA Academy is a part of the European IT Certification framework

The European IT Certification framework has been established in 2008 as a Europe based and vendor independent standard in widely accessible online certification of digital skills and competencies in many areas of professional digital specializations. The EITC framework is governed by the European IT Certification Institute (EITCI), a non-profit certification authority supporting information society growth and bridging the digital skills gap in the EU.

    EITCA Academy Secretary Office

    European IT Certification Institute ASBL
    Brussels, Belgium, European Union

    EITC / EITCA Certification Framework Operator
    Governing European IT Certification Standard
    Access contact form or call +32 25887351

    Follow EITCI on Twitter
    Visit EITCA Academy on Facebook
    Engage with EITCA Academy on LinkedIn
    Check out EITCI and EITCA videos on YouTube

    Funded by the European Union

    Funded by the European Regional Development Fund (ERDF) and the European Social Fund (ESF), governed by the EITCI Institute since 2008

    Information Security Policy | DSRRM and GDPR Policy | Data Protection Policy | Record of Processing Activities | HSE Policy | Anti-Corruption Policy | Modern Slavery Policy

    Automatically translate to your language

    Terms and Conditions | Privacy Policy
    Follow @EITCI
    EITCA Academy

    Your browser doesn't support the HTML5 CANVAS tag.

    • Web Development
    • Cybersecurity
    • Artificial Intelligence
    • Quantum Information
    • Cloud Computing
    • GET SOCIAL
    EITCA Academy


    © 2008-2026  European IT Certification Institute
    Brussels, Belgium, European Union

    TOP
    CHAT WITH SUPPORT
    Do you have any questions?
    We will reply here and by email. Your conversation is tracked with a support token.