titleBasename = File.createTempFile( ScorerTest.class.getSimpleName(), "title", tempDir ).toString();
bodyFBasename = File.createTempFile( ScorerTest.class.getSimpleName(), "bodyf", tempDir ).toString();
titleFBasename = File.createTempFile( ScorerTest.class.getSimpleName(), "titlef", tempDir ).toString();
basenameFComb = File.createTempFile( ScorerTest.class.getSimpleName(), "combf", tempDir ).toString();
bodyBasenameBis = File.createTempFile( ScorerTest.class.getSimpleName(), "bodyfbis", tempDir ).toString();
documentCollection0 = new StringArrayDocumentCollection(
// number of documents N = 3
// average document size = 9 + 4 + 14 / 3 = 9
// number of occurrences = 27
new String[] {
"This sentence speaks really really really good of gods", // size 9
"And this, is a list of all the green things in the green world", // size 14
"get THIS not THAT" } // size 4
);
// BM25 testing
bodyDocumentCollection = new StringArrayDocumentCollection(
new String[] {
"A C C",
"D Z",
"A X Z",
"C X X",
"Q",
}
);
// Doc size: 3 2 3 3 1 (avg: 12/5)
// Frequency: A:2 C:2 D:1 Q:1 X:2 Z:2
titleDocumentCollection = new StringArrayDocumentCollection(
new String[] {
"A",
"Q",
"Z",
"Q X",
"Z",
}
);
// Doc size: 1 1 1 2 1 (avg: 9/8)
// Frequency: A:1 Q:2 X:1 Z:2
// BM25F testing
bodyFDocumentCollection = new StringArrayDocumentCollection(
new String[] {
"A C C",
"D Z",
"A X Z",
"C X X",
"Q",
"1",
"1",
"1"
}
);
// Doc size: 3 2 3 3 1 (avg: 12/5)
// Frequency: A:2 C:2 D:1 Q:1 X:2 Z:2
titleFDocumentCollection = new StringArrayDocumentCollection(
new String[] {
"A",
"Q",
"Z",
"Q X",