MCPcopy Create free account
hub / github.com/GateNLP/gate-core / setTikaFeature

Method setTikaFeature

src/main/java/gate/corpora/TikaFormat.java:138–156  ·  view source on GitHub ↗
(Metadata metadata, Property property, FeatureMap fmap)

Source from the content-addressed store, hash-verified

136 }
137
138 private void setTikaFeature(Metadata metadata, Property property, FeatureMap fmap) {
139 String value = metadata.get(property);
140 if (value == null) {
141 return;
142 }
143
144 value = value.trim();
145 if (value.length() == 0) {
146 return;
147 }
148 String key = property.getName().toUpperCase();
149 if (fmap.containsKey(key)) {
150 fmap.put("TIKA_" + key, value);
151 }
152 else {
153 fmap.put(key, value);
154 fmap.put("TIKA_" + key, value);
155 }
156 }
157
158 /**
159 * Tries to extract tips for the parser as specified here -

Callers 1

setDocumentFeaturesMethod · 0.95

Calls 5

getMethod · 0.65
getNameMethod · 0.65
lengthMethod · 0.45
containsKeyMethod · 0.45
putMethod · 0.45

Tested by

no test coverage detected