|
@@ -17,6 +17,8 @@ import com.diagbot.service.ScaleContentService;
|
|
import com.diagbot.util.ListUtil;
|
|
import com.diagbot.util.ListUtil;
|
|
import com.diagbot.vo.SearchVo;
|
|
import com.diagbot.vo.SearchVo;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
+import org.springframework.core.io.ClassPathResource;
|
|
|
|
+import org.springframework.core.io.Resource;
|
|
import org.springframework.stereotype.Component;
|
|
import org.springframework.stereotype.Component;
|
|
import org.springframework.util.ResourceUtils;
|
|
import org.springframework.util.ResourceUtils;
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
@@ -66,9 +68,9 @@ public class ClinicalFacade {
|
|
*/
|
|
*/
|
|
public ResponseData processClinicalData(@RequestBody SearchVo searchVo) {
|
|
public ResponseData processClinicalData(@RequestBody SearchVo searchVo) {
|
|
SearchVo sData = searchVo;
|
|
SearchVo sData = searchVo;
|
|
-// Map<String, List<Map<String, String>>> standWord = getStandWord();
|
|
|
|
|
|
+ Map<String, List<Map<String, String>>> standWord = getStandWord();
|
|
Response<List<Lexeme>> resp = nlpServiceClient.split(sData.getSymptom());
|
|
Response<List<Lexeme>> resp = nlpServiceClient.split(sData.getSymptom());
|
|
-// addStandWord(resp.getData(), standWord, sData);
|
|
|
|
|
|
+ addStandWord(resp.getData(), standWord, sData);
|
|
|
|
|
|
sData.setLisArr(processLis(sData.getLisArr()));
|
|
sData.setLisArr(processLis(sData.getLisArr()));
|
|
|
|
|
|
@@ -334,7 +336,9 @@ public class ClinicalFacade {
|
|
BufferedReader reader = null;
|
|
BufferedReader reader = null;
|
|
String line = "";
|
|
String line = "";
|
|
try {
|
|
try {
|
|
- file = ResourceUtils.getFile("classpath:standword.txt");
|
|
|
|
|
|
+ //file = ResourceUtils.getFile("classpath:standword.txt");
|
|
|
|
+ Resource resource = new ClassPathResource("/standword.txt");
|
|
|
|
+ file = resource.getFile();
|
|
reader = new BufferedReader(new InputStreamReader(new FileInputStream(file), "UTF-8"));
|
|
reader = new BufferedReader(new InputStreamReader(new FileInputStream(file), "UTF-8"));
|
|
while ((line = reader.readLine()) != null) {
|
|
while ((line = reader.readLine()) != null) {
|
|
data = nlpServiceClient.split(line).getData();
|
|
data = nlpServiceClient.split(line).getData();
|