Git Product home page Git Product logo

toa_project's Introduction

Understanding the working of Transformers using Context Free Grammar

Demo Video

Overview.mp4

Description

This project was created to show our appreciation for our Theory of Automata teacher, Sir Adeel Ashraf. The goal of this project is to demonstrate how transformers like ChatGPT, Jasper.io, and many other transformers work. The project uses Context Free Grammar (CFG) to generate sentences that conform to a specific grammar. This project was created to fulfill a course requirement for the Theory of Automata (also known as the Theory of Computing) course taught by Sir Adeel Ashraf.

Documentation

Detailed Explaination of the document

Technologies Used

  • C++ programming language
  • Standard Template Library (STL)

How the project was created

The project was created using C++ programming language and the Standard Template Library (STL). The project consists of a set of grammar rules represented in 2D Vectors. The key-value pairs represent non-terminals (e.g. "S", "NP") and their possible expansions in the form of lists of lists of terminals and non-terminals (e.g. "Det", "N").

The project uses a backtracking algorithm to generate sentences that conform to the specified grammar. The algorithm starts with the "S" (sentence) non-terminal and recursively expands it using the rules specified in the grammar.

Authors

Contributing

Contributions are always welcome!

See contributing.md for ways to get started.

Please adhere to this project's code of conduct.

Run Locally

Clone the project

  git clone https://github.com/amaanmajeed/TOA_Project

Go to the project directory

  cd TOA_Project

create an executable file

  g++ main.cpp -o p

run the executable file

  ./p

toa_project's People

Contributors

amaanmajeed avatar

Watchers

 avatar

toa_project's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.