Sign In to Follow Application
View All Documents & Correspondence

A Method And System For Character To Character Modeling For Word Suggestion And Auto Correction

Abstract: A METHOD AND SYSTEM FOR CHARACTER-TO-CHARACTER MODELING FOR WORD SUGGESTION AND AUTO-CORRECTION ABSTRACT The present invention provides a method and a system for character-to-character modeling for word suggestion and auto correction. The method is based on character-to-character modeling. The method involves data preparation using edit distance and hash table for encoder. The edit distance is employed for suitable candidate creation for touch input and thereafter, hash table is employed for removing invalid candidates. Furthermore, encoder-decoder model is used to encode valid candidates for touch input and then decode into word suggestions for completions. In addition, the present invention provides word suggestions from decoder, further optimized into more probable candidates using a language model with a scoring and ranking algorithm. [FIG. 1]

Get Free WhatsApp Updates!
Notices, Deadlines & Correspondence

Patent Information

Application #
Filing Date
22 September 2023
Publication Number
50/2023
Publication Type
INA
Invention Field
COMPUTER SCIENCE
Status
Email
Parent Application

Applicants

TALENT UNLIMITED ONLINE SERVICES PRIVATE LIMITED
808, Devika Tower, Nehru Place, South Delhi, Delhi, India, 110019

Inventors

1. ANKIT PRASAD
C/O Dr Ranjit Prasad Parmanu Institute, Parmanu Nagar, Adityapur- Kandra Road, PO- Adityapur Industrial Area, Jamshedpur, Jharkhand 832109, India
2. RAHUL PRASAD
C/O Dr Ranjit Prasad Parmanu Institute, Parmanu Nagar, Adityapur- Kandra Road, PO- Adityapur Industrial Area, Jamshedpur, Jharkhand 832109, India
3. ACHYUT SAXENA
In front of kali temple, Jawahar Market, Sadabad, Hathras, Uttar Pradesh 281306, India
4. SIDDHARTH AGARWAL
261, Block-B, Lake Town, near Patanjali Megastore, Kolkata, West Bengal 700089, India

Specification

Description:A) TECHNICAL FIELD
[0001] The present invention is generally related to the field of mobile applications based on artificial intelligence. The present invention is particularly related to a method and system for word prediction based on deep learning models. The present invention is more particularly related to deep learning model-based system and method for contextualized word prediction through textual and visual communication mediums such as chatting applications, virtual text input methods like keyboards, social networking applications, and operating systems.

