I've never done anything like this, but from what I understand of your doubt, it would start with a code like this:
class Program
{
static void Main(string[] args)
{
List<Dicionario> dicionario = new List<Dicionario>();
//Carrega o dicionário
string texto = @"texto gigante aqui
era uma vez, blabla bla";
string novoTexto = "";
string[] linhas = texto.Split('\r');
for (int l = 0; l < linhas.Length;l++)
{
string[] palavras = linhas[l].Split(' ');
for (int p = 0; p < palavras.Length; p++)
{
Dicionario d = dicionario.Find(x => x.Palavra.ToUpper() == palavras[p].ToUpper());
if (d != null)
palavras[p] = d.Abreviacao;
novoTexto += palavras[p] + " ";
}
novoTexto += "\r";
}
//Seu novo texto
Console.Write(novoTexto);
}
class Dicionario
{
public string Palavra { get; set; }
public string Abreviacao { get; set; }
}
}
There you will go through performance tests to try to improve something and see if that's what you really need.
I hope to have helped