public class GeoParser
extends org.apache.tika.parser.AbstractParser
| Constructor and Description |
|---|
GeoParser() |
| Modifier and Type | Method and Description |
|---|---|
String |
getGazetteerRestEndpoint() |
URL |
getNerModelUrl() |
Set<org.apache.tika.mime.MediaType> |
getSupportedTypes(org.apache.tika.parser.ParseContext parseContext) |
void |
initialize(GeoParserConfig geoParserConfig)
Initializes this parser
|
boolean |
isAvailable(GeoParserConfig geoParserConfig) |
void |
parse(InputStream stream,
ContentHandler handler,
org.apache.tika.metadata.Metadata metadata,
org.apache.tika.parser.ParseContext context) |
Map<String,List<Location>> |
searchGeoNames(ArrayList<String> locationNameEntities) |
void |
setGazetteerRestEndpoint(String gazetteerRestEndpoint) |
void |
setNerModelUrl(String nerModelUrl) |
public Set<org.apache.tika.mime.MediaType> getSupportedTypes(org.apache.tika.parser.ParseContext parseContext)
public void initialize(GeoParserConfig geoParserConfig)
geoParserConfig - config to load the url model from and set the gazetteer clientpublic void parse(InputStream stream, ContentHandler handler, org.apache.tika.metadata.Metadata metadata, org.apache.tika.parser.ParseContext context) throws IOException, SAXException, org.apache.tika.exception.TikaException
IOExceptionSAXExceptionorg.apache.tika.exception.TikaExceptionpublic Map<String,List<Location>> searchGeoNames(ArrayList<String> locationNameEntities)
public boolean isAvailable(GeoParserConfig geoParserConfig)
@Field public void setGazetteerRestEndpoint(String gazetteerRestEndpoint)
@Field public void setNerModelUrl(String nerModelUrl)
nerModelUrl - url for the NER modelIllegalArgumentException - for a malformed URLpublic String getGazetteerRestEndpoint()
public URL getNerModelUrl()
Copyright © 2007–2022 The Apache Software Foundation. All rights reserved.