B) BACKGROUND OF THE INVENTION
[0002] Computers and other electronic devices such as mobile phones, laptops, and tablets are widely used for text-based communication in the connected world. Nowadays, various communication devices with applications are available to facilitate staying connected with friends, family, and professional colleagues. Most people spend a significant amount of time each day using mobile device keyboards for composing emails, texting, engaging in social media, and more. Yet, mobile keyboards are still cumbersome to handle. The average user is roughly 35% slower typing on a mobile device than on a physical keyboard. To aid a user in typing quickly and accurately, many communication applications incorporate features for word completion or text prediction. Word completion, or auto-complete, is a feature in a communication or messaging application that predicts the rest of a word a user is typing based on the first letters typed. Word completion speeds up human-computer interactions by correctly predicting words being typed. Furthermore, Context completion is a text editor feature, similar to word completion, which completes words (or entire phrases) based on the current context and context of other similar words within the same document, or within some training data set. An advantage of context completion over word completion is the ability to predict anticipated words more precisely and even with no initial letters.
[0003] Moreover, there are various applications that help users complete text entry by suggesting words that are consistent with text already entered by the user. Therefore, intelligent text entry systems are the need of the hour. However, the text entry systems with word completions along with auto-corrections are already in practice. Any modern text entry system requires a strong decoder for word suggestions as well as for auto-corrections while keeping error minimum during touch/tap to key mapping. Furthermore, mobile keyboards are subjected to mainly two types of error, one is errors due to fat finger typing, and another is cognitive and motor errors. One of the most prominent prior available methods considered is a virtual keyboard application for Android. The virtual keyboard application for intelligent text entry is made up of a combination of a deep learning network known as Long Short-Term Memory (LSTM) and Fine State Transducers (FST). The LSTM is used for reducing errors in touch to key mappings and FST is used for finding or predicting the most likely words or word sequences for the given input touch sequence.
[0004] However, the existing system available is slow in providing word suggestions or auto-corrections and requires more space since it is larger in size. Therefore, the existing system utilizes more time as the number of tap/ touch entries by the user required to reach the intended words or sequence is greater.
[0005] Hence, in view of this, there is a need for a system and method for character-to-character modeling for word suggestion, employing spatial correlations between characters of words, by suggesting all possibilities for word completions and auto-correction options for accepted suggestions.
[0006] The above-mentioned shortcomings, disadvantages, and problems are addressed herein, and which will be understood by reading and studying the following specification.
C) OBJECT OF THE INVENTION
[0007] The primary object of the present invention is to provide a method and a system for character-to-character modeling for word suggestion and auto-correction.
[0008] Another object of the present invention is to provide a method and a system for suggesting all possibilities of word completion by employing spatial correlations between characters of words.
[0009] Yet another object of the present invention is to provide a method and system for word completion, along with an auto-correction option for accepted suggestions.
[0010] Yet another object of the present invention is to provide a method and a system for character-to-character modeling for word suggestion and auto-correction through three stages such as data preparation stage, prediction stage, and final stage.
[0011] Yet another object of the present invention is to provide a method and a system for character-to-character modeling for word suggestion and auto-correction by utilizing smaller size or lesser space as the system involves a smaller number of parameters.
[0012] Yet another object of the present invention is to provide a method and a system for character-to-character modeling for word suggestion and auto-correction, utilizing a reduced amount of time and thereby saving user time by saving a number of tap/touch entries by the user required to reach intended words or sequence.
[0013] Another object of the present invention is to provide a method and a system for character-to-character modeling for word suggestion and auto-correction, by utilizing edit distance and hash table in the data preparation stage for optimizing input to the encoder and thus, reducing the number of words to be encoded, and in turn reducing latency time.
[0014] Yet another object of the present invention is to provide a method and a system for character-to-character modeling for word suggestion and auto-correction, employing a convolution block in the encoder for capturing the relationship between characters within words by reading spatial correlation and optimizing input for the decoder to decode suggestions for word completions.
[0015] These and other objects and advantages of the present invention will become readily apparent from the following detailed description taken in conjunction with the accompanying drawings.
D) SUMMARY OF THE INVENTION
[0016] The various embodiments of the present invention provide a system and a method for character-to-character modeling for word suggestion and auto-correction. The method involves various stages, such as a data preparation stage, wherein the data is prepared using an edit distance and a hash table for an encoder. The edit distance is employed for suitable candidate creation for touch input, and subsequently, the hash table is employed for removing invalid candidates. An encoder-decoder model is used to encode valid candidates for touch input and then decode the candidates into word suggestions for completion. Further, in the encoder, a convolution block is introduced before bidirectional LSTM (Long Short-Term Memory) to encode spatial information. Hence, the encoder is basically an RNN (Recurrent Neural Network) of CNN (Convolutional Neural Network). Furthermore, the decoder is an LSTM followed by the Neural Network Classifier for selecting word suggestions. Finally, the word suggestions from the decoder are further optimized into more probable candidates using a language model with a scoring and ranking algorithm.
[0017] According to one embodiment of the present invention, a method for character-to-character modeling for word suggestion and auto-correction is provided. The method comprises inputting text in the text field by a user through a keyboard and performing text cleaning. The method further involves ensuring the last character of the text provided by the user in the text field is a space or a letter. Further, the method involves invoking word suggestion or auto-correction, if the text entered by the user ends with a letter, such that the method for word suggestion or auto-correction comprises the steps of: creating candidates with an edit distance; filtering valid candidates by using a hash table; assigning scores to the valid candidates to obtain a plurality of candidates; passing each of the plurality of candidates to an encoder-decoder model to obtain completed words; concatenating each of the completed words and assigning scores and ranking; and displaying the word suggestion on a suggestion strip. The candidates are possible words suggested or auto-corrected by the method as the user types in the text field. Besides, the valid candidates comprise only the alphabet of the desired language. Furthermore, the method involves invoking word prediction, if the text entered by the user ends with space; and the method for word prediction comprises the steps of: fetching an auto-corrected candidate from the last suggestion; calculating the score for the auto-corrected candidate, and selecting the auto-corrected candidate with the highest score; replacing the last word with a threshold candidate and sending the text for next word prediction if the score of the auto-corrected candidate is greater than the threshold candidate; sending the text for next word prediction if the score of the auto-corrected candidate is less than the threshold candidate; and obtaining the next word prediction and displaying the word prediction on the suggestion strip.
[0018] According to one embodiment of the present invention, text cleaning is a process to remove the invalid characters in the text before subjecting the characters in the text to tokenization. The invalid characters include special characters, numbers, and other characters excluding alphabets. Tokenization is a process of providing number representation for each letter in the text.
[0019] According to one embodiment of the present invention, the edit distance is a measure of the difference between two words, achieved by performing actions including insertion, deletion, and substitution. Each of the actions performed individually is counted as a step and the edit distance is the number of times each step is performed to reach one word to another. For instance, an example of 1 edit distance is Apple and Apples, Whom and Who, Where and Here, and Cat and Bat. Hence, the edit distance feature induces proximity errors in the dataset to tackle auto-correction. Once the data is prepared, the data is passed through the tokenizers, which allot each letter a particular token, and the token is a number representation for each letter.
[0020] According to one embodiment of the present invention, the hash table is used to remove invalid candidates based on a valid prefix list to obtain valid characters. The valid prefix list is a list with at least a minimum of one letter as input, comprising only alphabets of the desired language, and provided with a token number. Moreover, the token number is the number representation for each letter in the text. All other characters other than the alphabet are considered to be invalid inputs. In addition, the valid prefix list can also end with a space invoking word prediction, and end with a letter thus invoking either word suggestion or auto-correction.
[0021] According to one embodiment of the present invention, the method consists of three stages for word suggestion, auto-correction, and word prediction, including a data preparation stage, a prediction stage, and a word suggestion stage to obtain the output involving word suggestion, word/auto-correction, and word prediction. The data preparation stage comprises creating a candidate using the edit distance and removing invalid candidates based on valid prefix lists using the hash table to obtain valid candidates. The prediction stage involves passing the valid candidates from the data preparation stage as input to an encoder and decoding output through a decoder. The encoder is a deep learning model made with cascade interconnection of convolutional block and bi-directional LSTM (Long Short-Term Memory) for encoding the output of the data preparation stage. Furthermore, the decoder is an LSTM (Long Short-Term Memory) based model for predicting all possible suggestions for word completion. Correspondingly, the word suggestion stage involves providing word suggestions to the user along with auto-correction after the end of the word, encountering space from the keyboard.
[0022] According to one embodiment of the present invention, the encoder model is composed of multiple layers, including an embedding layer, a convolution block comprising multiple convolutional layers, batch normalization, and bidirectional LSTM, to provide an output that is passed to the decoder. The embedding layer transforms input words into dense numerical vectors, capturing semantic relationships and contextual data. Furthermore, the convolutional block helps to manage sequential input by identifying local patterns and pulling out pertinent information from nearby words or letters to predict the next word from the text input. In addition, the bidirectional LSTM processes the input sequence simultaneously in both forward and backward directions, enabling the encoder model to extract context from both past and future data. The bidirectional LSTM is also assigned weights which are used as the initial weights for the decoder.
[0023] According to one embodiment of the present invention, the decoder model obtains the input from the encoder model, which is passed through multiple layers comprising an embedding layer, an LSTM layer, and a dense layer to provide word suggestions. The LSTM layer helps in the collection and retention of long-term dependencies in the input text. The dense layer carries out the final classification or regression operation in a language model by translating the learned features to the desired output format. Furthermore, the word suggestions obtained from the decoder are optimized into probable candidates by using beam search, language model, penalty, and ranking. The beam search involves optimizing the time and solution. The language model controls the scoring according to the valid prefix given by the user and the candidates obtained from the decoder. Further, the penalty influences the score by checking the distance between the last word of the valid prefix input provided by the user and the output obtained by the decoder and penalizing the score according to the distance between the two words. The ranking helps to sort all the candidates according to the score, to provide top-k score candidates.
[0024] According to one embodiment of the present invention, a computer-implemented system comprising instructions stored on a non-transitory computer-readable storage medium and executed on a hardware processor in a computer system for character-to-character modeling for word suggestion and auto-correction is provided. The system comprises a data preparation module configured to obtain input text into the text field by a user through a keyboard and perform text cleaning. The data preparation module is also configured to invoke word suggestion or auto-correction by creating candidates with an edit distance and filtering valid candidates by using a hash table if the text entered by the user ends with a letter to invoke word prediction by fetching auto-corrected candidate from the last suggestion if the text entered by the user ends with a space. Further, the candidates are possible words suggested or auto corrected by the system as the user types in the text field, and the valid candidates comprise only alphabets of the desired language. Furthermore, the system comprises a prediction module configured to receive input from the data preparation module to provide word suggestions for completion or word prediction as output. The prediction module is also configured to provide word suggestions by assigning scores to the valid candidates, which is the output of the data preparation module to obtain a plurality of candidates and passing each of the plurality of candidates to an encoder-decoder model to obtain completed words. Furthermore, the prediction module is also configured to provide word prediction by calculating the score for the auto-corrected candidate, selecting the auto-corrected candidate with the highest score, replacing the last word with a threshold candidate, sending the text for next word prediction, if the score of the auto-corrected candidate is greater than the threshold candidate, and sending the text for next word prediction, if the score of the auto-corrected candidate is less than the threshold candidate. Moreover, the system comprises a word suggestion module configured to provide word suggestions as output by concatenating each of the completed words of the prediction module, assigning score and rank, and displaying the word suggestion on a suggestion strip. The system also comprises a word prediction module configured to provide word prediction by obtaining the next word prediction from the prediction module and displaying the word prediction on the suggestion strip.
[0025] According to one embodiment of the present invention, text cleaning by the data preparation module is a process to remove the invalid characters in the text before subjecting the characters in the text to tokenization. The invalid characters include special characters, numbers, and other characters excluding alphabets. Tokenization is a process of providing number representation for each letter in the text.
[0026] According to one embodiment of the present invention, the edit distance performed by the data preparation module is a measure of the difference between two words, achieved by performing actions including insertion, deletion, and substitution. Each of the actions performed individually is counted as a step and the edit distance is the number of times each step is performed to reach one word to another. For instance, an example of 1 edit distance is Apple and Apples, Whom and Who, Where and Here, and Cat and Bat. Hence, the edit distance feature induces proximity errors in the dataset to tackle auto-correction. Once the data is prepared, the data is passed through the tokenizers, which allot each letter a particular token, and the token is a number representation for each letter.
[0027] According to one embodiment of the present invention, the hash table is used by the data preparation module to remove invalid candidates based on a valid prefix list to obtain valid characters. The valid prefix list is a list with at least a minimum of one letter as input, comprising only alphabets of the desired language, and provided with a token number. Moreover, the token number is the number representation for each letter in the text. All other characters other than the alphabet are considered to be invalid inputs. In addition, the valid prefix list can also end with a space invoking word prediction, and end with a letter thus invoking either word suggestion or auto-correction.
[0028] According to one embodiment of the present invention, the system consists of three stages for word suggestion, auto-correction, and word prediction, including a data preparation stage, a prediction stage, and a word suggestion stage to obtain the output involving word suggestion, word/auto-correction, and word prediction. The data preparation stage comprises creating a candidate using the edit distance and removing invalid candidates based on valid prefix lists using the hash table to obtain valid candidates using the data preparation module. The prediction stage involves passing the valid candidates from the data preparation stage as input to an encoder and decoding output through a decoder using the prediction module. The encoder is a deep learning model made with cascade interconnection of convolutional block and bi-directional LSTM (Long Short-Term Memory) for encoding output of the data preparation stage. Furthermore, the decoder is an LSTM (Long Short-Term Memory) based model for predicting all possible suggestions for word completion. Correspondingly, the word suggestion stage involves providing word suggestions to the user along with auto-correction after the end of the word, encountering space from the keyboard through a word suggestion or word prediction module.
[0029] According to one embodiment of the present invention, the encoder model of the prediction module is composed of multiple layers, including an embedding layer, a convolutional block comprising multiple convolutional layers, batch normalization, and bidirectional LSTM, to provide an output that is passed to the decoder. The embedding layer transforms input words into dense numerical vectors, capturing semantic relationships and contextual data. Furthermore, the convolutional block helps to manage sequential input by identifying local patterns and pulling out pertinent information from nearby words or letters to predict the next word from the text input. In addition, the bidirectional LSTM processes the input sequence simultaneously in both forward and backward directions, enabling the encoder model to extract context from both past and future data. The bidirectional LSTM is also assigned weights which are used as the initial weights for the decoder.
[0030] According to one embodiment of the present invention, the decoder model of the prediction module obtains the input from the encoder model, which is passed through multiple layers comprising an embedding layer, an LSTM layer, and a dense layer to provide word suggestions. The LSTM layer helps in the collection and retention of long-term dependencies in the input text. The dense layer carries out the final classification or regression operation in a language model by translating the learned features to the desired output format. Furthermore, the word suggestions obtained from the decoder of the prediction module are optimized into probable candidates by using beam search, language model, penalty, and ranking. The beam search involves optimizing the time and solution. The language model controls the scoring according to the valid prefix given by the user and the candidates obtained from the decoder. Further, the penalty influences the score by checking the distance between the last word of the valid prefix input provided by the user and the output obtained by the decoder and penalizing the score according to the distance between the two words. The ranking helps to sort all the candidates according to the score, to provide top-k score candidates.
[0031] These and other aspects of the embodiments herein will be better appreciated and understood when considered in conjunction with the following description and the accompanying drawings. It should be understood, however, that the following descriptions, while indicating the preferred embodiments and numerous specific details thereof, are given by way of an illustration and not of a limitation. Many changes and modifications may be made within the scope of the embodiments herein without departing from the spirit thereof, and the embodiments herein include all such modifications.
E) BRIEF DESCRIPTION OF THE DRAWINGS
[0029] The other objects, features, and advantages will occur to those skilled in the art from the following description of the preferred embodiment and the accompanying drawings in which:
[0030] FIG. 1 illustrates a flowchart on the method for character-to-character modeling for word suggestion and auto-correction, according to an embodiment of the present invention.
[0031] FIG. 2 illustrates an architectural block diagram of an exemplary implementation of the system for character-to-character modeling for word suggestion and auto-correction, according to an embodiment of the present invention.
[0032] FIG. 3 illustrates a convolutional block in the encoder, according to an embodiment of the present invention.
[0033] FIG. 4A illustrates an encoder model architecture, according to an embodiment of the present invention.
[0034] FIG. 4B illustrates the screenshot of the encoder model summary, according to an embodiment of the present invention.
[0035] FIG. 5A illustrates a decoder model architecture, according to an embodiment of the present invention.
[0036] FIG. 5B illustrates the screenshot of the decoder model summary, according to an embodiment of the present invention.
[0037] Although the specific features of the present invention are shown in some drawings and not in others. This is done for convenience only as each feature may be combined with any or all of the other features in accordance with the present invention.
F) DETAILED DESCRIPTION OF THE INVENTION
[0038] In the following detailed description, a reference is made to the accompanying drawings that form a part hereof, and in which the specific embodiments that may be practiced is shown by way of illustration. These embodiments are described in sufficient detail to enable those skilled in the art to practice the embodiments and it is to be understood that the logical, mechanical, and other changes may be made without departing from the scope of the embodiments. The following detailed description is therefore not to be taken in a limiting sense.
[0039] The various embodiments of the present invention provide a system and a method for character-to-character modeling for word suggestion and auto-correction. The method involves various stages, such as a data preparation stage, wherein the data is prepared using an edit distance and a hash table for an encoder. The edit distance is employed for suitable candidate creation for touch input, and subsequently, the hash table is employed for removing invalid candidates. An encoder-decoder model is used to encode valid candidates for touch input and then decode the candidates into word suggestions for completion. Further, in the encoder, a convolution block comprising multiple convolution layers is introduced before bidirectional LSTM (Long Short-Term Memory) to encode spatial information. Hence, the encoder is basically an RNN (Recurrent Neural Network) of CNN (Convolutional Neural Network). Furthermore, the decoder is an LSTM followed by the Neural Network Classifier for selecting word suggestions. Finally, the word suggestions from the decoder are further optimized into more probable candidates using a language model with a scoring and ranking algorithm.
[0040] According to one embodiment of the present invention, a method for character-to-character modeling for word suggestion and auto-correction is provided. The method comprises inputting text in the text field by a user through a keyboard and performing text cleaning. The method further involves ensuring the last character of the text provided by the user in the text field is a space or a letter. Further, the method involves invoking word suggestion or auto-correction, if the text entered by the user ends with a letter, such that the method for word suggestion or auto-correction comprises the steps of: creating candidates with an edit distance; filtering valid candidates by using a hash table; assigning scores to the valid candidates to obtain a plurality of candidates; passing each of the plurality of candidates to an encoder-decoder model to obtain completed words; concatenating each of the completed words and assigning scores and ranking; and displaying the word suggestion on a suggestion strip. The candidates are possible words suggested or auto-corrected by the method as the user types in the text field. Besides, the valid candidates comprise only the alphabet of the desired language. Furthermore, the method involves invoking word prediction, if the text entered by the user ends with a space; and the method for word prediction comprises the steps of: fetching an auto-corrected candidate from the last suggestion; calculating the score for the auto-corrected candidate, and selecting the auto-corrected candidate with the highest score; replacing the last word with a threshold candidate and sending the text for next word prediction if the score of the auto-corrected candidate is greater than the threshold candidate; sending the text for next word prediction if the score of the auto-corrected candidate is less than the threshold candidate; and obtaining the next word prediction and displaying the word prediction on the suggestion strip.
[0041] According to one embodiment of the present invention, text cleaning is a process to remove the invalid characters in the text before subjecting the characters in the text to tokenization. The invalid characters include special characters, numbers, and other characters excluding alphabets. Tokenization is a process of providing number representation for each letter in the text.
[0042] According to one embodiment of the present invention, the edit distance is a measure of the difference between two words, achieved by performing actions including insertion, deletion, and substitution. Each of the actions performed individually is counted as a step and the edit distance is the number of times each step is performed to reach one word to another. For instance, an example of 1 edit distance is Apple and Apples, Whom and Who, Where and Here, and Cat and Bat. Hence, the edit distance feature induces proximity errors in the dataset to tackle auto-correction. Once the data is prepared, the data is passed through the tokenizers, which allot each letter a particular token, and the token is a number representation for each letter.
[0043] Furthermore, robust data is prepared with the edit distance, such that the edit distance provides the data that helps in auto-correction, word suggestion, and prediction. The data used for training has two columns, i.e., the text and the target output. A normal sentence is broken down into further small sentences in a progressive manner. The example below shows how a sentence is broken down into small sentences so as to obtain auto-completion and word prediction:
Input, Output
Meeting , id
Meeting ic, id
Meeting ir, id
Meeting i, id
Meeting jd, id
In this way, the edit distance also takes the previous words of the sentence into consideration. Furthermore, for auto-correction, the proximity error is injected into the data, such that while typing, the highest probability of a mistype is the user presses the wrong key while writing, which is going to be in proximity to the letter it was aiming for. The proximity error is induced with the consideration of 1 edit distance if the word is less than 4 letters and 2 edit distances for words above 4 letters. Hence, the edit distance is the difference between two words. For instance, for the word’s apple and apples, rest and rust have an edit distance of 1 in between them, and the action steps the edit distance takes to reach from one word to another includes addition, removal, or substitution of a particular letter.
[0044] According to one embodiment of the present invention, the hash table is used to remove invalid candidates based on a valid prefix list to obtain valid characters. The valid prefix list is a list with at least a minimum of one letter as input, comprising only alphabets of the desired language, and provided with a token number. Moreover, the token number is the number representation for each letter in the text. All other characters other than the alphabet are considered to be invalid inputs. In addition, the valid prefix list can also end with a space invoking word prediction, and end with a letter thus invoking either word suggestion or auto-correction.
[0045] According to one embodiment of the present invention, the method consists of three stages for word suggestion, auto-correction, and word prediction, including a data preparation stage, a prediction stage, and a word suggestion stage to obtain the output involving word suggestion, word/auto-correction, and word prediction. The data preparation stage comprises creating a candidate using the edit distance and removing invalid candidates based on valid prefix lists using the hash table to obtain valid candidates. The prediction stage involves passing the valid candidates from the data preparation stage as input to an encoder and decoding output through a decoder. The encoder is a deep learning model made with cascade interconnection of convolutional block and bi-directional LSTM (Long Short-Term Memory) for encoding the output of the data preparation stage. Furthermore, the decoder is an LSTM (Long Short-Term Memory) based model for predicting all possible suggestions for word completion. Correspondingly, the word suggestion stage involves providing word suggestions to the user along with auto-correction after the end of the word, encountering space from the keyboard.
[0046] According to one embodiment of the present invention, the encoder model is composed of multiple layers, including an embedding layer, a convolutional block comprising multiple convolutional layers, batch normalization, and bidirectional LSTM, to provide an output that is passed to the decoder. The embedding layer transforms input words into dense numerical vectors, capturing semantic relationships and contextual data. Furthermore, the convolutional block helps to manage sequential input by identifying local patterns and pulling out pertinent information from nearby words or letters to predict the next word from the text input. In addition, the bidirectional LSTM processes the input sequence simultaneously in both forward and backward directions, enabling the encoder model to extract context from both past and future data. The bidirectional LSTM is also assigned weights which are used as the initial weights for the decoder.
[0047] Furthermore, the convolutional block of the encoder is used to extract regional patterns and characteristics from the sequential input in a language model where the objective is to predict the next word from a text input. Considering the input text to be a list of words, a vector or embedded representation of each word is possible, and the kernel size or filter size of the convolutional block, which scans the input text, is a sliding window with a fixed size. Moreover, the convolutional block conducts a convolutional mathematical operation as it moves the window over the input. With this action, a new feature representation can be created, also known as a feature map, by combining the values in the window. The number of filters applied to the layer determines the size of the feature map. Hence, the convolution block helps to identify regional dependencies and patterns in the text. For instance, the convolution block can identify particular word or phrase combinations that tend to appear together frequently. Furthermore, the convolutional block can also train various filters, each of which focuses on capturing a particular pattern or feature. The convolutional block can recognize several local patterns simultaneously by utilizing multiple filters, which improves its capacity to comprehend the context of the input text. In order to further process and integrate the collected features, the output of the convolutional block is often sent via other layers like pooling layers or recurrent layers like LSTM. In order to forecast the probability distribution of the word from the learned representations, a thick layer, or SoftMax layer, is eventually frequently used.
[0048] Moreover, the convolutional block is introduced before bidirectional LSTM (Long Short-Term Memory) to encode spatial information. Intermittently, the user while typing tends not to rectify their typos, thereby the coordinates that are being touched by the user can be added as additional information in input to the model to provide better results on correction, suggestion, and prediction. Hence, each letter is divided into four specific coordinates so as to avoid unique inputs and limit it just like characters. These coordinates help to understand and get extra information if the user might have typed an incorrect/proximity letter.
[0049] According to one embodiment of the present invention, the decoder model obtains the input from the encoder model, which is passed through multiple layers comprising an embedding layer, an LSTM layer, and a dense layer to provide word suggestions. The LSTM layer helps in the collection and retention of long-term dependencies in the input text. The dense layer carries out the final classification, delete or regression operation in a language model by translating the learned features to the desired output format. Furthermore, the word suggestions obtained from the decoder are optimized into probable candidates by using beam search, language model, penalty, and ranking. The beam search involves optimizing the time and solution. The language model controls the scoring according to the valid prefix given by the user and the candidates obtained from the decoder. Further, the penalty influences the score by checking the distance between the last word of the valid prefix input provided by the user and the output obtained by the decoder and penalizing the score according to the distance between the two words. The ranking helps to sort all the candidates according to the score, to provide top-k score candidates.
[0050] Furthermore, the language model includes multiple dictionaries, starting with bigrams and to pentagrams. The multiple dictionaries also have the keys for every prefix, and their items are all possible words for that prefix written by the users. Each of these words also has a score associated with it, indicating the frequency at which the user uses it. Also, in the language model, more preference is given to higher n-gram dictionaries.
[0051] According to one embodiment of the present invention, a computer-implemented system comprising instructions stored on a non-transitory computer-readable storage medium and executed on a hardware processor in a computer system for character-to-character modeling for word suggestion and auto-correction is provided. The system comprises a data preparation module configured to obtain input text into the text field by a user through a keyboard and perform text cleaning. The data preparation module is also configured to invoke word suggestion or auto-correction by creating candidates with an edit distance and filtering valid candidates by using a hash table if the text entered by the user ends with a letter to invoke word prediction by fetching auto-corrected candidate from the last suggestion if the text entered by the user ends with a space. Further, the candidates are possible words suggested or auto-corrected by the system as the user types in the text field, and the valid candidates comprise only alphabets of the desired language. Furthermore, the system comprises a prediction module configured to receive input from the data preparation module to provide word suggestions for completion or word prediction as output. The prediction module is also configured to provide word suggestions by assigning scores to the valid candidates, which is the output of the data preparation module to obtain a plurality of candidates and passing each of the plurality of candidates to an encoder-decoder model to obtain completed words. Furthermore, the prediction module is also configured to provide word prediction by calculating the score for the auto-corrected candidate, selecting the auto-corrected candidate with the highest score, replacing the last word with a threshold candidate, sending the text for next word prediction, if the score of the auto-corrected candidate is greater than the threshold candidate, and sending the text for next word prediction, if the score of the auto-corrected candidate is less than the threshold candidate. Moreover, the system comprises a word suggestion module configured to provide word suggestions as output by concatenating each of the completed words of the prediction module, assigning scores and ranks, and displaying the word suggestion on a suggestion strip. The system also comprises a word prediction module configured to provide word prediction by obtaining the next word prediction from the prediction module and displaying the word prediction on the suggestion strip.
[0052] According to one embodiment of the present invention, text cleaning by the data preparation module is a process to remove the invalid characters in the text before subjecting the characters in the text to tokenization. The invalid characters include special characters, numbers, and other characters excluding alphabets. Tokenization is a process of providing number representation for each letter in the text.
[0053] According to one embodiment of the present invention, the edit distance performed by the data preparation module is a measure of the difference between two words, achieved by performing actions including insertion, deletion, and substitution. Each of the actions performed individually is counted as a step and the edit distance is the number of times each step is performed to reach one word to another. For instance, an example of 1 edit distance is Apple and Apples, Whom and Who, Where and Here, and Cat and Bat. Hence, the edit distance feature induces proximity errors in the dataset to tackle auto-correction. Once the data is prepared, the data is passed through the tokenizers, which allot each letter a particular token, and the token is a number representation for each letter.
[0054] Furthermore, robust data is prepared with the edit distance, such that the edit distance provides the data that helps in auto-correction, word suggestion, and prediction. The data used for training has two columns, i.e., the text and the target output. A normal sentence is broken down into further small sentences in a progressive manner. The example below shows how a sentence is broken down into small sentences so as to obtain auto-completion and word prediction:
Input, Output
Meeting , id
Meeting ic, id
Meeting ir, id
Meeting i, id
Meeting jd, id
In this way, the edit distance also takes the previous words of the sentence into consideration. Furthermore, for autocorrection, the proximity error is injected into the data, such that while typing, the highest probability of a mistype is the user presses the wrong key while writing, which is going to be in proximity to the letter it was aiming for. The proximity error is induced with the consideration of 1 edit distance if the word is less than 4 letters and 2 edit distances for words above 4 letters. Hence, the edit distance is the difference between two words. For instance, for the word’s apple and apples, rest and rust have an edit distance of 1 in between them, and the action steps the edit distance takes to reach from one word to another includes addition, removal, or substitution of a particular letter.
[0055] According to one embodiment of the present invention, the hash table is used by the data preparation module to remove invalid candidates based on a valid prefix list to obtain valid characters. The valid prefix list is a list with at least a minimum of one letter as input, comprising only alphabets of the desired language, and provided with a token number. Moreover, the token number is the number representation for each letter in the text. All other characters other than the alphabet are considered to be invalid inputs. In addition, the valid prefix list can also end with a space invoking word prediction, and end with a letter thus invoking either word suggestion or auto-correction.
[0056] According to one embodiment of the present invention, the system consists of three stages for word suggestion, auto-correction, and word prediction, including a data preparation stage, a prediction stage, and a word suggestion stage to obtain the output involving word suggestion, word/auto-correction, and word prediction. The data preparation stage comprises creating a candidate using the edit distance and removing invalid candidates based on valid prefix lists using the hash table to obtain valid candidates using the data preparation module. The prediction stage involves passing the valid candidates from the data preparation stage as input to an encoder and decoding output through a decoder using the prediction module. The encoder is a deep learning model made with cascade interconnection of a convolutional block comprising multiple convolutional layers and bi-directional LSTM (Long Short-Term Memory) for encoding the output of the data preparation stage. Furthermore, the decoder is an LSTM (Long Short-Term Memory) based model for predicting all possible suggestions for word completion. Correspondingly, the word suggestion stage involves providing word suggestions to the user along with auto-correction after the end of the word, encountering space from the keyboard through a word suggestion or word prediction module.
[0057] According to one embodiment of the present invention, the encoder model of the prediction module is composed of multiple layers, including an embedding layer, a convolutional block comprising multiple convolutional layers, batch normalization, and bidirectional LSTM, to provide an output that is passed to the decoder. The embedding layer transforms input words into dense numerical vectors, capturing semantic relationships and contextual data. Furthermore, the convolutional block helps to manage sequential input by identifying local patterns and pulling out pertinent information from nearby words or letters to predict the next word from the text input. In addition, the bidirectional LSTM processes the input sequence simultaneously in both forward and backward directions, enabling the encoder model to extract context from both past and future data. The bidirectional LSTM is also assigned weights which are used as the initial weights for the decoder.
[0058] Furthermore, the convolutional block of the encoder in the prediction module is used to extract regional patterns and characteristics from the sequential input in a language model where the objective is to predict the next word from a text input. Considering the input text to be a list of words, a vector or embedded representation of each word is possible, and the kernel size or filter size of the convolutional block, which scans the input text, is a sliding window with a fixed size. Moreover, the convolutional block conducts a convolutional mathematical operation as it moves the window over the input. With this action, a new feature representation can be created, also known as a feature map, by combining the values in the window. The number of filters applied to the layer determines the size of the feature map. Hence, the convolution block helps to identify regional dependencies and patterns in the text. For instance, the convolution block can identify particular word or phrase combinations that tend to appear together frequently. Furthermore, the convolutional block can also train various filters, each of which focuses on capturing a particular pattern or feature. The convolutional block can recognize several local patterns simultaneously by utilizing multiple filters, which improves its capacity to comprehend the context of the input text. In order to further process and integrate the collected features, the output of the convolutional block is often sent via other layers like pooling layers or recurrent layers like LSTM. In order to forecast the probability distribution of the word from the learned representations, a thick layer, or SoftMax layer, is eventually frequently used.
[0059] Moreover, the convolutional block is introduced before bidirectional LSTM (Long Short-Term Memory) to encode spatial information. Intermittently, the user while typing tends not to rectify their typos, thereby the coordinates that are being touched by the user can be added as additional information in input to the model to provide better results on correction, suggestion, and prediction. Hence, each letter is divided into four specific coordinates so as to avoid unique inputs and limit it just like characters. These coordinates help to understand and get extra information if the user might have typed an incorrect/proximity letter.
[0060] According to one embodiment of the present invention, the decoder model of the prediction module obtains the input from the encoder model, which is passed through multiple layers comprising an embedding layer, an LSTM layer, and a dense layer to provide word suggestions. The LSTM layer helps in the collection and retention of long-term dependencies in the input text. The dense layer carries out the final classification or regression operation in a language model by translating the learned features to the desired output format. Furthermore, the word suggestions obtained from the decoder of the prediction module are optimized into probable candidates by using beam search, language model, penalty, and ranking. The beam search involves optimizing the time and solution. The language model controls the scoring according to the valid prefix given by the user and the candidates obtained from the decoder. Further, the penalty influences the score by checking the distance between the last word of the valid prefix input provided by the user and the output obtained by the decoder and penalizing the score according to the distance between the two words. The ranking helps to sort all the candidates according to the score, to provide top-k score candidates.
[0061] Furthermore, the language model includes multiple dictionaries, starting with bigrams and to pentagrams. The multiple dictionaries also have the keys for every prefix, and their items are all possible words for that prefix written by the users. Each of these words also has a score associated with it, indicating the frequency at which the user uses it. Also, in the language model, more preference is given to higher n-gram dictionaries.
[0062] FIG. 1 illustrates a flowchart on the method for character-to-character modeling for word suggestion and auto-correction, according to an embodiment of the present invention. The method 100 comprises inputting text in the text field by a user through a keyboard and performing text cleaning at step 102. The method 100 further involves ensuring the last character of the text provided by the user in the text field is a space or a letter at step 104. Further, the method 100 involves invoking word suggestion or auto-correction, if the text entered by the user ends with a letter at step 106, such that the method for word suggestion or auto-correction comprises the steps of: creating candidates with an edit distance; filtering valid candidates by using a hash table; assigning scores to the valid candidates to obtain a plurality of candidates; passing each of the plurality of candidates to an encoder-decoder model to obtain completed words; concatenating each of the completed words and assigning scores and ranking; and displaying the word suggestion on a suggestion strip. The candidates are possible words suggested or auto corrected by the method as the user types in the text field. Besides, the valid candidates comprise only the alphabet of the desired language. Furthermore, the method 100 involves invoking word prediction, if the text entered by the user ends with a space at step 108; and the method for word prediction comprises the steps of: fetching an auto-corrected candidate from the last suggestion; calculating the score for the auto-corrected candidate, and selecting the auto-corrected candidate with the highest score; replacing the last word with a threshold candidate and sending the text for next word prediction if the score of the auto-corrected candidate is greater than the threshold candidate; sending the text for next word prediction if the score of the auto-corrected candidate is less than the threshold candidate; and obtaining the next word prediction and displaying the word prediction on the suggestion strip.
[0063] FIG. 2 illustrates an architectural block diagram of an exemplary implementation of the system for character-to-character modeling for word suggestion and auto-correction, according to an embodiment of the present invention. The system 200 comprises a data preparation module 206 configured to obtain input text into the text field by a user through a keyboard 202 and perform text cleaning. The data preparation module 206 is also configured to invoke word suggestion or auto-correction by creating candidates with an edit distance and filtering valid candidates by using a hash table if the text entered by the user ends with a letter to invoke word prediction by fetching auto-corrected candidate from the last suggestion if the text entered by the user ends with a space. Further, the candidates are possible words suggested or auto-corrected by the system as the user types in the text field, and the valid candidates comprise only alphabets of the desired language. Furthermore, the system 200 comprises a prediction module 208 configured to receive input from the data preparation module 206 to provide word suggestions for completion or word prediction as output. The prediction module 208 is also configured to provide word suggestions by assigning scores to the valid candidates, which is the output of the data preparation module 206 to obtain a plurality of candidates and passing each of the plurality of candidates to an encoder-decoder model to obtain completed words. Furthermore, the prediction module 208 is also configured to provide word prediction by calculating the score for the auto-corrected candidate, selecting the auto-corrected candidate with the highest score, replacing the last word with a threshold candidate, sending the text for next word prediction, if the score of the auto-corrected candidate is greater than the threshold candidate, and sending the text for next word prediction, if the score of the auto-corrected candidate is less than the threshold candidate. Moreover, the system 200 comprises a word suggestion module 210 configured to provide word suggestions as output by concatenating each of the completed words of the prediction module, assigning a score and rank, and displaying the word suggestion on a suggestion strip. The system 200 also comprises a word prediction module 210a configured to provide word prediction by obtaining the next word prediction from the prediction module and displaying the word prediction on the suggestion strip.
[0064] FIG. 3 illustrates a convolutional block in the encoder, according to an embodiment of the present invention. An encoder is a deep learning model made up of a convolutional block comprising multiple convolutional layers followed by a bi-directional LSTM for encoding the output of the data preparation stage. The encoder comprises the convolutional block for capturing the relationship between characters within words by reading spatial correlation.
[0065] FIG. 4A illustrates an encoder model architecture, according to an embodiment of the present invention. The encoder model 400 in FIG. 4 is a deep learning model made up of a convolutional block comprising multiple convolutional layers followed by a bi-directional LSTM for encoding the output of the data preparation stage. In the encoder model 400, the first layer is the input layer 402, configured to take in the input from the user in tokenized format. The next layer is the embedding layer 404, which transforms discrete input values into continuous vector representations. Further, the encoder model 400 comprises a batch normalization layer 406, which normalizes the activations of a neural network layer improving training speed and stability. In addition, the encoder model 400 comprises a convolution block 408 comprising multiple convolutional layers, which extracts different features from input sequences by applying a series of sliding filters, enhancing the encoder model’s 400 ability to capture complex patterns and relationships within the data. Furthermore, the results from the convolution block 408 are concatenated before sending the results as input to the bi-directional LSTM layer 410. The encoder model 400 further comprises the bi-directional LSTM 410 configured to input sequences in both forward and backward directions, allowing the encoder model 400 to capture the past and future context simultaneously, thus enhancing the understanding of the sequence data. Further, the sequence data is concatenated forward and backward for the hidden state and forward and backward for the cell state to provide the input to the decoder.
[0066] FIG. 4B illustrates the screenshot of the encoder model summary, according to an embodiment of the present invention. The encoder model is composed of multiple layers, including an embedding layer, a convolutional block comprising multiple convolutional layers, batch normalization, and bidirectional LSTM, to provide an output that is passed to the decoder.
[0067] FIG. 5A illustrates a decoder model architecture, according to an embodiment of the present invention. The decoder model 500 comprises an input layer 502 configured to take in the input from the user in tokenized format. The decoder model 500 further comprises an embedding layer 504, which transforms discrete input value into a continuous vector representation. Further, the decoder model 500 comprises a LSTM layer 506, which is a recurrent neural network RNN that effectively manages long-range dependencies in sequential data by selectively remembering and forgetting information over time. In addition, the batch normalization 508 normalizes the activations of the neural network layer to improve training speed and stability. Furthermore, the decoder model 500 comprises an activation layer 510 that introduces a small slope for negative input values, preventing the complete death of the neurons and alleviating the vanishing gradient problem. Moreover, the decoder model 500 comprises a dense layer 512, which is a neural network that applies a linear transformation followed by a non-linear activation function to produce output values.
[0068] FIG. 5B illustrates the screenshot of the decoder model summary, according to an embodiment of the present invention. The decoder model obtains the input from the encoder model, which is passed through multiple layers comprising an embedding layer, an LSTM layer, and a dense layer to provide the word suggestions.
[0069] The foregoing description of the specific embodiments will so fully reveal the general nature of the embodiments herein that others can, by applying current knowledge, readily modify and/or adapt for various applications such specific embodiments without departing from the generic concept, and, therefore, such adaptations and modifications should and are intended to be comprehended within the meaning and range of equivalents of the disclosed embodiments.
[0070] It is to be understood that the phraseology or terminology employed herein is for the purpose of description and not of limitation. Therefore, while the embodiments herein have been described in terms of preferred embodiments, those skilled in the art will recognize that the embodiments herein can be practiced with modifications.
G) ADVANTAGES OF THE INVENTION
[0071] The various embodiments of the present invention provide a system and a method for character-to-character modeling for word suggestion and auto-correction. The key requirement of the present invention is the ability to intelligently text touch or tap entry, including saving in keyboard touch/tap entry, faster response with a lighter interface to support. Hence, the present invention provides on-device support for word completion on all mobile-device applications with virtual keyboard such as WhatsApp. Furthermore, the word prediction stage of the present invention is made up of deep learning models alone in comparison to existing word predictions, which is a combination of LSTM and FST. Moreover, the present invention finds applications across all messaging, chatting, and various platforms which requires one to type and maintain longer context, social networking applications, operating systems, virtual text input methods. The present invention is also capable of contextualized predictions, personalized spelling coverage and character-based modeling ensuring on-the fly typing support.
[0072] Furthermore, the present invention encompasses an advanced encoder-decoder model that incorporates additional functional supports such as beamwidth, penalty, ranking, and language model functions. These enhancements further reinforce its robustness in handling macaronic languages while minimizing performance tradeoffs and achieving low latency results. Furthermore, the model's compact size enables easy deployment on mobile devices, ensuring its size remains small. By leveraging the capabilities of beamwidth, penalty, ranking, and language model functions, the present invention excels in generating real-time word completion, correction, and suggestion features for individuals typing on mobile phones. This enables an enhanced typing experience with prompt and accurate assistance. The present invention emphasis on macaronic language support ensures optimal results for inputs that encompass a mixture of multiple languages. It comprehensively understands and addresses the specific nuances, grammar rules, and vocabulary of input written by the user, facilitating precise and contextually appropriate responses.
[0073] Therefore, the present invention provides a significant advancement in effectively handling macaronic languages. Through its additional functional supports, such as beamwidth, penalty, ranking, and language model functions, it achieves remarkable performance with minimal latency. The model's small size enables seamless deployment on mobile devices, allowing for real-time word completion, correction, and suggestion functionalities. With its tailored approach to macaronic languages, the model delivers exceptional results, making it an invaluable tool for users working with such language inputs.
[0074] The foregoing description of the specific embodiments will so fully reveal the general nature of the embodiments herein that others can, by applying current knowledge, readily modify and/or adapt for various applications such as specific embodiments without departing from the generic concept, and, therefore, such adaptations and modifications should and are intended to be comprehended within the meaning and range of equivalents of the disclosed embodiments.
[0075] It is to be understood that the phraseology or terminology employed herein is for the purpose of description and not of limitation. Therefore, while the embodiments herein have been described in terms of preferred embodiments, those skilled in the art will recognize that the embodiments herein can be practiced with modifications. However, all such modifications are deemed to be within the scope of the claims.
, , Claims:We claim:
1. A computer-implemented method comprising instructions stored on a non-transitory computer-readable storage medium and executed on a hardware processor in a computer system for character-to-character modeling for word suggestion and auto-correction, the method (100) comprising steps of:
a. inputting text in the text field by a user through a keyboard and performing text cleaning (102);
b. ensuring the last character of the text provided by the user in the text field is a space or a letter (104);
c. invoking word suggestion or auto-correction, if the text entered by the user ends with a letter (106); and wherein the method for word suggestion or auto-correction comprises the steps of:
i. creating candidates with an edit distance; and wherein the candidates are possible words suggested or auto corrected by the method (100) as the user types in the text field;
ii. filtering valid candidates by using a hash table; and wherein the valid candidates comprise only alphabet of the desired language;
iii. assigning scores to the valid candidates to obtain a plurality of candidates;
iv. passing each of the plurality of candidates to an encoder-decoder model to obtain completed words;
v. concatenating each of the completed words and assigning scores and ranking;
vi. displaying the word suggestion on a suggestion strip;
d. invoking word prediction, if the text entered by the user ends with a space (108); and wherein the method for word prediction comprises the steps of:
i. fetching an auto-corrected candidate from the last suggestion;
ii. calculating the score for the auto-corrected candidate and selecting the auto-corrected candidate with the highest score;
iii. replacing the last word with a threshold candidate and sending the text for next word prediction, if the score of the auto-corrected candidate is greater than the threshold candidate;
iv. sending the text for next word prediction, if the score of the auto-corrected candidate is less than the threshold candidate; and
v. obtaining the next word prediction and displaying the word prediction on the suggestion strip.
2. The method (100) as claimed in Claim 1, wherein the text cleaning is a process to remove the invalid characters in the text before subjecting the characters in the text to tokenization; and wherein the invalid characters include special characters, numbers, and other characters excluding alphabets; and wherein the tokenization is a number representation for each letter in the text.
3. The method (100) as claimed in Claim 1, wherein the hash table is employed to remove invalid candidates based on a valid prefix list to obtain valid characters; and wherein the valid prefix list is a list with at least a minimum of one letter as input, comprising only alphabets of the desired language, and provided with a token number; and wherein the token number is the number representation for each letter in the text; and wherein the valid prefix list either ends with a space invoking word prediction or ends with a letter invoking word suggestion or auto-correction.
4. The method (100) as claimed in Claim 1, comprises three stages for word suggestion, auto-correction, and word prediction, including a data preparation stage, a prediction stage, and a word suggestion stage to obtain the output involving word suggestion, word/auto-correction, and word prediction; and wherein the data preparation stage comprises creating a candidate using the edit distance and removing invalid candidates based on valid prefix lists using the hash table to obtain valid candidates.
5. The method (100) as claimed in Claim 4, wherein the prediction stage involves passing the valid candidates from the data preparation stage as input to an encoder and decoding output through a decoder; and wherein the encoder is a deep learning model made with cascade interconnection of convolutional block comprising multiple convolutional layers and bi-directional LSTM (Long Short-Term Memory) for encoding output of the data preparation stage; and wherein the decoder is a LSTM (Long Short-Term Memory) based model for predicting all possible suggestions for word completion; and wherein the word suggestion stage involves providing word suggestions to the user along with auto-correction after the end of the word, encountering space from the keyboard.
6. The method (100) as claimed in Claim 1, wherein the encoder model is composed of multiple layers, including an embedding layer, a convolutional block comprising multiple convolutional layers, batch normalization, and bidirectional LSTM, to provide an output that is passed to the decoder; and wherein the embedding layer transforms input words into dense numerical vectors, capturing semantic relationships and contextual data; and wherein the convolutional block helps to handle sequential input by identifying local patterns and pulling out pertinent information from nearby words or letters to predict next word from the text input; and wherein the bidirectional LSTM processes the input sequence simultaneously in both forward and backward directions, enabling the encoder model to extract context from both past and future data; and wherein the bidirectional LSTM is also assigned with weights which are used as the initial weights for the decoder.
7. The method (100) as claimed in Claim 1, wherein the decoder model is configured to obtain the input from the encoder model, that is passed through multiple layers comprising an embedding layer, an LSTM layer, and a dense layer to provide word suggestions; and wherein the LSTM layer helps in the collection and retention of long-term dependencies in the input text; and wherein the dense layer carries out final classification or regression operation in a language model by translating the learned features to the desired output format.
8. The method (100) as claimed in Claim 7, wherein the word suggestions obtained from the decoder are optimized into probable candidates by using beam search, language model, penalty, and ranking; and wherein the beam search involves optimizing the time and solution; and wherein the language model controls the scoring according to the valid prefix given by the user and the candidates obtained from the decoder; and wherein the penalty influences the score by checking the distance between the last word of the valid prefix input provided by the user and the output obtained by the decoder, and penalizing the score according to the distance between the two words; and wherein the ranking helps to sort all the candidates according to the score, to provide top-k score candidates.
9. A computer-implemented system comprising instructions stored on a non-transitory computer-readable storage medium and executed on a hardware processor in a computer system for character-to-character modeling for word suggestion and auto-correction, the system (200) comprising:
a. a data preparation module (206) configured to obtain input text into the text field by a user through a keyboard (202) and perform text cleaning; and wherein the data preparation module is also configured to invoke word suggestion or auto-correction by creating candidates with an edit distance and filtering valid candidates by using a hash table if the text entered by the user ends with a letter, and to invoke word prediction by fetching auto-corrected candidate from the last suggestion, if the text entered by the user ends with a space; and wherein the candidates are possible words suggested or auto-corrected by the system (200) as the user types in the text field; and wherein the valid candidates comprise only alphabets of the desired language;
b. a prediction module (208) configured to receive input from the data preparation module to provide word suggestions for completion or word prediction as output; and wherein the prediction module (208) is configured to provide word suggestion by assigning scores to the valid candidates, which is the output of the data preparation module (206) to obtain a plurality of candidates, and passing each of the plurality of candidates to an encoder-decoder model to obtain completed words; and wherein the prediction module (208) is also configured to provide word prediction by calculating the score for the auto-corrected candidate, selecting the auto-corrected candidate with a highest score, replacing the last word with a threshold candidate, sending the text for next word prediction, if the score of the auto-corrected candidate is greater than the threshold candidate, and sending the text for next word prediction, if the score of the auto-corrected candidate is less than the threshold candidate; and
c. a word suggestion module (210) configured to provide word suggestion as output by concatenating each of the completed words of the prediction module, assigning score and rank, and displaying the word suggestion on a suggestion strip; and
d. a word prediction module (210a) configured to provide word prediction by obtaining the next word prediction from the prediction module and displaying the word prediction on the suggestion strip.
10. The system (200) as claimed in Claim 9, wherein the text cleaning by the data preparation module (206) is a process to remove the invalid characters in the text before subjecting the characters in the text to tokenization; and wherein the invalid characters include special characters, numbers, and other characters excluding alphabets; and wherein the tokenization is a number representation for each letter in the text.
11. The system (200) as claimed in Claim 9, wherein the hash table is used by the data preparation module (208) to remove invalid candidates based on a valid prefix list to obtain valid characters; and wherein the valid prefix list is a list with at least a minimum of one letter as input, comprising only alphabets of the desired language, and provided with a token number; and wherein the token number is the number representation for each letter in the text; and wherein the valid prefix list either ends with a space invoking word prediction or ends with a letter invoking word suggestion or auto-correction.
12. The system (200) as claimed in Claim 9, wherein edit distance comprises three stages for word suggestion, auto-correction, and word prediction, including a data preparation stage, a prediction stage, and a word suggestion stage to obtain the output involving word suggestion, word/auto-correction, and word prediction; and wherein the data preparation stage comprises creating a candidate using the edit distance and removing invalid candidates based on valid prefix lists using the hash table to obtain valid candidates using the data preparation module (206).
13. The system (200) as claimed in Claim 12, wherein the prediction stage involves passing the valid candidates from the data preparation stage as input to an encoder and decoding output through a decoder the prediction module; and wherein the encoder is a deep learning model made with cascade interconnection of convolutional block and bi-directional LSTM for encoding output of the data preparation stage; and wherein the decoder is a LSTM based model for predicting all possible suggestions for word completion; and wherein the word suggestion stage involves providing word suggestions to the user along with auto-correction after the end of the word, encountering space from the keyboard using the word suggestion or word prediction module (208).
14. The system (200) as claimed in Claim 9, wherein the encoder model of the prediction module (208) is composed of multiple layers, including an embedding layer, a convolutional block comprising multiple convolutional layers, batch normalization, and bidirectional LSTM, to provide an output that is passed to the decoder; and wherein the embedding layer transforms input words into dense numerical vectors, capturing semantic relationships and contextual data; and wherein the convolutional block helps to handle sequential input by identifying local patterns and pulling out pertinent information from nearby words or letters to predict next word from the text input; and wherein the bidirectional LSTM processes the input sequence simultaneously in both forward and backward directions, enabling the encoder model to extract context from both past and future data; and wherein the bidirectional LSTM is also assigned with weights which are used as the initial weights for the decoder.
15. The system (200) as claimed in Claim 9, wherein the decoder model of the prediction module (208) is configured to obtain the input from the encoder model, which is passed through multiple layers comprising an embedding layer, an LSTM layer, and a dense layer to provide word suggestions; and wherein the LSTM layer helps in the collection and retention of long-term dependencies in the input text; and wherein the dense layer carries out final classification or regression operation in a language model by translating the learned features to the desired output format.
16. The system (200) as claimed in Claim 15, wherein the word suggestions obtained from the decoder of the prediction module (208) is optimized into probable candidates by using beam search, language model, penalty, and ranking; and wherein the beam search involves optimizing the time and solution; and wherein the language model controls the scoring according to the valid prefix given by the user and the candidates obtained from the decoder; and wherein the penalty influences the score by checking the distance between the last word of the valid prefix input provided by the user and the output obtained by the decoder, and penalizing the score according to the distance between the two words; and wherein the ranking helps to sort all the candidates according to the score, to provide top-k score candidates.

