package org.ansj.test;

import java.io.IOException;

import org.ansj.library.UserDefineLibrary;
import org.ansj.splitWord.analysis.IndexAnalysis;
import org.ansj.util.MyStaticValue;

public class IndexAnalysisTest {
	public static void main(String[] args) throws IOException {
		MyStaticValue.isNumRecognition=true;
		MyStaticValue.isQuantifierRecognition = false;
		UserDefineLibrary.insertWord("蛇药片", "n", 1000);
		UserDefineLibrary.insertWord("蛇药", "n", 1000);
		UserDefineLibrary.insertWord("鲁花", "n", 1000);
		UserDefineLibrary.insertWord("隐形", "n", 1000);
		UserDefineLibrary.insertWord("眼镜", "n", 1000);
		UserDefineLibrary.insertWord("隐形眼镜", "n", 1000);
		UserDefineLibrary.insertWord("海昌 ", "n", 1000);
		UserDefineLibrary.insertWord("美瞳", "n", 1000);

//		System.out.println(IndexAnalysis.parse("海昌 润洁除蛋白隐形眼镜美瞳护理液 500+120ml"));
//
//		System.out.println(IndexAnalysis.parse("隐形眼镜 护理"));
//
//		System.out.println(IndexAnalysis.parse("海昌 润洁除蛋白隐形眼镜美瞳护理液 500+120ml"));
//
//		System.out.println(IndexAnalysis.parse("季德胜蛇药片"));
//
//		System.out.println(IndexAnalysis.parse("鲁花一级花生油"));
//
//		System.out.println(IndexAnalysis.parse("上海虹桥机场旅游和服务都是一流的"));
//
//		System.out.println(IndexAnalysis.parse("北京地铁"));
		
		System.out.println(IndexAnalysis.parse("0000000"));
		
//		long start = System.currentTimeMillis() ;
//				
//		IndexAnalysis indexAnalysis = new IndexAnalysis(new InputStreamReader(new FileInputStream("/home/ansj/temp/one_day_all.txt"))) ;
//		
//		while(indexAnalysis.next()!=null){
//			
//		}
//		System.out.println(System.currentTimeMillis()-start);
	}
}

@@ -358,16 +358,51 @@
  false;%0A
+%09%09MyStaticValue.userLibrary=null ;%0A
 %09%09UserDe
@@ -435,32 +435,32 @@
 %E7%89%87%22, %22n%22, 1000);%0A
-
 %09%09UserDefineLibr
@@ -790,18 +790,16 @@
 1000);%0A%0A
-//
 %09%09System
@@ -856,37 +856,33 @@
 %E6%B6%B2 500+120ml%22));%0A
-//%0A//
+%0A
 %09%09System.out.pri
@@ -915,29 +915,25 @@
 %E9%9A%90%E5%BD%A2%E7%9C%BC%E9%95%9C %E6%8A%A4%E7%90%86%22));%0A
-//%0A//
+%0A
 %09%09System.out
@@ -990,29 +990,25 @@
 0+120ml%22));%0A
-//%0A//
+%0A
 %09%09System.out
@@ -1044,29 +1044,25 @@
 %22%E5%AD%A3%E5%BE%B7%E8%83%9C%E8%9B%87%E8%8D%AF%E7%89%87%22));%0A
-//%0A//
+%0A
 %09%09System.out
@@ -1099,29 +1099,25 @@
 %E9%B2%81%E8%8A%B1%E4%B8%80%E7%BA%A7%E8%8A%B1%E7%94%9F%E6%B2%B9%22));%0A
-//%0A//
+%0A
 %09%09System.out
@@ -1171,13 +1171,9 @@
 ));%0A
-//%0A//
+%0A
 %09%09Sy
@@ -1226,65 +1226,8 @@
 %0A%09%09%0A
-%09%09System.out.println(IndexAnalysis.parse(%220000000%22));%0A%09%09%0A
 //%09%09

test index