Interface ObjectRecogniser
- All Superinterfaces:
Initializable
- All Known Implementing Classes:
DL4JInceptionV3Net
,DL4JVGG16Net
,TensorflowImageRecParser
,TensorflowRESTCaptioner
,TensorflowRESTRecogniser
,TensorflowRESTVideoRecogniser
This is a contract for object recognisers used by
ObjectRecognitionParser
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionThe mimes supported by this recogniservoid
initialize
(Map<String, Param> params) This is the hook for configuring the recogniserboolean
Is this service availableList<? extends RecognisedObject>
recognise
(InputStream stream, ContentHandler handler, Metadata metadata, ParseContext context) Recognise the objects in the streamMethods inherited from interface org.apache.tika.config.Initializable
checkInitialization
-
Method Details
-
getSupportedMimes
The mimes supported by this recogniser- Returns:
- set of mediatypes
-
isAvailable
boolean isAvailable()Is this service available- Returns:
true
when the service is available,false
otherwise
-
initialize
This is the hook for configuring the recogniser- Specified by:
initialize
in interfaceInitializable
- Parameters:
params
- configuration instance in the form of context- Throws:
TikaConfigException
- when there is an issue with configuration
-
recognise
List<? extends RecognisedObject> recognise(InputStream stream, ContentHandler handler, Metadata metadata, ParseContext context) throws IOException, SAXException, TikaException Recognise the objects in the stream- Parameters:
stream
- content streamhandler
- tika's content handlermetadata
- metadata instancecontext
- parser context- Returns:
- List of
RecognisedObject
s - Throws:
IOException
- when an I/O error occursSAXException
- when an issue with XML occursTikaException
- any generic error
-