Import ‘org.apache.avro:avro:1.9.0’ (choose proper version) follow like this String path = getClass().getResource(path).getPath(); File file = New File(path); DatumReader datumReader = new GenericDatumReader(); DataFileReader dataFileReader = new DataFileReader(file, datumReader); record = dataFileReader.next(record); record.get(key).toString();
Save fastest model bin file to AWS S3 Import FastText4J library to Spring java project dependency "com.github.linkfluence:fastText4j:0.2.1" compile('com.github.linkfluence:fastText4j') get fasttext model bin file from S3(Use AWS aws-java-sdk-s3 library) load FastText class with model bin InputStream modelBinary; FastText fastText = FastText.loadModel(modelBinary); call predict function t..
Some system needs to find and deal with outliers item, people, objects, etc. For example, we needs to show search movie results which people might interest. If so, we need to find boring contents among search results. Let's assume we have fun score for all movie and fun score is Normal Population(N(0,σ2)). Then we can find extremely boring movie. The outlier detection formula is Lower bound ..