Interface ObjectRecogniser
-
- All Superinterfaces:
Initializable
- All Known Implementing Classes:
TensorflowImageRecParser
,TensorflowRESTCaptioner
,TensorflowRESTRecogniser
,TensorflowRESTVideoRecogniser
public interface ObjectRecogniser extends Initializable
This is a contract for object recognisers used byObjectRecognitionParser
- See Also:
TensorflowImageRecParser
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.Set<MediaType>
getSupportedMimes()
The mimes supported by this recogniservoid
initialize(java.util.Map<java.lang.String,Param> params)
This is the hook for configuring the recogniserboolean
isAvailable()
Is this service availablejava.util.List<? extends RecognisedObject>
recognise(java.io.InputStream stream, org.xml.sax.ContentHandler handler, Metadata metadata, ParseContext context)
Recognise the objects in the stream-
Methods inherited from interface org.apache.tika.config.Initializable
checkInitialization
-
-
-
-
Method Detail
-
getSupportedMimes
java.util.Set<MediaType> 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
void initialize(java.util.Map<java.lang.String,Param> params) throws TikaConfigException
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
java.util.List<? extends RecognisedObject> recognise(java.io.InputStream stream, org.xml.sax.ContentHandler handler, Metadata metadata, ParseContext context) throws java.io.IOException, org.xml.sax.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:
java.io.IOException
- when an I/O error occursorg.xml.sax.SAXException
- when an issue with XML occursTikaException
- any generic error
-
-