Exemple #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);
 }
Exemple #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));
        }
Exemple #3
0
 public Address(HitWords word)
 {
     Line = new HitWords[5];
     Put(word);
 }
Exemple #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);
 }
Exemple #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;
 }
Exemple #6
0
 public Address(HitWords word)
 {
     Line = new HitWords[5];
     Put(word);
 }