Exemplo n.º 1
0
        public override int GetHashCode()
        {
            int code = 23;

            code += code * 31 + Morphemes.Select(m => m.Id).GetSequenceHashCode();
            code += code * 31 + RootMorphemeIndex.GetHashCode();
            code += code * 31 + Category?.GetHashCode() ?? 0;
            return(code);
        }
Exemplo n.º 2
0
 public override string ToString()
 {
     return(string.Format("[{0}]", string.Join(" ", Morphemes.Select((m, i) => i == RootMorphemeIndex ? "*" + m : m.ToString()))));
 }
Exemplo n.º 3
0
 public bool Equals(WordAnalysis other)
 {
     return(other != null && Morphemes.Select(m => m.Id).SequenceEqual(other.Morphemes.Select(m => m.Id)) &&
            RootMorphemeIndex == other.RootMorphemeIndex && Category == other.Category);
 }