public class DocumentVector extends Object implements Serializable
| Constructor and Description |
|---|
DocumentVector(Collection<String> tokens) |
DocumentVector(Map<String,Double> elements) |
| Modifier and Type | Method and Description |
|---|---|
double |
cosineSimilarity(DocumentVector other) |
double |
dotProduct(DocumentVector other) |
boolean |
equals(Object obj) |
int |
hashCode() |
static DocumentVector |
merge(Collection<DocumentVector> vectors,
boolean useDocumentFrequency) |
List<Map.Entry<String,Double>> |
topComponents(int count) |
DocumentVector |
topN(int n) |
String |
toString() |
public DocumentVector(Collection<String> tokens)
public double cosineSimilarity(DocumentVector other)
public double dotProduct(DocumentVector other)
public static DocumentVector merge(Collection<DocumentVector> vectors, boolean useDocumentFrequency)
public DocumentVector topN(int n)
Copyright © 2017. All rights reserved.