The TD_WordEmbeddings function produces vectors for each piece of text and finds the similarity between the texts. The function contains training and prediction using models. The models contain each possible token and its corresponding vectors. The function operations are token-embedding, doc-embedding, token2token-similarity, and doc2doc-similarity.