public class TensorflowRESTCaptioner extends Object implements ObjectRecogniser
NOTE : https://wiki.apache.org/tika/ImageCaption
| Constructor and Description |
|---|
TensorflowRESTCaptioner() |
| Modifier and Type | Method and Description |
|---|---|
void |
checkInitialization(org.apache.tika.config.InitializableProblemHandler handler) |
protected URI |
getApiUri(org.apache.tika.metadata.Metadata metadata) |
Set<org.apache.tika.mime.MediaType> |
getSupportedMimes()
The mimes supported by this recogniser
|
void |
initialize(Map<String,org.apache.tika.config.Param> params)
This is the hook for configuring the recogniser
|
boolean |
isAvailable()
Is this service available
|
List<CaptionObject> |
recognise(InputStream stream,
ContentHandler handler,
org.apache.tika.metadata.Metadata metadata,
org.apache.tika.parser.ParseContext context)
Recognise the objects in the stream
|
protected URI getApiUri(org.apache.tika.metadata.Metadata metadata)
public Set<org.apache.tika.mime.MediaType> getSupportedMimes()
ObjectRecognisergetSupportedMimes in interface ObjectRecogniserpublic boolean isAvailable()
ObjectRecogniserisAvailable in interface ObjectRecognisertrue when the service is available, false otherwisepublic void initialize(Map<String,org.apache.tika.config.Param> params) throws org.apache.tika.exception.TikaConfigException
ObjectRecogniserinitialize in interface org.apache.tika.config.Initializableinitialize in interface ObjectRecogniserparams - configuration instance in the form of contextorg.apache.tika.exception.TikaConfigException - when there is an issue with configurationpublic void checkInitialization(org.apache.tika.config.InitializableProblemHandler handler)
throws org.apache.tika.exception.TikaConfigException
checkInitialization in interface org.apache.tika.config.Initializableorg.apache.tika.exception.TikaConfigExceptionpublic List<CaptionObject> recognise(InputStream stream, ContentHandler handler, org.apache.tika.metadata.Metadata metadata, org.apache.tika.parser.ParseContext context) throws IOException, SAXException, org.apache.tika.exception.TikaException
ObjectRecogniserrecognise in interface ObjectRecogniserstream - content streamhandler - tika's content handlermetadata - metadata instancecontext - parser contextRecognisedObjectsIOException - when an I/O error occursSAXException - when an issue with XML occursorg.apache.tika.exception.TikaException - any generic errorCopyright © 2007–2018 The Apache Software Foundation. All rights reserved.