1 // MeCab -- Yet Another Part-of-Speech and Morphological Analyzer
3 // Copyright(C) 2001-2006 Taku Kudo <taku@chasen.org>
4 // Copyright(C) 2004-2006 Nippon Telegraph and Telephone Corporation
6 using System.Collections.Generic;
11 public struct CharInfo
13 #region Const/Field/Property
15 private readonly uint bits;
22 get { return BitUtils.GetBitField(this.bits, 0, 18); }
28 public uint DefaultType
30 get { return BitUtils.GetBitField(this.bits, 18, 8); }
37 /// 1: 1文字までの文字列を未知語とする
38 /// 2: 2文字までの文字列を未知語とする
40 /// n: n文字までの文字列を未知語とする
44 get { return BitUtils.GetBitField(this.bits, 18 + 8, 4); }
48 /// グルーピング: 未知語の候補生成方法
56 get { return BitUtils.GetFlag(this.bits, 18 + 8 + 4); }
61 /// そのカテゴリにおいて, いつ未知語処理を動かすか
65 /// false: 既知語がある場合は, 未知語処理を動作させない
69 get { return BitUtils.GetFlag(this.bits, 18 + 8 + 4 + 1); }
76 public CharInfo(uint bits)
88 /// <param name="c"></param>
89 /// <returns></returns>
90 public bool IsKindOf(CharInfo c)
92 return BitUtils.CompareAnd(this.bits, c.bits, 0, 18);
95 public override string ToString()
97 return string.Format("[Type:{0}][DefaultType:{1}][Length:{2}][Group:{3}][Invoke:{4}]",