Interface ObjectRecogniser
-
- All Superinterfaces:
org.apache.tika.config.Initializable
- All Known Implementing Classes:
TensorflowImageRecParser,TensorflowRESTCaptioner,TensorflowRESTRecogniser,TensorflowRESTVideoRecogniser
public interface ObjectRecogniser extends org.apache.tika.config.InitializableThis is a contract for object recognisers used byObjectRecognitionParser- See Also:
TensorflowImageRecParser
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Set<org.apache.tika.mime.MediaType>getSupportedMimes()The mimes supported by this recogniservoidinitialize(Map<String,org.apache.tika.config.Param> params)This is the hook for configuring the recogniserbooleanisAvailable()Is this service availableList<? extends RecognisedObject>recognise(InputStream stream, ContentHandler handler, org.apache.tika.metadata.Metadata metadata, org.apache.tika.parser.ParseContext context)Recognise the objects in the stream
-
-
-
Method Detail
-
getSupportedMimes
Set<org.apache.tika.mime.MediaType> getSupportedMimes()
The mimes supported by this recogniser- Returns:
- set of mediatypes
-
isAvailable
boolean isAvailable()
Is this service available- Returns:
truewhen the service is available,falseotherwise
-
initialize
void initialize(Map<String,org.apache.tika.config.Param> params) throws org.apache.tika.exception.TikaConfigException
This is the hook for configuring the recogniser- Specified by:
initializein interfaceorg.apache.tika.config.Initializable- Parameters:
params- configuration instance in the form of context- Throws:
org.apache.tika.exception.TikaConfigException- when there is an issue with configuration
-
recognise
List<? extends RecognisedObject> 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
Recognise the objects in the stream- 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 occursorg.apache.tika.exception.TikaException- any generic error
-
-