|
@@ -16,6 +16,8 @@ import java.util.*;
|
|
|
public class NlpCache {
|
|
|
//词典库
|
|
|
public static Segment segment_cache = null;
|
|
|
+ //词典库
|
|
|
+ public static Segment segment_cache_pacs = null;
|
|
|
//推送字典
|
|
|
public static Map<String, String> standard_info_push_map = null;
|
|
|
//词库同义词定义
|
|
@@ -34,6 +36,11 @@ public class NlpCache {
|
|
|
segment_cache = configuration.loadMainDict("tc.dict");
|
|
|
}
|
|
|
|
|
|
+ public static void createSegmentCachePacs() {
|
|
|
+ Configuration configuration = new DefaultConfig();
|
|
|
+ segment_cache_pacs = configuration.loadMainDict("pacs-tc.dict");
|
|
|
+ }
|
|
|
+
|
|
|
public static void createPushCache() {
|
|
|
Configuration configuration = new DefaultConfig();
|
|
|
standard_info_push_map = configuration.loadMapDict("push-tc.dict");
|
|
@@ -119,6 +126,13 @@ public class NlpCache {
|
|
|
return segment_cache;
|
|
|
}
|
|
|
|
|
|
+ public static Segment getSegment_cache_pacs() {
|
|
|
+ if (segment_cache_pacs == null) {
|
|
|
+ createSegmentCachePacs();
|
|
|
+ }
|
|
|
+ return segment_cache_pacs;
|
|
|
+ }
|
|
|
+
|
|
|
public static Map<String, String> getStandard_info_push_map() {
|
|
|
if (standard_info_push_map == null) {
|
|
|
createPushCache();
|