/autotext-gen-nlp

Primary LanguageJupyter Notebook

autotext-gen-nlp

This project, Automatic Text Generation works on Neural Networking (Long Short-Term Memory Architecture). It helps the user while typing by suggesting them, what could be the most probable current and next word for their sentence. This is provided with a Graphical User Interface, which consists of a text-input bar where the user can keep typing and the suggestions will pop-up below the input bar. From these suggestions the user can easily pick the preferred word by just double-clicking on the that word. This works in two parts, Next-word prediction and Current-word completion, which together makes up Automatic Text Generation.

Next-word Prediction: As the key is pressed, the text present in the input bar will be red, encoded and passed to the model prediction function. The resultant of prediction is in the form of an 1D array, which consists the probability of each and every token being next in the sentence (text). From there we pick (at most five) words with the highest probability, and return them in the form of the list to the GUI, where they appear as pop-up in the form of a list. Current-word Completion: From the prediction that we got while predicting the next word, we will match all the words present in our dictionary that are starting with the incomplete word present in the input box. The words which are matching and had a good probability of being next in the sentence are provided as the suggestion.