Class TensorflowRESTCaptioner
java.lang.Object
org.apache.tika.parser.captioning.tf.TensorflowRESTCaptioner
- All Implemented Interfaces:
Initializable,ObjectRecogniser
@Deprecated(since="2026-04-30")
public class TensorflowRESTCaptioner
extends Object
implements ObjectRecogniser
Deprecated.
This version of the Apache Tika library is deprecated. Use your own version of Apache Tika.
Tensorflow image captioner.
This implementation uses Tensorflow via REST API.
NOTE : https://wiki.apache.org/tika/ImageCaption
- Since:
- Apache Tika 1.17
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidDeprecated.Deprecated.The mimes supported by this recogniservoidinitialize(Map<String, Param> params) Deprecated.This is the hook for configuring the recogniserbooleanDeprecated.Is this service availablerecognise(InputStream stream, ContentHandler handler, Metadata metadata, ParseContext context) Deprecated.Recognise the objects in the stream
-
Constructor Details
-
TensorflowRESTCaptioner
public TensorflowRESTCaptioner()Deprecated.
-
-
Method Details
-
getSupportedMimes
Deprecated.Description copied from interface:ObjectRecogniserThe mimes supported by this recogniser- Specified by:
getSupportedMimesin interfaceObjectRecogniser- Returns:
- set of mediatypes
-
isAvailable
public boolean isAvailable()Deprecated.Description copied from interface:ObjectRecogniserIs this service available- Specified by:
isAvailablein interfaceObjectRecogniser- Returns:
truewhen the service is available,falseotherwise
-
initialize
Deprecated.Description copied from interface:ObjectRecogniserThis is the hook for configuring the recogniser- Specified by:
initializein interfaceInitializable- Specified by:
initializein interfaceObjectRecogniser- Parameters:
params- configuration instance in the form of context- Throws:
TikaConfigException- when there is an issue with configuration
-
checkInitialization
Deprecated.- Specified by:
checkInitializationin interfaceInitializable- Parameters:
handler- if there is a problem and no custom initializableProblemHandler has been configured via Initializable parameters, this is called to respond.- Throws:
TikaConfigException
-
recognise
public List<CaptionObject> recognise(InputStream stream, ContentHandler handler, Metadata metadata, ParseContext context) throws IOException, SAXException, TikaException Deprecated.Description copied from interface:ObjectRecogniserRecognise the objects in the stream- Specified by:
recognisein interfaceObjectRecogniser- Parameters:
stream- content streamhandler- tika's content handlermetadata- metadata instancecontext- parser context- Returns:
- List of
RecognisedObjects - Throws:
IOException- when an I/O error occursSAXException- when an issue with XML occursTikaException- any generic error
-