1. A method for configuring a search engine to provide spelling corrections or suggestions to search queries, the method comprising: generating, by a computing device, one or more residual strings associated with a first token in record corpus, wherein each of the one or more residual strings represents a variation of the first token and is associated with a first weight reflecting a degree of variation from the first token; generating, by the computing device, a first list associated with the first token, the first list comprising the one or more residual strings and the first weights associated with the one or more residual strings; generating, by the computing device, a second list associated with at least one of the one or more residual strings; wherein the second list comprises one or more second tokens; wherein each of the one or more second tokens represents a variation of the at least one of the one or more residual strings; and wherein each of the one or more second tokens is associated, in the second list, with a second weight reflecting a degree of variation from the at least one of the one or more residual strings; and generating, by the computing device, a third list associated with the first token, wherein the third list comprises the one or more second tokens; wherein at least one of the one or more second tokens is associated, in the third list, with a third weight reflecting a relationship between the first token and the at least one of one or more second tokens; and wherein the third weight is generated by a combination of the first weight and the second weight; and determining, by the computing device, a spelling correction or suggestion to the search query based on the one or more third weights.