example/com/chenlb/mmseg4j/example/DicTransform.java
public static void main(String[] args) throws IOException {
		String words = "sogou/SogouLabDic.dic";
		String charset = "GBK";
		if(args.length > 0) {
			words = args[0];
		}
		File file = new File(words);
		//File path = file.getParentFile();
		//File dist = new File("dic/words.dic");
		File dist = new File("dic/word-with-attr.dic");
		DicTransform dt = new DicTransform();
		//只要词,不频率
		//dt.transform(file, charset, dist, new DeFreq());
		//只要两或三个字的词.
		//dt.transform(file, charset, dist, new TwoOrThreeChar());
		dt.transform(file, charset, dist, new NoAttr());
	}
public static void main(String[] args) throws IOException {
		String words = "sogou/SogouLabDic.dic";
		String charset = "GBK";
		if(args.length > 0) {
			words = args[0];
		}
		File file = new File(words);
		//File path = file.getParentFile();
		//File dist = new File("dic/words.dic");
		File dist = new File("dic/word-with-attr.dic");
		DicTransform dt = new DicTransform();
		//只要词,不频率
		//dt.transform(file, charset, dist, new DeFreq());
		//只要两或三个字的词.
		//dt.transform(file, charset, dist, new TwoOrThreeChar());
		dt.transform(file, charset, dist, new NoAttr());
	}
public static void main ( String [ ] args ) throws IOException { String words = "sogou/SogouLabDic.dic" ; String charset = "GBK" ; if ( args . length > 0 ) { words = args [ 0 ] ; } File file = new File ( words ) ; //File path = file.getParentFile();
 //File dist = new File("dic/words.dic");
 File dist = new File ( "dic/word-with-attr.dic" ) ; DicTransform dt = new DicTransform ( ) ; //只要词,不频率
 //dt.transform(file, charset, dist, new DeFreq());
 //只要两或三个字的词.
 //dt.transform(file, charset, dist, new TwoOrThreeChar());
 dt . transform ( file , charset , dist , new NoAttr ( ) ) ; }
词库转换
@throws IOException
词库转换