|
@@ -1,5 +1,6 @@
|
|
|
package org.diagbot.nlp.test;
|
|
|
|
|
|
+import com.alibaba.fastjson.JSON;
|
|
|
import org.diagbot.nlp.participle.ParticipleToken;
|
|
|
import org.diagbot.nlp.participle.ParticipleUtil;
|
|
|
import org.diagbot.nlp.participle.cfg.Configuration;
|
|
@@ -22,8 +23,7 @@ import java.util.List;
|
|
|
public class ParticipleTest {
|
|
|
public static void main(String[] args) {
|
|
|
try {
|
|
|
- String content = "剑突下痛胀痛1天。1天前进食后出现剑突下疼痛,无恶心呕吐,无腹胀,无发热,当地医院查,WBC 10.5(3.5-9.5,amy76.8(1-220)," +
|
|
|
- "心电图、腹部平扫CT均未见明显异常,既往高血压。";
|
|
|
+ String content = "剑突下痛胀痛1天";
|
|
|
ParticipleTest test = new ParticipleTest();
|
|
|
// InputStream is = test.getClass().getClassLoader().getResourceAsStream("present.txt");
|
|
|
// BufferedReader br = new BufferedReader(new InputStreamReader(is, "UTF-8"), 512);
|
|
@@ -47,6 +47,7 @@ public class ParticipleTest {
|
|
|
result = result + " | " + lexeme.getText();
|
|
|
}
|
|
|
}
|
|
|
+ System.out.println(JSON.toJSONString(lexemes));
|
|
|
// ParticipleToken token = new ParticipleToken();
|
|
|
// token.start(new StringReader(content), segment);
|
|
|
// LexemePath<Lexeme> lexemePath = token.getLexemePath();
|