realvaluefileeventstreamtests.java

来自「最大熵分类器」· Java 代码 · 共 23 行

JAVA
23
字号
package opennlp.maxent.io;

import java.io.IOException;

import junit.framework.TestCase;
import opennlp.maxent.OnePassRealValueDataIndexer;
import opennlp.maxent.RealValueFileEventStream;

public class RealValueFileEventStreamTests extends TestCase {

	public void testLastLineBug() throws IOException {
		RealValueFileEventStream rvfes = new RealValueFileEventStream("test/data/opennlp/maxent/io/rvfes-bug-data-ok.txt");
		OnePassRealValueDataIndexer indexer = new OnePassRealValueDataIndexer(rvfes, 1);
		assertEquals(1, indexer.getOutcomeLabels().length);
		
		rvfes = new RealValueFileEventStream("test/data/opennlp/maxent/io/rvfes-bug-data-broken.txt");
		indexer = new OnePassRealValueDataIndexer(rvfes, 1);
		assertEquals(1, indexer.getOutcomeLabels().length);
		
		
	}
}

⌨️ 快捷键说明

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