LuceneHelper { public double getCosineSimilarity(int x, int y) { return getCosineSimilarity(x, y, LUCENE_ARTICLE_DEFAULT_FIELD); } protected  LuceneHelper(File wikiIdtToLuceneIdSerialization, File indexPath); static boolean hasDexterLuceneIndex(); static LuceneHelper getDexterLuceneHelper(); @SuppressWarnings("unchecked") void loadWikiIdToLuceneId(); float getSimilarity(Query query, int wikiId); double getCosineSimilarity(int x, int y); double getCosineSimilarity(int x, int y, String field); void addDocument(Article a); void clearIndex(); void commit(); int getFreq(String query, String field); int getFreq(String query); int getFreqFromSummary(String query); int numDocs(); void closeWriter(); List<Integer> query(String query, String field, int n); List<Integer> query(String query, String field); List<Integer> query(String query); Article getArticle(int id); Article getArticleSummary(int id); int getWikiId(int luceneId); @SuppressWarnings("null") void rankBySimilarity(SpotMatch spot, EntityMatchList eml,
			String context, String field); void rankBySimilarity(SpotMatch spot, EntityMatchList eml,
			String context);  }
@Test public void testSimilarity() { assertEquals(0, helper.getCosineSimilarity(1, 6), 0.01); assertEquals(1, helper.getCosineSimilarity(1, 1), 0.01); assertTrue(helper.getCosineSimilarity(1, 4) > helper .getCosineSimilarity(1, 3)); }