Code Monkey home page Code Monkey logo

clarifai's Introduction

clarif-AI

The Real-time assisted writing system provides the ability to suggest predictions for the next word to type. This makes typing faster, more intelligent and reduces effort. It is a Natural Language Processing concerned with predicting the text given the precceding text. It can be used as an web application.

๐Ÿ“ Methodology

Assistant system provides the ability to autocomplete words and suggests predictions for the next word. This makes typing faster, more intelligent and reduces effort. The implementation involves using a large corpus. The initial task will be to design a keyboard interface as a web app. The keyboard layout consists of all keys which are present on a physical keyboard. The keyboard's interface will show the top three predictions for a given word sequence and suggest word-completion. This interface will be achieved by designing in HTML, CSS and JavaScript. If space key is not pressed, then the server returns the auto-completions/spelling correction possible for the given word by using which of the word predictions previously made starts with the what the user is typing. If less than three such matches are found, the minimum edit distance module takes over and returns the remaining predictions, to make a total of three predictions at all times. These predictions are converted to JSON and sent to the keyboard module. The keyboard unwraps the JSON and puts the predictions over the keys. image

Models Considered for word prediction:

  • N-grams Model: Probabilistic models are used for computing the probability of an entire sentence or for giving a probabilistic prediction of what the next word will be in a sequence. This model involves looking at the conditional probability of a word given the previous words.If we consider each word occurring in its correct location as an independent event. We might represent this probability as:


We can use the chain rule of probability to decompose this probability:

Minimum Edit Distance:

  • LSTM Model: Long Short-Term Memory (LSTM) networks are a type of recurrent neural network capable of learning order dependence in sequence prediction problems. LSTM (Long Short-Term Memory) are very good for analyzing sequences of values and predicting the next one. LSTM model uses Deep learning with a network of artificial โ€œcellsโ€ that manage memory, making them better suited for text prediction than traditional neural networks and other models. LSTM have the ability to remove or add information to cell state regulated by structures called gates.

Advantage: Standard RNNs and other language models become less accurate when the gap between the context and the word to be predicted increases. Hereโ€™s when LSTM comes in use to tackle the long-term dependency problem because it has memory cells to remember the previous context.

๐Ÿค– Technology Stack:

  • Front-end - HTML, CSS, JS
  • Back-end - Flask, Python
  • Models - N-grams, LSTM
  • Frameworks - Keras, Tensorflow
  • Libraries - nltk, numpy

๐Ÿ› ๏ธ Project Setup

$ git clone https://github.com/Spnetic-5/clarifAI.git
$ python app.py 

๐Ÿ–ผ Working Example:

  • Hindi:

image

  • English:

image

DATASETS Used:

โšก Applications:

  • This project predicts the next possible word based on the input provided by the user. This project supports English as well as Hindi language.

๐Ÿ”ฎ Future Scope:

  • We could add an autocorrect feature like Grammarly.
  • Try to improve our LSTM model to maximize the results for the word /phrase prediction.
  • We could also implement an app where one can write an application letter and the app will predict the next appropriate words according to the subject of the letter.

๐Ÿ‘ฉโ€๐Ÿ’ป Contributors:

๐Ÿ‘จโ€๐Ÿซ Mentor:

๐Ÿ”— Acknowledgements:

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.