@Test public void testBloomEncoder() { Document doc = DocumentFactory.fromText(text); BloomEncoder enc = new BloomEncoder(); assertFalse(enc.isModelAvailable()); enc.trainModel(Arrays.asList(doc), 0, WordHelpers.Language.EN); assertTrue(enc.isModelAvailable()); long vectorSize = enc.getEmbeddingVectorSize(); assertTrue(vectorSize >= 8); INDArray word1 = enc.encode("nuthatch"); INDArray word2 = enc.encode("songbird"); INDArray word3 = enc.encode("microsoft"); assertFalse(word1.equals(word2)); assertFalse(word2.equals(word3)); assertFalse(word1.equals(word3)); assertTrue(word1.sumNumber().intValue() > 0); assertTrue(word2.sumNumber().intValue() > 0); }
public BloomEncoder() { this("BLM", 4096, 5); }
BloomEncoder extends BagOfWordsEncoder { public BloomEncoder() { this("BLM", 4096, 5); } }
BloomEncoder extends BagOfWordsEncoder { public BloomEncoder() { this("BLM", 4096, 5); } BloomEncoder();  BloomEncoder(int bitSize, int hashFunctions);  BloomEncoder(String id, int bitSize, int hashFunctions); }
BloomEncoder extends BagOfWordsEncoder { public BloomEncoder() { this("BLM", 4096, 5); } BloomEncoder();  BloomEncoder(int bitSize, int hashFunctions);  BloomEncoder(String id, int bitSize, int hashFunctions); @Override String getName(); @Override void trainModel(Collection<Document> documents); void trainModel(Resource wordList); @Override void trainModel(Iterable<String> sentences, int minWordFrequency, int minWordLength, WordHelpers.Language language); @Override void trainModel(Collection<Document> documents, int minWordFrequency, WordHelpers.Language language); @Override long getEmbeddingVectorSize(); @Override INDArray encode(String phrase); @Override INDArray encode(Iterable<? extends Span> spans); @Override INDArray encode(String[] words); @Override void saveModel(Resource modelPath, String name); @Override void loadModel(Resource modelFile); }
BloomEncoder extends BagOfWordsEncoder { public BloomEncoder() { this("BLM", 4096, 5); } BloomEncoder();  BloomEncoder(int bitSize, int hashFunctions);  BloomEncoder(String id, int bitSize, int hashFunctions); @Override String getName(); @Override void trainModel(Collection<Document> documents); void trainModel(Resource wordList); @Override void trainModel(Iterable<String> sentences, int minWordFrequency, int minWordLength, WordHelpers.Language language); @Override void trainModel(Collection<Document> documents, int minWordFrequency, WordHelpers.Language language); @Override long getEmbeddingVectorSize(); @Override INDArray encode(String phrase); @Override INDArray encode(Iterable<? extends Span> spans); @Override INDArray encode(String[] words); @Override void saveModel(Resource modelPath, String name); @Override void loadModel(Resource modelFile);  }