|
@@ -55,14 +55,15 @@ public class PresentExtract extends BaseExtract {
|
|
private void addFeatureToSymptom(Lemma lemma, Symptom symptom) {
|
|
private void addFeatureToSymptom(Lemma lemma, Symptom symptom) {
|
|
//时间信息
|
|
//时间信息
|
|
if (NlpUtil.isFeature(lemma.getProperty(), Constants.unit_time_type) || NlpUtil.isFeature(lemma.getProperty(), Constants.event_time_desc_type)) {
|
|
if (NlpUtil.isFeature(lemma.getProperty(), Constants.unit_time_type) || NlpUtil.isFeature(lemma.getProperty(), Constants.event_time_desc_type)) {
|
|
- PD pd = symptom.getPd();
|
|
|
|
- if (symptom.getPd() == null) {
|
|
|
|
- pd = new PD();
|
|
|
|
- pd.setValue(lemma.getText());
|
|
|
|
- } else {
|
|
|
|
- pd.setValue(pd.getValue() + "、" + lemma.getText());
|
|
|
|
|
|
+ List<PD> pds = symptom.getPds();
|
|
|
|
+ if (pds == null) {
|
|
|
|
+ pds = new ArrayList<>();
|
|
|
|
+
|
|
}
|
|
}
|
|
- symptom.setPd(pd);
|
|
|
|
|
|
+ PD pd = new PD();
|
|
|
|
+ pd.setValue(lemma.getText());
|
|
|
|
+ pds.add(pd);
|
|
|
|
+ symptom.setPds(pds);
|
|
}
|
|
}
|
|
//部位信息
|
|
//部位信息
|
|
if (NlpUtil.isFeature(lemma.getProperty(), Constants.body_part_type)) {
|
|
if (NlpUtil.isFeature(lemma.getProperty(), Constants.body_part_type)) {
|