}
catch (Exception e) {
logger.warn("Can't use AlchemyAPI as entity/text extractor: " + e.getMessage());
}
try {
text_extractor_mappings.put("boilerpipe", new TextExtractorBoilerpipe());
}
catch (Exception e) {
logger.warn("Can't use Boilerpipe as text extractor: " + e.getMessage());
}
try {
text_extractor_mappings.put("tika", new TextExtractorTika());
}
catch (Exception e) {
logger.warn("Can't use Tika as text extractor: " + e.getMessage());
}
if (null != pm.getDefaultEntityExtractor()) {
default_entity_extractor = entity_extractor_mappings.get(pm.getDefaultEntityExtractor().toLowerCase());
}
else {
default_entity_extractor = null;
}
if (null != pm.getDefaultTextExtractor()) {
default_text_extractor = text_extractor_mappings.get(pm.getDefaultTextExtractor().toLowerCase());
}
else {
try {
default_text_extractor = new TextExtractorBoilerpipe();
}
catch (Exception e) {
logger.warn("Can't use BoilerPlate as default text extractor: " + e.getMessage());
}
}