OSDN Git Service

微修正
authorkomutan <t_komuta@nifty.com>
Mon, 6 Jul 2015 17:45:41 +0000 (02:45 +0900)
committerkomutan <t_komuta@nifty.com>
Mon, 6 Jul 2015 17:45:41 +0000 (02:45 +0900)
src/LibNMeCab/Core/CharInfo.cs

index 55d2394..dfdab57 100644 (file)
-//  MeCab -- Yet Another Part-of-Speech and Morphological Analyzer\r
-//\r
-//  Copyright(C) 2001-2006 Taku Kudo <taku@chasen.org>\r
-//  Copyright(C) 2004-2006 Nippon Telegraph and Telephone Corporation\r
-using System;\r
-using System.Collections.Generic;\r
-using System.Text;\r
-using System.IO;\r
-\r
-namespace NMeCab.Core\r
-{\r
-    public struct CharInfo\r
-    {\r
-        #region  Const/Field/Property\r
-\r
-        private readonly uint bits;\r
-\r
-        /// <summary>\r
-        /// 互換カテゴリ\r
-        /// </summary>\r
-        public uint Type\r
-        {\r
-            get { return BitUtils.GetBitField(this.bits, 0, 18); }\r
-        }\r
-\r
-        /// <summary>\r
-        /// デフォルトカテゴリ\r
-        /// </summary>\r
-        public uint DefaultType\r
-        {\r
-            get { return BitUtils.GetBitField(this.bits, 18, 8); }\r
-        }\r
-\r
-        /// <summary>\r
-        /// 長さ: 未知語の候補生成方法\r
-        /// </summary>\r
-        /// <value>\r
-        /// 1: 1文字までの文字列を未知語とする\r
-        /// 2: 2文字までの文字列を未知語とする\r
-        /// ...\r
-        /// n: n文字までの文字列を未知語とする\r
-        /// </value>\r
-        public uint Length\r
-        {\r
-            get { return BitUtils.GetBitField(this.bits, 18 + 8, 4); }\r
-        }\r
-\r
-        /// <summary>\r
-        /// グルーピング: 未知語の候補生成方法\r
-        /// </summary>\r
-        /// <value>\r
-        /// true: 同じ字種でまとめる\r
-        /// false: 同じ字種でまとめない\r
-        /// </value>\r
-        public bool Group\r
-        {\r
-            get { return BitUtils.GetFlag(this.bits, 18 + 8 + 4); }\r
-        }\r
-\r
-        /// <summary>\r
-        /// 動作タイミング\r
-        /// そのカテゴリにおいて, いつ未知語処理を動かすか\r
-        /// </summary>\r
-        /// <value>\r
-        /// true: 常に未知語処理を動かす\r
-        /// false: 既知語がある場合は, 未知語処理を動作させない\r
-        /// </value>\r
-        public bool Invoke\r
-        {\r
-            get { return BitUtils.GetFlag(this.bits, 18 + 8 + 4 + 1); }\r
-        }\r
-\r
-        #endregion\r
-\r
-        #region Constractor\r
-\r
-        public CharInfo(uint bits)\r
-        {\r
-            this.bits = bits;\r
-        }\r
-\r
-        #endregion\r
-\r
-        #region Method\r
-\r
-        /// <summary>\r
-        /// 互換カテゴリ判定\r
-        /// </summary>\r
-        /// <param name="c"></param>\r
-        /// <returns></returns>\r
-        public bool IsKindOf(CharInfo c)\r
-        {\r
-            return BitUtils.CompareAnd(this.bits, c.bits, 0, 18);\r
-        }\r
-\r
-        public override string ToString()\r
-        {\r
-            return string.Format("[Type:{0}][DefaultType:{1}][Length:{2}][Group:{3}][Invoke:{4}]",\r
-                                 this.Type,\r
-                                 this.DefaultType,\r
-                                 this.Length,\r
-                                 this.Group,\r
-                                 this.Invoke);\r
-        }\r
-\r
-        #endregion\r
-    }\r
-}\r
+//  MeCab -- Yet Another Part-of-Speech and Morphological Analyzer
+//
+//  Copyright(C) 2001-2006 Taku Kudo <taku@chasen.org>
+//  Copyright(C) 2004-2006 Nippon Telegraph and Telephone Corporation
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace NMeCab.Core
+{
+    public struct CharInfo
+    {
+        #region  Const/Field/Property
+
+        private readonly uint bits;
+
+        /// <summary>
+        /// 互換カテゴリ
+        /// </summary>
+        public uint Type
+        {
+            get { return BitUtils.GetBitField(this.bits, 0, 18); }
+        }
+
+        /// <summary>
+        /// デフォルトカテゴリ
+        /// </summary>
+        public uint DefaultType
+        {
+            get { return BitUtils.GetBitField(this.bits, 18, 8); }
+        }
+
+        /// <summary>
+        /// 長さ: 未知語の候補生成方法
+        /// </summary>
+        /// <value>
+        /// 1: 1文字までの文字列を未知語とする
+        /// 2: 2文字までの文字列を未知語とする
+        /// ...
+        /// n: n文字までの文字列を未知語とする
+        /// </value>
+        public uint Length
+        {
+            get { return BitUtils.GetBitField(this.bits, 18 + 8, 4); }
+        }
+
+        /// <summary>
+        /// グルーピング: 未知語の候補生成方法
+        /// </summary>
+        /// <value>
+        /// true: 同じ字種でまとめる
+        /// false: 同じ字種でまとめない
+        /// </value>
+        public bool Group
+        {
+            get { return BitUtils.GetFlag(this.bits, 18 + 8 + 4); }
+        }
+
+        /// <summary>
+        /// 動作タイミング
+        /// そのカテゴリにおいて, いつ未知語処理を動かすか
+        /// </summary>
+        /// <value>
+        /// true: 常に未知語処理を動かす
+        /// false: 既知語がある場合は, 未知語処理を動作させない
+        /// </value>
+        public bool Invoke
+        {
+            get { return BitUtils.GetFlag(this.bits, 18 + 8 + 4 + 1); }
+        }
+
+        #endregion
+
+        #region Constractor
+
+        public CharInfo(uint bits)
+        {
+            this.bits = bits;
+        }
+
+        #endregion
+
+        #region Method
+
+        /// <summary>
+        /// 互換カテゴリ判定
+        /// </summary>
+        /// <param name="c"></param>
+        /// <returns></returns>
+        public bool IsKindOf(CharInfo c)
+        {
+            return BitUtils.CompareAnd(this.bits, c.bits, 0, 18);
+        }
+
+        public override string ToString()
+        {
+            return string.Format("[Type:{0}][DefaultType:{1}][Length:{2}][Group:{3}][Invoke:{4}]",
+                                 this.Type,
+                                 this.DefaultType,
+                                 this.Length,
+                                 this.Group,
+                                 this.Invoke);
+        }
+
+        #endregion
+    }
+}