src/main/java/org/wltea/analyzer/dic/Dictionary.java
public static synchronized void initial(Configuration cfg) {
		if (singleton == null) {
			synchronized (Dictionary.class) {
				if (singleton == null) {

					singleton = new Dictionary(cfg);
					singleton.loadMainDict();
					singleton.loadSurnameDict();
					singleton.loadQuantifierDict();
					singleton.loadSuffixDict();
					singleton.loadPrepDict();
					singleton.loadStopWordDict();

					if(cfg.isEnableRemoteDict()){
						// 建立监控线程
						for (String location : singleton.getRemoteExtDictionarys()) {
							// 10 秒是初始延迟可以修改的 60是间隔时间 单位秒
							pool.scheduleAtFixedRate(new Monitor(location), 10, 60, TimeUnit.SECONDS);
						}
						for (String location : singleton.getRemoteExtStopWordDictionarys()) {
							pool.scheduleAtFixedRate(new Monitor(location), 10, 60, TimeUnit.SECONDS);
						}
					}

				}
			}
		}
	}
public static synchronized void initial(Configuration cfg) {
		if (singleton == null) {
			synchronized (Dictionary.class) {
				if (singleton == null) {

					singleton = new Dictionary(cfg);
					singleton.loadMainDict();
					singleton.loadSurnameDict();
					singleton.loadQuantifierDict();
					singleton.loadSuffixDict();
					singleton.loadPrepDict();
					singleton.loadStopWordDict();

					if(cfg.isEnableRemoteDict()){
						// 建立监控线程
						for (String location : singleton.getRemoteExtDictionarys()) {
							// 10 秒是初始延迟可以修改的 60是间隔时间 单位秒
							pool.scheduleAtFixedRate(new Monitor(location), 10, 60, TimeUnit.SECONDS);
						}
						for (String location : singleton.getRemoteExtStopWordDictionarys()) {
							pool.scheduleAtFixedRate(new Monitor(location), 10, 60, TimeUnit.SECONDS);
						}
					}

				}
			}
		}
	}
public static synchronized void initial ( Configuration cfg ) { if ( singleton == null ) { synchronized ( Dictionary . class ) { if ( singleton == null ) { singleton = new Dictionary ( cfg ) ; singleton . loadMainDict ( ) ; singleton . loadSurnameDict ( ) ; singleton . loadQuantifierDict ( ) ; singleton . loadSuffixDict ( ) ; singleton . loadPrepDict ( ) ; singleton . loadStopWordDict ( ) ; if ( cfg . isEnableRemoteDict ( ) ) { // 建立监控线程
 for ( String location : singleton . getRemoteExtDictionarys ( ) ) { // 10 秒是初始延迟可以修改的 60是间隔时间 单位秒
 pool . scheduleAtFixedRate ( new Monitor ( location ) , 10 , 60 , TimeUnit . SECONDS ) ; } for ( String location : singleton . getRemoteExtStopWordDictionarys ( ) ) { pool . scheduleAtFixedRate ( new Monitor ( location ) , 10 , 60 , TimeUnit . SECONDS ) ; } } } } } }
词典初始化 由于IK Analyzer的词典采用Dictionary类的静态方法进行词典初始化
只有当Dictionary类被实际调用时，才会开始载入词典， 这将延长首次分词操作的时间 该方法提供了一个在应用加载阶段就初始化字典的手段

@return Dictionary
词典初始化 由于IK Analyzer的词典采用Dictionary类的静态方法进行词典初始化 只有当Dictionary类被实际调用时，才会开始载入词典， 这将延长首次分词操作的时间 该方法提供了一个在应用加载阶段就初始化字典的手段