예제 #1
0
 private int CalcularPesoTotalDeTermino(Termino termino, string texto)
 {
     int total = 0;
     foreach (string sinonimo in termino.Sinonimos)
     {
         Regex regex = new Regex(sinonimo);
         total += regex.Matches(texto).Count * termino.Peso;
     }
     return total;
 }
예제 #2
0
        private int CalcularPesoTotalDeTermino(Termino termino, string texto)
        {
            int total = 0;

            foreach (string sinonimo in termino.Sinonimos)
            {
                Regex regex = new Regex(sinonimo);
                total += regex.Matches(texto).Count *termino.Peso;
            }
            return(total);
        }