1. A method comprising: receiving input data, the input data being data for conversion from a phonetic representation or speech to written text characters of one or more words of a language, the input data having a plurality of data pieces; calculating, by a processor of a computer via an iterative process, a vector for the input data in a textual format of the language, the iterative process including starting with a first data piece of the input data converted to a selected textual format to form a current vector of the input data and iteratively updating the current vector with a next data piece of the input data using elements of the current vector until all the data pieces are converted into the textual format; selecting a subset of a plurality of documents based on a closeness of the vector for the input data to a plurality of vectors for text of the plurality of documents, the text of the plurality of documents being written in the language; determining a frequency of the text in the subset of the plurality of documents; and converting the input data to a representation of one or more written text characters of the language based on the frequency of the text in the subset of the plurality of documents.
3. The method of claim 1 , wherein the input data further comprises phonetic characters.