Пример #1
0
        // テスト関数
        public static int Main(string[] args)
        {
            Migemo m;

            if (args.Length > 0)
            {
                m = new Migemo(args[0]);
                Console.WriteLine("Migemo object is initialized with "
                                  + args[0]);
            }
            else
            {
                m = new Migemo();
                Console.WriteLine("Migemo object is initialized");
            }
            Console.WriteLine("MigemoObject=" + m.MigemoObject);

            string result = m.Query("ao");

            Console.WriteLine("ai=" + result);

            OperatorIndex[] opall =
            {
                OperatorIndex.Or,        OperatorIndex.NestIn,
                OperatorIndex.NestOut,   OperatorIndex.SelectIn,
                OperatorIndex.SelectOut, OperatorIndex.NewLine
            };
            foreach (OperatorIndex index in opall)
            {
                Console.WriteLine("OperatorIndex[{0}]={1}",
                                  index, m.GetOperator(index));
            }
            return(0);
        }
Пример #2
0
	// テスト関数
		public static int Main(string[] args)
		{
			Migemo m;

			if (args.Length > 0)
			{
				m = new Migemo(args[0]);
				Console.WriteLine("Migemo object is initialized with "
						+args[0]);
			}
			else
			{
				m = new Migemo();
				Console.WriteLine("Migemo object is initialized");
			}
			Console.WriteLine("MigemoObject="+m.MigemoObject);

			string result = m.Query("ao");
			Console.WriteLine("ai="+result);

			OperatorIndex[] opall = {
				OperatorIndex.Or, OperatorIndex.NestIn,
				OperatorIndex.NestOut, OperatorIndex.SelectIn,
				OperatorIndex.SelectOut, OperatorIndex.NewLine
			};
			foreach (OperatorIndex index in opall)
				Console.WriteLine("OperatorIndex[{0}]={1}",
						index, m.GetOperator(index));
			return 0;
		}
 public IsMatchMigemoSQLiteFunction()
 {
     migemo = new Migemo(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, ApplicationDefinitions.MigemoDictionaryFilePath));
 }