Ejemplo n.º 1
0
 /// <summary>
 /// 将要添加的词条的标签添加
 /// </summary>
 /// <param name="other"></param>
 public void Combine(SimpleItem other)
 {
     foreach (var p in other.labelMap)
     {
         AddLabel(p.Key, p.Value);
     }
 }
Ejemplo n.º 2
0
        public static SimpleItem Create(string[] param_s)
        {
            if (param_s.Length % 2 == 1)
            {
                return(null);
            }

            var item = new SimpleItem();

            for (int i = 0; i < param_s.Length / 2; i++)
            {
                item.labelMap[param_s[i << 1]] = int.Parse(param_s[1 + i * 2]);
            }
            return(item);
        }