Skip to content

Commit

Permalink
sync for public distro
Browse files Browse the repository at this point in the history
  • Loading branch information
mitzimorris committed Jan 20, 2014
1 parent 6d96718 commit 612a570
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ void testIndex(File indexDir, File testDir)

int[][] confusionMatrix
= new int[NEWSGROUPS.length][NEWSGROUPS.length];

File[] groupsDir = testDir.listFiles();
for (File group : groupsDir) {
int postCt = 0;
Expand All @@ -176,7 +175,6 @@ void testIndex(File indexDir, File testDir)
BooleanQuery termsQuery
= buildQuery(post.subject()
+ " " + post.body());

// only get first-best result
TopDocs hits = searcher.search(termsQuery,1);
ScoreDoc[] scoreDocs = hits.scoreDocs;
Expand All @@ -192,10 +190,6 @@ void testIndex(File indexDir, File testDir)
}
}
/*x*/
// System.out.println("test items for " + groupName + ": " + postCt);
// System.out.printf("%s: %5.3f\n",
// groupName,
// ((confusionMatrix[rowIdx][rowIdx]*1.0d)/(postCt*1.0d)));
System.out.print(groupName);
for (int i=0; i<NEWSGROUPS.length; i++)
System.out.printf("| %4d ", confusionMatrix[rowIdx][i]);
Expand Down
2 changes: 0 additions & 2 deletions src/applucene/src/com/colloquial/applucene/LuceneSearch.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ public static void main(String[] args)
Directory fsDir = FSDirectory.open(indexDir);
DirectoryReader reader = DirectoryReader.open(fsDir);
IndexSearcher searcher = new IndexSearcher(reader);

Analyzer stdAn
= new StandardAnalyzer(Version.LUCENE_45);
QueryParser parser
Expand All @@ -58,7 +57,6 @@ public static void main(String[] args)
ScoreDoc[] scoreDocs = hits.scoreDocs;
System.out.println("hits=" + scoreDocs.length);
System.out.println("Hits (rank,score,paper)");

for (int n = 0; n < scoreDocs.length; ++n) {
ScoreDoc sd = scoreDocs[n];
float score = sd.score;
Expand Down

0 comments on commit 612a570

Please sign in to comment.