|
@@ -70,10 +70,17 @@ public class getSimilarTest {
|
|
|
List<Float> floatList =pythonApiService.getStrVector(getVectorVO);
|
|
|
System.out.println(floatList);
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+ public List<String> getSpiltList(String text, String split) throws Exception {
|
|
|
+ String[] a = text.split(split);
|
|
|
+ List<String> list = Arrays.asList(a);
|
|
|
+ return list;
|
|
|
+ }
|
|
|
@Test
|
|
|
public void testSimilar() throws Exception {
|
|
|
|
|
|
- String path = "E:\\test\\keywordTest4000条bg.xls";
|
|
|
+ String path = "E:\\test\\keywordTest4000条xs.xls";
|
|
|
File tempFile = new File(path);
|
|
|
|
|
|
Sheet sheet = ReadExcelUtils.readExcel(tempFile);
|
|
@@ -83,6 +90,10 @@ public class getSimilarTest {
|
|
|
Row needRow = sheet.getRow(i);
|
|
|
String value = needRow.getCell(0).getStringCellValue();
|
|
|
StringRequest stringRequest =new StringRequest();
|
|
|
+ stringRequest.setSize(100l);
|
|
|
+ stringRequest.setCurrent(1l);
|
|
|
+ stringRequest.setProjectId(470);
|
|
|
+ stringRequest.setSemanteme(value);
|
|
|
PatentDTO patentDTO= esService.esSearch(stringRequest);
|
|
|
List<PatentColumnDTO> columnDTOS= patentDTO.getPatents();
|
|
|
String targetNoStr = needRow.getCell(1).getStringCellValue();
|