Changeset 31503
- Timestamp:
- 2017-03-13T15:30:13+13:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
other-projects/hathitrust/wcsa/extracted-features-solr/trunk/solr-ingest/src/main/java/org/hathitrust/extractedfeatures/UniversalPOSLangMap.java
r31498 r31503 16 16 17 17 protected HashMap<String,HashMap<String,String>> _all_langmaps; 18 19 protected HashMap<String,Integer> _missing_pos; 18 20 19 21 public UniversalPOSLangMap(String langmap_directory) { … … 86 88 if (langmap != null) { 87 89 universal_pos = langmap.get(opennlp_pos_key); 90 if (universal_pos == null) { 91 String missing_lang_pos = lang_key + ":" + opennlp_pos_key; 92 93 Integer mpos_freq = 0; 94 if (_missing_pos.containsKey(missing_lang_pos)) { 95 mpos_freq = _missing_pos.get(missing_lang_pos); 96 } 97 else { 98 System.err.println("Warning: for language key '"+lang_key 99 +"' failed to find POS '" + opennlp_pos_key + "'"); 100 System.err.println("Defaulting to POS 'X' (i.e., 'other')"); 101 } 102 mpos_freq++; 103 _missing_pos.put(lang_key,mpos_freq); 104 105 universal_pos = "X"; 106 } 88 107 } 89 108
Note:
See TracChangeset
for help on using the changeset viewer.