@Test public void testBodyVectorisation2Terms() { Vectoriser vectorise = new Vectoriser(); Document doc = Document.of("first second", "", "", 0.0, new HashSet<String>()); Vector vec = vectorise.vectorise(doc); assertEquals("Adding one term should result in two dimensions set to one.", 4, vec.getNumNondefaultElements()); }
public Vector vectorise(Document document) { Vector body = luceneEncode(bodyCard, document.getBody()); Vector title = luceneEncode(titleCard, document.getTitle()); return Vectors.append(body, title); }
Vectoriser { public Vector vectorise(Document document) { Vector body = luceneEncode(bodyCard, document.getBody()); Vector title = luceneEncode(titleCard, document.getTitle()); return Vectors.append(body, title); } }
Vectoriser { public Vector vectorise(Document document) { Vector body = luceneEncode(bodyCard, document.getBody()); Vector title = luceneEncode(titleCard, document.getTitle()); return Vectors.append(body, title); }  }
Vectoriser { public Vector vectorise(Document document) { Vector body = luceneEncode(bodyCard, document.getBody()); Vector title = luceneEncode(titleCard, document.getTitle()); return Vectors.append(body, title); }  static int getCardinality(); Vector vectorise(Document document); }
Vectoriser { public Vector vectorise(Document document) { Vector body = luceneEncode(bodyCard, document.getBody()); Vector title = luceneEncode(titleCard, document.getTitle()); return Vectors.append(body, title); }  static int getCardinality(); Vector vectorise(Document document); static final int bodyCard; static final int titleCard; }