|
@@ -44,7 +44,7 @@ public class DrugTest10 {
|
|
|
@Test
|
|
|
public void writeNeo4j() throws Exception {
|
|
|
|
|
|
- String propertys = "成分";
|
|
|
+ String propertys = "商品名称,成分";
|
|
|
workbook = new HSSFWorkbook();//这里也可以设置sheet的Name
|
|
|
String accessToken = BaidubceUtil.getAccessToken();
|
|
|
InputStream drugFis = new FileInputStream(drugExcelPath);
|
|
@@ -70,6 +70,9 @@ public class DrugTest10 {
|
|
|
if(StringUtils.isEmpty(name)){
|
|
|
continue;
|
|
|
}
|
|
|
+ if("商品名称".equals(property)){
|
|
|
+ property = "商品名";
|
|
|
+ }
|
|
|
BaseEntity endEntity = createNoExists(startLabel+property, name);
|
|
|
Long endId = endEntity.getId();
|
|
|
RelationshipVO relationshipVO = new RelationshipVO();
|
|
@@ -182,7 +185,18 @@ public class DrugTest10 {
|
|
|
"英文名称:DiclofenacSodium Sustained Release Tablets\n" +
|
|
|
"汉语拼音:ShuanglvfensuannaHuanshiPian\n" +
|
|
|
"\n" +
|
|
|
- "输出:DiclofenacSodium Sustained Release Tablet\n\n"+
|
|
|
+ "输出:[\"DiclofenacSodium Sustained Release Tablet\"]\n\n"+
|
|
|
+ "#示例3\n" +
|
|
|
+ "以抽取“商品名称”为例\n" +
|
|
|
+ "文本:\n" +
|
|
|
+ "【药品名称】\n" +
|
|
|
+ "通用名称:神香苏合丸(庆余救心丸)\n" +
|
|
|
+ "汉语拼音:Shenxiang Suhe Wan\n" +
|
|
|
+ "【成份】\n" +
|
|
|
+ "人工麝香、冰片、水牛角浓缩粉、乳香(制)、安息香、白术、香附、木香、沉香、丁香、苏合香。\n" +
|
|
|
+ "\n" +
|
|
|
+ "输出:[]\n\n"+
|
|
|
+
|
|
|
"2、没有可抽取的“" + property + "”,则返回空json数组。\n" +
|
|
|
"\n" +
|
|
|
"本次抽取的文本如下:\n\n";
|