Esempio n. 1
0
        public override bool Equals(object obj)
        {
            HebrewToken o = obj as HebrewToken;

            if (o == null)
            {
                return(false);
            }

            // TODO: In places where Equals returns true while being called from the sorted results list,
            // but this.Score < o.Score, we probably should somehow update the score for this object...

            return(this.PrefixLength == o.PrefixLength &&
                   this.Mask == o.Mask &&
                   this.Text.Equals(o.Text) &&
                   Lemma == o.Lemma);
        }
Esempio n. 2
0
        public int CompareTo(object obj)
        {
            HebrewToken o = obj as HebrewToken;

            if (o == null)
            {
                return(-1);
            }

            if (this.Score == o.Score)
            {
                return(0);
            }
            else if (this.Score > o.Score)
            {
                return(1);
            }
            return(-1);
        }