|
@@ -85,7 +85,7 @@ public class ChangxConsultationDocTrans extends ModelDocTrans {
|
|
if (StringUtil.isBlank(text)) {
|
|
if (StringUtil.isBlank(text)) {
|
|
text = CxXmlUtil.getTextByNodePath(content, "//DocObjContent/Region");
|
|
text = CxXmlUtil.getTextByNodePath(content, "//DocObjContent/Region");
|
|
}
|
|
}
|
|
- Map<String, String> cutWordMap = getCutWordMap(text);
|
|
|
|
|
|
+ Map<String, String> cutWordMap = Preproc.getCutWordMap(true, consultationRecord_sourceTitles, text);
|
|
Map<String, String> xmlNodeValueMap = CxXmlUtil.firstLevelNodeValue("//DocObjContent//Region", content);
|
|
Map<String, String> xmlNodeValueMap = CxXmlUtil.firstLevelNodeValue("//DocObjContent//Region", content);
|
|
cutWordMap.putAll(xmlNodeValueMap);
|
|
cutWordMap.putAll(xmlNodeValueMap);
|
|
Map<String, String> structureMap = OrdinaryAssistant.mapKeyContrast(cutWordMap, consultationRecord_keyContrasts);
|
|
Map<String, String> structureMap = OrdinaryAssistant.mapKeyContrast(cutWordMap, consultationRecord_keyContrasts);
|
|
@@ -98,28 +98,6 @@ public class ChangxConsultationDocTrans extends ModelDocTrans {
|
|
return consultationRecordDoc;
|
|
return consultationRecordDoc;
|
|
}
|
|
}
|
|
|
|
|
|
- private Map<String, String> getCutWordMap(String content) {
|
|
|
|
- if (StringUtil.isBlank(content)) {
|
|
|
|
- return Maps.newHashMap();
|
|
|
|
- }
|
|
|
|
- List<String> targetTitles = Lists.newArrayList();
|
|
|
|
- consultationRecord_sourceTitles.forEach(sourceTitle -> {
|
|
|
|
- String targetTitle = "";
|
|
|
|
- for (int index = 0; index < sourceTitle.length(); index++) {
|
|
|
|
- if (index == sourceTitle.length() - 1) {
|
|
|
|
- targetTitle += sourceTitle.substring(index, index + 1);
|
|
|
|
- } else {
|
|
|
|
- targetTitle += sourceTitle.substring(index, index + 1) + "[\\s\\p{Zs}]*";
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- targetTitles.add(targetTitle);
|
|
|
|
- });
|
|
|
|
- if (ListUtil.isEmpty(targetTitles)) {
|
|
|
|
- return Maps.newHashMap();
|
|
|
|
- }
|
|
|
|
- return Preproc.extract_doc_pub(true, targetTitles, content);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
private List<String> consultationRecord_sourceTitles = Lists.newArrayList();
|
|
private List<String> consultationRecord_sourceTitles = Lists.newArrayList();
|
|
|
|
|
|
private List<String> consultationRecord_keyContrasts = Lists.newArrayList(
|
|
private List<String> consultationRecord_keyContrasts = Lists.newArrayList(
|