forked from NLPchina/ansj_seg
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Ansj
committed
Apr 1, 2016
1 parent
9cdf23d
commit c363c31
Showing
2 changed files
with
23 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package org.ansj.test; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
import org.ansj.app.keyword.Keyword; | ||
import org.ansj.app.summary.TagContent; | ||
import org.junit.Test; | ||
|
||
public class TagWordTest { | ||
@Test | ||
public void test(){ | ||
TagContent tw = new TagContent("<em>", "</em>"); | ||
String content = "abc123中国人"; | ||
List<Keyword> keywords = new ArrayList<Keyword>(); | ||
keywords.add(new Keyword("中国人民", 1.0)); | ||
keywords.add(new Keyword("中国", 1.0)); | ||
keywords.add(new Keyword("abc", 1.0)); | ||
keywords.add(new Keyword("abc12", 1.0)); | ||
System.out.println(tw.tagContent(keywords, content)); | ||
} | ||
} |