Documents

Application Documents

# Name Date
1 202311063671-STATEMENT OF UNDERTAKING (FORM 3) [22-09-2023(online)].pdf 2023-09-22
2 202311063671-PROOF OF RIGHT [22-09-2023(online)].pdf 2023-09-22
3 202311063671-POWER OF AUTHORITY [22-09-2023(online)].pdf 2023-09-22
4 202311063671-OTHERS [22-09-2023(online)].pdf 2023-09-22
5 202311063671-FORM FOR SMALL ENTITY(FORM-28) [22-09-2023(online)].pdf 2023-09-22
6 202311063671-FORM FOR SMALL ENTITY [22-09-2023(online)].pdf 2023-09-22
7 202311063671-FORM 1 [22-09-2023(online)].pdf 2023-09-22
8 202311063671-FIGURE OF ABSTRACT [22-09-2023(online)].pdf 2023-09-22
9 202311063671-EVIDENCE FOR REGISTRATION UNDER SSI(FORM-28) [22-09-2023(online)].pdf 2023-09-22
10 202311063671-EVIDENCE FOR REGISTRATION UNDER SSI [22-09-2023(online)].pdf 2023-09-22
11 202311063671-DRAWINGS [22-09-2023(online)].pdf 2023-09-22
12 202311063671-DECLARATION OF INVENTORSHIP (FORM 5) [22-09-2023(online)].pdf 2023-09-22
13 202311063671-COMPLETE SPECIFICATION [22-09-2023(online)].pdf 2023-09-22
14 202311063671-Request Letter-Correspondence [10-10-2023(online)].pdf 2023-10-10
15 202311063671-Power of Attorney [10-10-2023(online)].pdf 2023-10-10
16 202311063671-OTHERS [10-10-2023(online)].pdf 2023-10-10
17 202311063671-MSME CERTIFICATE [10-10-2023(online)].pdf 2023-10-10
18 202311063671-FORM28 [10-10-2023(online)].pdf 2023-10-10
19 202311063671-FORM28 [10-10-2023(online)]-1.pdf 2023-10-10
20 202311063671-FORM-9 [10-10-2023(online)].pdf 2023-10-10
21 202311063671-FORM FOR SMALL ENTITY [10-10-2023(online)].pdf 2023-10-10
22 202311063671-FORM 18A [10-10-2023(online)].pdf 2023-10-10
23 202311063671-Form 1 (Submitted on date of filing) [10-10-2023(online)].pdf 2023-10-10
24 202311063671-EVIDENCE FOR REGISTRATION UNDER SSI [10-10-2023(online)].pdf 2023-10-10
25 202311063671-Covering Letter [10-10-2023(online)].pdf 2023-10-10
26 202311063671-FORM 3 [09-11-2023(online)].pdf 2023-11-09
27 202311063671-FER.pdf 2024-03-08
28 202311063671-FORM 3 [03-06-2024(online)].pdf 2024-06-03
29 202311063671-MARKED COPIES OF AMENDEMENTS [06-09-2024(online)].pdf 2024-09-06
30 202311063671-FORM 13 [06-09-2024(online)].pdf 2024-09-06
31 202311063671-FER_SER_REPLY [06-09-2024(online)].pdf 2024-09-06
32 202311063671-COMPLETE SPECIFICATION [06-09-2024(online)].pdf 2024-09-06
33 202311063671-CLAIMS [06-09-2024(online)].pdf 2024-09-06
34 202311063671-AMMENDED DOCUMENTS [06-09-2024(online)].pdf 2024-09-06
35 202311063671-US(14)-HearingNotice-(HearingDate-23-09-2025).pdf 2025-07-17
36 202311063671-Correspondence to notify the Controller [17-09-2025(online)].pdf 2025-09-17
37 202311063671-MARKED COPIES OF AMENDEMENTS [22-09-2025(online)].pdf 2025-09-22
38 202311063671-FORM-26 [22-09-2025(online)].pdf 2025-09-22
39 202311063671-FORM 13 [22-09-2025(online)].pdf 2025-09-22
40 202311063671-AMENDED DOCUMENTS [22-09-2025(online)].pdf 2025-09-22
41 202311063671-Written submissions and relevant documents [08-10-2025(online)].pdf 2025-10-08
42 202311063671-MARKED COPIES OF AMENDEMENTS [08-10-2025(online)].pdf 2025-10-08
43 202311063671-FORM 13 [08-10-2025(online)].pdf 2025-10-08
44 202311063671-AMMENDED DOCUMENTS [08-10-2025(online)].pdf 2025-10-08

Search Strategy

1 SearchHistory(50)E_26-12-2023.pdf
2 searchAE_11-09-2024.pdf