⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dictvaluetest.java

📁 这是关于中文分词的有关程序
💻 JAVA
字号:
/*
 * Created on 2005-12-29
 * author 谢骋超
 * 
 */
package cn.edu.zju.dartsplitter.data;

import junit.framework.TestCase;

import org.apache.log4j.Logger;

import cn.edu.zju.dartsplitter.data.DictValue;

public class DictValueTest  extends TestCase{
    /**
     * Logger for this class
     */
    private static final Logger logger = Logger.getLogger(DictValueTest.class);

    public void testGetNextValue(){
        DictValue dictValue=new DictValue("感冒");
        dictValue.setCurPos(0);
        dictValue.setUseCount(0);
        //dictValue.setValue("感觉障碍检测");
        printDictValue(dictValue);
        
        dictValue.setCurPos(2);
        printDictValue(dictValue);
    }

    private void printDictValue(DictValue dictValue) {
        String nextVal;
        do{
            nextVal=dictValue.nextValue();
            logger.debug("next value is "+nextVal+" \n");
        }
        while(null!=nextVal);
    }
}

⌨️ 快捷键说明

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