TIKA 2262 : Adopt changes in
package org.apache.tika.parser.captioning.tf;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Arrays;
+
import org.apache.http.HttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.ByteArrayEntity;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.tika.config.Field;
+import org.apache.tika.config.InitializableProblemHandler;
import org.apache.tika.config.Param;
import org.apache.tika.exception.TikaConfigException;
import org.apache.tika.exception.TikaException;
@@ -40,18 +53,6 @@ import org.slf4j.LoggerFactory;
import org.xml.sax.ContentHandler;
import org.xml.sax.SAXException;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Arrays;
-
/**
* Tensorflow image captioner.
* This implementation uses Tensorflow via REST API.
@@ -120,6 +121,11 @@ public class TensorflowRESTCaptioner implements ObjectRecogniser {
}
}
+ @Override
+ public void checkInitialization(InitializableProblemHandler handler) throws TikaConfigException {
+ //TODO -- what do we want to check?
+ }
+
@Override
public List<CaptionObject> recognise(InputStream stream,
ContentHandler handler, Metadata metadata, ParseContext context)
