Skip to content

Commit

Permalink
add some testcase
Browse files Browse the repository at this point in the history
  • Loading branch information
ansjsun committed Jun 6, 2016
1 parent 8312604 commit cf8740e
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ Ansj中文分词
* 5.补充测试用例,n多地方测试不完全。如果你有兴趣可以帮忙啦!
* 6.重构人名识别模型。增加机构名识别等模型。
* 7.增加句法文法分析
* 8.建立一个http or netty api,提供分词服务,并提供sdk
* n.拾遗补漏...


Expand Down
17 changes: 17 additions & 0 deletions src/test/java/org/ansj/splitWord/analysis/BaseAnalysisTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package org.ansj.splitWord.analysis;

import java.io.IOException;

import org.ansj.CorpusTest;
import org.junit.Test;

public class BaseAnalysisTest extends CorpusTest{

@Test
public void test() throws IOException {
for (String string : lines) {
System.out.println(BaseAnalysis.parse(string));
}
}

}
26 changes: 26 additions & 0 deletions src/test/java/org/ansj/splitWord/analysis/IndexAnalysisTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package org.ansj.splitWord.analysis;

import java.io.IOException;
import java.util.HashMap;
import java.util.List;

import org.ansj.CorpusTest;
import org.ansj.domain.Term;
import org.ansj.library.UserDefineLibrary;
import org.junit.Test;
import org.nlpcn.commons.lang.tire.domain.Value;
import org.nlpcn.commons.lang.tire.library.Library;

import junit.framework.Assert;

public class IndexAnalysisTest extends CorpusTest {

@Test
public void test() throws IOException {
for (String string : lines) {
System.out.println(IndexAnalysis.parse(string));
}

}

}
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package org.ansj.splitWord.analysis;

import org.ansj.CorpusTest;
import org.ansj.util.MyStaticValue;
import org.junit.Test;

public class NlpAnalysisTest extends CorpusTest {
Expand Down
15 changes: 15 additions & 0 deletions src/test/java/org/ansj/splitWord/analysis/ToAnalysisTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package org.ansj.splitWord.analysis;

import org.ansj.CorpusTest;
import org.junit.Test;

public class ToAnalysisTest extends CorpusTest{

@Test
public void test() {
for (String string : lines) {
System.out.println(ToAnalysis.parse(string));
}
}

}

0 comments on commit cf8740e

Please sign in to comment.