예제 #1
0
 public bool PutLine(HitWords word)
 {
     HitWords each = Line.LastOrDefault(x => x != null);
     int eLength = each.TREE_PATH.Length;
     int wLength = word.TREE_PATH.Length;
     //同级别无匹配
     if (eLength == wLength) return false;
     int i = 0;
     while (i < eLength && i < wLength)
     {
         if (each.TREE_PATH[i] != word.TREE_PATH[i])
             return false;
         i++;
     }
     return Put(word);
 }
예제 #2
0
        public bool PutLine(HitWords word)
        {
            HitWords each    = Line.LastOrDefault(x => x != null);
            int      eLength = each.TREE_PATH.Length;
            int      wLength = word.TREE_PATH.Length;

            //同级别无匹配
            if (eLength == wLength)
            {
                return(false);
            }
            int i = 0;

            while (i < eLength && i < wLength)
            {
                if (each.TREE_PATH[i] != word.TREE_PATH[i])
                {
                    return(false);
                }
                i++;
            }
            return(Put(word));
        }
예제 #3
0
 public Address(HitWords word)
 {
     Line = new HitWords[5];
     Put(word);
 }
예제 #4
0
 protected bool Put(HitWords word)
 {
     Line[word.TREE_PATH.Length - 2] = word;
     TotalRank = Line.Sum(x => x != null ? x.SCORE : 0);
     return(true);
 }
예제 #5
0
 protected bool Put(HitWords word)
 {
     Line[word.TREE_PATH.Length - 2] = word;
     TotalRank = Line.Sum(x => x != null ? x.SCORE : 0);
     return true;
 }
예제 #6
0
 public Address(HitWords word)
 {
     Line = new HitWords[5];
     Put(word);
 }