Exemplo n.º 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);
        }
Exemplo n.º 2
0
	public static int Main(string[] args)
	{
		Migemo m = new Migemo("../dict/migemo-dict");
		string res = m.Query("kaki");
		Console.WriteLine("kaki->"+res);
		return 0;
	}
Exemplo n.º 3
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;
		}
Exemplo n.º 4
0
 internal Migemo getMigemo()
 {
     if (migemo == null) {
         migemo = new Migemo(config.MigemoDictPath);
     }
     return migemo;
 }