Пример #1
0
        public static List <weightTableGenericTerm> GetList(this IEnumerable <string> tokens)
        {
            List <weightTableGenericTerm> output = new List <weightTableGenericTerm>();

            foreach (string tkn in tokens)
            {
                weightTableGenericTerm term = new weightTableGenericTerm(tkn, 1);

                output.Add(term);
            }

            return(output);
        }
 /// <summary>
 /// Determines whether the specified <c>other</c> <see cref="weightTableGenericTerm"/> is match with this one (meaning their frequencies are summed)
 /// </summary>
 /// <param name="other">The other.</param>
 /// <returns>
 ///   <c>true</c> if the specified other is match; otherwise, <c>false</c>.
 /// </returns>
 public bool isMatch(weightTableGenericTerm other)
 {
     return(name.Equals(other.name, StringComparison.InvariantCultureIgnoreCase));
 }