Skip to content

sameer5469/TNSDC_Generative_AI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Next Word Prediction System

Overview

This project is a simple implementation of a next word prediction system using an N-gram model. Given a sequence of words, the system predicts the next word based on the probabilities calculated from a corpus of text data.

Features

  • Supports prediction for unigrams, bigrams, and trigrams.
  • Allows customization of N-gram size.
  • Provides an evaluation module for assessing prediction accuracy.
  • User-friendly interface for inputting text and viewing predictions.

Installation

  1. Clone the repository:
  2. Install dependencies:

Usage

   1. Prepare your text corpus and ensure it is in a suitable format.
   2. Run the preprocessing script to tokenize and clean the corpus:

Usage

   3. Train the model by specifying the N-gram size and the cleaned corpus file:
   4. Use the trained model for prediction:

Evaluation

To evaluate the prediction accuracy, run the evaluation script:

Contributing

Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or create a pull request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published