main.java

来自「一个简单的中文分词器,java语言描述」· Java 代码 · 共 40 行

JAVA
40
字号
/*
 * Main.java
 *
 * Created on 2007年1月17日, 下午10:27
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package doctokenizer;

import java.io.IOException;
import java.io.*;
import util.word.*;

/**
 *
 * @author JinfengLee
 */
public class Main {
    
    /** Creates a new instance of Main */
    public Main() {
    }
    
    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
       String token ;
        File file = new File("D:\\IRlab2006\\CWT200g060412-27897055.txt");
        DocTokenizer doctokenizer = new DocTokenizer("D:\\dictionary.txt");
        doctokenizer.setFile(file);
        while((token = doctokenizer.nextToken())!=null)
            System.out.println(token);
    }
    
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?