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