Comecando a funcao buildDictionary