From: Adam Dickmeiss Date: Tue, 25 Sep 2012 11:15:43 +0000 (+0200) Subject: Change rank debug display X-Git-Tag: v1.6.22~50 X-Git-Url: http://sru.miketaylor.org.uk/?a=commitdiff_plain;h=7184974aff1c737312a05376845b9a83c03c28ab;p=pazpar2-moved-to-github.git Change rank debug display Rename a few variables and print leading contents of field that we match against. --- diff --git a/src/relevance.c b/src/relevance.c index 51d33ac..9766a5b 100644 --- a/src/relevance.c +++ b/src/relevance.c @@ -53,7 +53,7 @@ struct word_entry { static struct word_entry *word_entry_match(struct relevance *r, const char *norm_str, - const char *rank, int *mult) + const char *rank, int *weight) { int i = 1; struct word_entry *entries = r->entries; @@ -63,7 +63,7 @@ static struct word_entry *word_entry_match(struct relevance *r, { const char *cp = 0; int no_read = 0; - sscanf(rank, "%d%n", mult, &no_read); + sscanf(rank, "%d%n", weight, &no_read); rank += no_read; while (*rank == ' ') rank++; @@ -71,7 +71,7 @@ static struct word_entry *word_entry_match(struct relevance *r, { if ((cp - rank) == strlen(entries->ccl_field) && memcmp(entries->ccl_field, rank, cp - rank) == 0) - *mult = atoi(cp + 1); + *weight = atoi(cp + 1); } return entries; } @@ -83,44 +83,58 @@ void relevance_countwords(struct relevance *r, struct record_cluster *cluster, const char *words, const char *rank, const char *name) { - int *mult = r->term_frequency_vec_tmp; + int *w = r->term_frequency_vec_tmp; const char *norm_str; int i, length = 0; double lead_decay = r->lead_decay; struct word_entry *e; - WRBUF w = cluster->relevance_explain1; + WRBUF wr = cluster->relevance_explain1; + int printed_about_field = 0; pp2_charset_token_first(r->prt, words, 0); for (e = r->entries, i = 1; i < r->vec_len; i++, e = e->next) { - mult[i] = 0; + w[i] = 0; r->term_pos[i] = 0; } assert(rank); while ((norm_str = pp2_charset_token_next(r->prt))) { - int local_mult = 0; - e = word_entry_match(r, norm_str, rank, &local_mult); + int local_weight = 0; + e = word_entry_match(r, norm_str, rank, &local_weight); if (e) { int res = e->termno; int j; + if (!printed_about_field) + { + printed_about_field = 1; + wrbuf_printf(wr, "field=%s content=", name); + if (strlen(words) > 50) + { + wrbuf_xmlputs_n(wr, words, 49); + wrbuf_puts(wr, " ..."); + } + else + wrbuf_xmlputs(wr, words); + wrbuf_puts(wr, ";\n"); + } assert(res < r->vec_len); - mult[res] += local_mult / (1 + log2(1 + lead_decay * length)); - wrbuf_printf(w, "%s: mult[%d] += local_mult(%d) / " + w[res] += local_weight / (1 + log2(1 + lead_decay * length)); + wrbuf_printf(wr, "%s: w[%d] += w(%d) / " "(1+log2(1+lead_decay(%f) * length(%d)));\n", - e->display_str, res, local_mult, lead_decay, length); + e->display_str, res, local_weight, lead_decay, length); j = res - 1; if (j > 0 && r->term_pos[j]) { int d = length + 1 - r->term_pos[j]; - mult[res] += mult[res] * r->follow_factor / (1 + log2(d)); - wrbuf_printf(w, "%s: mult[%d] += mult[%d](%d) * follow(%f) / " + wrbuf_printf(wr, "%s: w[%d] += w[%d](%d) * follow(%f) / " "(1+log2(d(%d));\n", - e->display_str, res, res, mult[res], + e->display_str, res, res, w[res], r->follow_factor, d); + w[res] += w[res] * r->follow_factor / (1 + log2(d)); } for (j = 0; j < r->vec_len; j++) r->term_pos[j] = j < res ? 0 : length + 1; @@ -130,26 +144,25 @@ void relevance_countwords(struct relevance *r, struct record_cluster *cluster, for (e = r->entries, i = 1; i < r->vec_len; i++, e = e->next) { - if (length == 0 || mult[i] == 0) + if (length == 0 || w[i] == 0) continue; - wrbuf_printf(w, "%s: field=%s vecf[%d] += mult[%d](%d)", - e->display_str, name, i, i, mult[i]); + wrbuf_printf(wr, "%s: tf[%d] += w[%d](%d)", e->display_str, i, i, w[i]); switch (r->length_divide) { case 0: - wrbuf_printf(w, ";\n"); - cluster->term_frequency_vecf[i] += (double) mult[i]; + cluster->term_frequency_vecf[i] += (double) w[i]; break; case 1: - wrbuf_printf(w, " / log2(1+length(%d));\n", length); + wrbuf_printf(wr, " / log2(1+length(%d))", length); cluster->term_frequency_vecf[i] += - (double) mult[i] / log2(1 + length); + (double) w[i] / log2(1 + length); break; case 2: - wrbuf_printf(w, " / length(%d);\n", length); - cluster->term_frequency_vecf[i] += (double) mult[i] / length; + wrbuf_printf(wr, " / length(%d)", length); + cluster->term_frequency_vecf[i] += (double) w[i] / length; } - cluster->term_frequency_vec[i] += mult[i]; + cluster->term_frequency_vec[i] += w[i]; + wrbuf_printf(wr, " (%f);\n", cluster->term_frequency_vecf[i]); } cluster->term_frequency_vec[0] += length; @@ -308,6 +321,7 @@ void relevance_prepare_read(struct relevance *rel, struct reclist *reclist) break; w = rec->relevance_explain2; wrbuf_rewind(w); + wrbuf_puts(w, "relevance = 0;\n"); for (i = 1; i < rel->vec_len; i++) { float termfreq = (float) rec->term_frequency_vecf[i]; @@ -316,7 +330,7 @@ void relevance_prepare_read(struct relevance *rel, struct reclist *reclist) wrbuf_printf(w, "idf[%d] = log(((1 + total(%d))/termoccur(%d));\n", i, rel->doc_frequency_vec[0], rel->doc_frequency_vec[i]); - wrbuf_printf(w, "%s: relevance += 100000 * vecf[%d](%f) * " + wrbuf_printf(w, "%s: relevance += 100000 * tf[%d](%f) * " "idf[%d](%f) (%d);\n", e->display_str, i, termfreq, i, idfvec[i], add); relevance += add; diff --git a/test/test_http_18.res b/test/test_http_18.res index 64a8b86..6b8b2d1 100644 --- a/test/test_http_18.res +++ b/test/test_http_18.res @@ -19,10 +19,12 @@ 1 11882 -computer: mult[1] += local_mult(3) / (1+log2(1+lead_decay(0.000000) * length(5))); -computer: field=description vecf[1] += mult[1](3) / length(35); +field=description content=This data base is a computer based bibliography o ...; +computer: w[1] += w(3) / (1+log2(1+lead_decay(0.000000) * length(5))); +computer: tf[1] += w[1](3) / length(35) (0.085714); +relevance = 0; idf[1] = log(((1 + total(3))/termoccur(1)); -computer: relevance += 100000 * vecf[1](0.085714) * idf[1](1.386294) (11882); +computer: relevance += 100000 * tf[1](0.085714) * idf[1](1.386294) (11882); score = relevance(11882); content: title bibliography of maine geology author medium book @@ -41,8 +43,9 @@ score = relevance(11882); 1 0 +relevance = 0; idf[1] = log(((1 + total(3))/termoccur(1)); -computer: relevance += 100000 * vecf[1](0.000000) * idf[1](1.386294) (0); +computer: relevance += 100000 * tf[1](0.000000) * idf[1](1.386294) (0); score = relevance(0); content: title groundwater resource maps county series author medium book @@ -61,8 +64,9 @@ score = relevance(0); 1 0 +relevance = 0; idf[1] = log(((1 + total(3))/termoccur(1)); -computer: relevance += 100000 * vecf[1](0.000000) * idf[1](1.386294) (0); +computer: relevance += 100000 * tf[1](0.000000) * idf[1](1.386294) (0); score = relevance(0); content: title oil gas drilling author medium book diff --git a/test/test_http_28.res b/test/test_http_28.res index 8362ebf..d32263c 100644 --- a/test/test_http_28.res +++ b/test/test_http_28.res @@ -14,10 +14,12 @@ 1 86304 -utah: mult[1] += local_mult(6) / (1+log2(1+lead_decay(0.000000) * length(0))); -utah: field=title vecf[1] += mult[1](6) / length(2); +field=title content=UTAH GEOCHROMOMETRY; +utah: w[1] += w(6) / (1+log2(1+lead_decay(0.000000) * length(0))); +utah: tf[1] += w[1](6) / length(2) (3.000000); +relevance = 0; idf[1] = log(((1 + total(3))/termoccur(3)); -utah: relevance += 100000 * vecf[1](3.000000) * idf[1](0.287682) (86304); +utah: relevance += 100000 * tf[1](3.000000) * idf[1](0.287682) (86304); score = relevance(86304); content: title utah geochromometry author medium book @@ -31,10 +33,12 @@ score = relevance(86304); 1 57536 -utah: mult[1] += local_mult(6) / (1+log2(1+lead_decay(0.000000) * length(0))); -utah: field=title vecf[1] += mult[1](6) / length(3); +field=title content=UTAH EARTHQUAKE EPICENTERS; +utah: w[1] += w(6) / (1+log2(1+lead_decay(0.000000) * length(0))); +utah: tf[1] += w[1](6) / length(3) (2.000000); +relevance = 0; idf[1] = log(((1 + total(3))/termoccur(3)); -utah: relevance += 100000 * vecf[1](2.000000) * idf[1](0.287682) (57536); +utah: relevance += 100000 * tf[1](2.000000) * idf[1](0.287682) (57536); score = relevance(57536); content: title utah earthquake epicenters author medium book @@ -48,10 +52,12 @@ score = relevance(57536); 1 28768 -utah: mult[1] += local_mult(6) / (1+log2(1+lead_decay(0.000000) * length(0))); -utah: field=title vecf[1] += mult[1](6) / length(6); +field=title content=UTAH GEOLOGICAL AND MINERAL SURVEY PUBLICATIONS; +utah: w[1] += w(6) / (1+log2(1+lead_decay(0.000000) * length(0))); +utah: tf[1] += w[1](6) / length(6) (1.000000); +relevance = 0; idf[1] = log(((1 + total(3))/termoccur(3)); -utah: relevance += 100000 * vecf[1](1.000000) * idf[1](0.287682) (28768); +utah: relevance += 100000 * tf[1](1.000000) * idf[1](0.287682) (28768); score = relevance(28768); content: title utah geological and mineral survey publications author medium book diff --git a/test/test_http_32.res b/test/test_http_32.res index 8899c32..2c4918b 100644 --- a/test/test_http_32.res +++ b/test/test_http_32.res @@ -16,10 +16,12 @@ 1 11882 -computer: mult[1] += local_mult(3) / (1+log2(1+lead_decay(0.000000) * length(5))); -computer: field=description vecf[1] += mult[1](3) / length(35); +field=description content=This data base is a computer based bibliography o ...; +computer: w[1] += w(3) / (1+log2(1+lead_decay(0.000000) * length(5))); +computer: tf[1] += w[1](3) / length(35) (0.085714); +relevance = 0; idf[1] = log(((1 + total(3))/termoccur(1)); -computer: relevance += 100000 * vecf[1](0.085714) * idf[1](1.386294) (11882); +computer: relevance += 100000 * tf[1](0.085714) * idf[1](1.386294) (11882); score = relevance(11882); content: title bibliography of maine geology @@ -35,8 +37,9 @@ score = relevance(11882); 1 0 +relevance = 0; idf[1] = log(((1 + total(3))/termoccur(1)); -computer: relevance += 100000 * vecf[1](0.000000) * idf[1](1.386294) (0); +computer: relevance += 100000 * tf[1](0.000000) * idf[1](1.386294) (0); score = relevance(0); content: title groundwater resource maps county series @@ -52,8 +55,9 @@ score = relevance(0); 1 0 +relevance = 0; idf[1] = log(((1 + total(3))/termoccur(1)); -computer: relevance += 100000 * vecf[1](0.000000) * idf[1](1.386294) (0); +computer: relevance += 100000 * tf[1](0.000000) * idf[1](1.386294) (0); score = relevance(0); content: title oil gas drilling diff --git a/test/test_http_36.res b/test/test_http_36.res index b300917..4aea698 100644 --- a/test/test_http_36.res +++ b/test/test_http_36.res @@ -23,10 +23,12 @@ 1 50262 -computer: mult[1] += local_mult(6) / (1+log2(1+lead_decay(0.000000) * length(0))); -computer: field=title vecf[1] += mult[1](6) / length(3); +field=title content=Computer science &amp; technology :; +computer: w[1] += w(6) / (1+log2(1+lead_decay(0.000000) * length(0))); +computer: tf[1] += w[1](6) / length(3) (2.000000); +relevance = 0; idf[1] = log(((1 + total(8))/termoccur(7)); -computer: relevance += 100000 * vecf[1](2.000000) * idf[1](0.251314) (50262); +computer: relevance += 100000 * tf[1](2.000000) * idf[1](0.251314) (50262); score = relevance(50262); content: title computer science technology author medium book @@ -52,10 +54,12 @@ score = relevance(50262); 1 50262 -computer: mult[1] += local_mult(6) / (1+log2(1+lead_decay(0.000000) * length(1))); -computer: field=title vecf[1] += mult[1](6) / length(3); +field=title content=The Computer Bible /; +computer: w[1] += w(6) / (1+log2(1+lead_decay(0.000000) * length(1))); +computer: tf[1] += w[1](6) / length(3) (2.000000); +relevance = 0; idf[1] = log(((1 + total(8))/termoccur(7)); -computer: relevance += 100000 * vecf[1](2.000000) * idf[1](0.251314) (50262); +computer: relevance += 100000 * tf[1](2.000000) * idf[1](0.251314) (50262); score = relevance(50262); content: title the computer bible author medium book @@ -80,10 +84,12 @@ score = relevance(50262); 1 21541 -computer: mult[1] += local_mult(6) / (1+log2(1+lead_decay(0.000000) * length(5))); -computer: field=title vecf[1] += mult[1](6) / length(7); +field=title content=A plan for community college computer development.; +computer: w[1] += w(6) / (1+log2(1+lead_decay(0.000000) * length(5))); +computer: tf[1] += w[1](6) / length(7) (0.857143); +relevance = 0; idf[1] = log(((1 + total(8))/termoccur(7)); -computer: relevance += 100000 * vecf[1](0.857143) * idf[1](0.251314) (21541); +computer: relevance += 100000 * tf[1](0.857143) * idf[1](0.251314) (21541); score = relevance(21541); content: title a plan for community college computer development author medium book @@ -110,10 +116,12 @@ score = relevance(21541); 1 21541 -computer: mult[1] += local_mult(6) / (1+log2(1+lead_decay(0.000000) * length(4))); -computer: field=title vecf[1] += mult[1](6) / length(7); +field=title content=Washington metropolitan area rail computer feasib ...; +computer: w[1] += w(6) / (1+log2(1+lead_decay(0.000000) * length(4))); +computer: tf[1] += w[1](6) / length(7) (0.857143); +relevance = 0; idf[1] = log(((1 + total(8))/termoccur(7)); -computer: relevance += 100000 * vecf[1](0.857143) * idf[1](0.251314) (21541); +computer: relevance += 100000 * tf[1](0.857143) * idf[1](0.251314) (21541); score = relevance(21541); content: title washington metropolitan area rail computer feasibility study author englund carl r medium book @@ -143,10 +151,12 @@ score = relevance(21541); 1 20942 -computer: mult[1] += local_mult(5) / (1+log2(1+lead_decay(0.000000) * length(4))); -computer: field=title-remainder vecf[1] += mult[1](5) / length(6); +field=title-remainder content=a portfolio of thematic computer maps /; +computer: w[1] += w(5) / (1+log2(1+lead_decay(0.000000) * length(4))); +computer: tf[1] += w[1](5) / length(6) (0.833333); +relevance = 0; idf[1] = log(((1 + total(8))/termoccur(7)); -computer: relevance += 100000 * vecf[1](0.833333) * idf[1](0.251314) (20942); +computer: relevance += 100000 * tf[1](0.833333) * idf[1](0.251314) (20942); score = relevance(20942); content: title the puget sound region author mairs john w medium book @@ -175,10 +185,12 @@ score = relevance(20942); 1 15078 -computer: mult[1] += local_mult(6) / (1+log2(1+lead_decay(0.000000) * length(0))); -computer: field=title vecf[1] += mult[1](6) / length(10); +field=title content=Computer processing of dynamic images from an Ang ...; +computer: w[1] += w(6) / (1+log2(1+lead_decay(0.000000) * length(0))); +computer: tf[1] += w[1](6) / length(10) (0.600000); +relevance = 0; idf[1] = log(((1 + total(8))/termoccur(7)); -computer: relevance += 100000 * vecf[1](0.600000) * idf[1](0.251314) (15078); +computer: relevance += 100000 * tf[1](0.600000) * idf[1](0.251314) (15078); score = relevance(15078); content: title computer processing of dynamic images from an anger scintillation camera author medium book @@ -201,10 +213,12 @@ score = relevance(15078); 1 15078 -computer: mult[1] += local_mult(6) / (1+log2(1+lead_decay(0.000000) * length(8))); -computer: field=title vecf[1] += mult[1](6) / length(10); +field=title content=The use of passwords for controlled access to com ...; +computer: w[1] += w(6) / (1+log2(1+lead_decay(0.000000) * length(8))); +computer: tf[1] += w[1](6) / length(10) (0.600000); +relevance = 0; idf[1] = log(((1 + total(8))/termoccur(7)); -computer: relevance += 100000 * vecf[1](0.600000) * idf[1](0.251314) (15078); +computer: relevance += 100000 * tf[1](0.600000) * idf[1](0.251314) (15078); score = relevance(15078); content: title the use of passwords for controlled access to computer resources author wood helen m medium book @@ -229,8 +243,9 @@ score = relevance(15078); 1 0 +relevance = 0; idf[1] = log(((1 + total(8))/termoccur(7)); -computer: relevance += 100000 * vecf[1](0.000000) * idf[1](0.251314) (0); +computer: relevance += 100000 * tf[1](0.000000) * idf[1](0.251314) (0); score = relevance(0); content: title reconstruction tomography in diagnostic radiology and nuclear medicine author medium book diff --git a/test/test_http_41.res b/test/test_http_41.res index 1d2ce8e..2a6fcee 100644 --- a/test/test_http_41.res +++ b/test/test_http_41.res @@ -14,8 +14,9 @@ 1 0 +relevance = 0; idf[1] = log(((1 + total(8))/termoccur(0)); -the: relevance += 100000 * vecf[1](0.000000) * idf[1](0.000000) (0); +the: relevance += 100000 * tf[1](0.000000) * idf[1](0.000000) (0); score = relevance(0); content: title applied geology file author medium book @@ -29,8 +30,9 @@ score = relevance(0); 1 0 +relevance = 0; idf[1] = log(((1 + total(8))/termoccur(0)); -the: relevance += 100000 * vecf[1](0.000000) * idf[1](0.000000) (0); +the: relevance += 100000 * tf[1](0.000000) * idf[1](0.000000) (0); score = relevance(0); content: title electric log library author medium book @@ -44,8 +46,9 @@ score = relevance(0); 1 0 +relevance = 0; idf[1] = log(((1 + total(8))/termoccur(0)); -the: relevance += 100000 * vecf[1](0.000000) * idf[1](0.000000) (0); +the: relevance += 100000 * tf[1](0.000000) * idf[1](0.000000) (0); score = relevance(0); content: title isotopic dates of rocks and minerals author medium book @@ -59,8 +62,9 @@ score = relevance(0); 1 0 +relevance = 0; idf[1] = log(((1 + total(8))/termoccur(0)); -the: relevance += 100000 * vecf[1](0.000000) * idf[1](0.000000) (0); +the: relevance += 100000 * tf[1](0.000000) * idf[1](0.000000) (0); score = relevance(0); content: title mine map index author medium book @@ -74,8 +78,9 @@ score = relevance(0); 1 0 +relevance = 0; idf[1] = log(((1 + total(8))/termoccur(0)); -the: relevance += 100000 * vecf[1](0.000000) * idf[1](0.000000) (0); +the: relevance += 100000 * tf[1](0.000000) * idf[1](0.000000) (0); score = relevance(0); content: title utah crib file author medium book @@ -89,8 +94,9 @@ score = relevance(0); 1 0 +relevance = 0; idf[1] = log(((1 + total(8))/termoccur(0)); -the: relevance += 100000 * vecf[1](0.000000) * idf[1](0.000000) (0); +the: relevance += 100000 * tf[1](0.000000) * idf[1](0.000000) (0); score = relevance(0); content: title utah earthquake epicenters author medium book @@ -104,8 +110,9 @@ score = relevance(0); 1 0 +relevance = 0; idf[1] = log(((1 + total(8))/termoccur(0)); -the: relevance += 100000 * vecf[1](0.000000) * idf[1](0.000000) (0); +the: relevance += 100000 * tf[1](0.000000) * idf[1](0.000000) (0); score = relevance(0); content: title utah geologic map bibliography author medium book @@ -119,8 +126,9 @@ score = relevance(0); 1 0 +relevance = 0; idf[1] = log(((1 + total(8))/termoccur(0)); -the: relevance += 100000 * vecf[1](0.000000) * idf[1](0.000000) (0); +the: relevance += 100000 * tf[1](0.000000) * idf[1](0.000000) (0); score = relevance(0); content: title utah geological and mineral survey publications author medium book diff --git a/test/test_http_42.res b/test/test_http_42.res index 723b9ca..7522266 100644 --- a/test/test_http_42.res +++ b/test/test_http_42.res @@ -30,13 +30,16 @@ 1 31823 -the: mult[1] += local_mult(6) / (1+log2(1+lead_decay(0.000000) * length(0))); -the: field=title vecf[1] += mult[1](6) / length(5); -the: mult[1] += local_mult(3) / (1+log2(1+lead_decay(0.000000) * length(2))); -the: mult[1] += local_mult(3) / (1+log2(1+lead_decay(0.000000) * length(8))); -the: field=description vecf[1] += mult[1](6) / length(11); +field=title content=The religious teachers of Greece.; +the: w[1] += w(6) / (1+log2(1+lead_decay(0.000000) * length(0))); +the: tf[1] += w[1](6) / length(5) (1.200000); +field=description content=Reprint of the 1909 ed., which was issued as the ...; +the: w[1] += w(3) / (1+log2(1+lead_decay(0.000000) * length(2))); +the: w[1] += w(3) / (1+log2(1+lead_decay(0.000000) * length(8))); +the: tf[1] += w[1](6) / length(11) (1.745455); +relevance = 0; idf[1] = log(((1 + total(5))/termoccur(5)); -the: relevance += 100000 * vecf[1](1.745455) * idf[1](0.182322) (31823); +the: relevance += 100000 * tf[1](1.745455) * idf[1](0.182322) (31823); score = relevance(31823); content: title the religious teachers of greece author adam james medium book @@ -66,10 +69,12 @@ score = relevance(31823); 1 27348 -the: mult[1] += local_mult(6) / (1+log2(1+lead_decay(0.000000) * length(0))); -the: field=title vecf[1] += mult[1](6) / length(4); +field=title content=The Puget Sound Region :; +the: w[1] += w(6) / (1+log2(1+lead_decay(0.000000) * length(0))); +the: tf[1] += w[1](6) / length(4) (1.500000); +relevance = 0; idf[1] = log(((1 + total(5))/termoccur(5)); -the: relevance += 100000 * vecf[1](1.500000) * idf[1](0.182322) (27348); +the: relevance += 100000 * tf[1](1.500000) * idf[1](0.182322) (27348); score = relevance(27348); content: title the puget sound region author mairs john w medium book @@ -94,10 +99,12 @@ score = relevance(27348); 1 22790 -the: mult[1] += local_mult(5) / (1+log2(1+lead_decay(0.000000) * length(2))); -the: field=title-remainder vecf[1] += mult[1](5) / length(4); +field=title-remainder content=proceedings of the workshop ... /; +the: w[1] += w(5) / (1+log2(1+lead_decay(0.000000) * length(2))); +the: tf[1] += w[1](5) / length(4) (1.250000); +relevance = 0; idf[1] = log(((1 + total(5))/termoccur(5)); -the: relevance += 100000 * vecf[1](1.250000) * idf[1](0.182322) (22790); +the: relevance += 100000 * tf[1](1.250000) * idf[1](0.182322) (22790); score = relevance(22790); content: title reconstruction tomography in diagnostic radiology and nuclear medicine author medium book @@ -120,10 +127,12 @@ score = relevance(22790); 1 10939 -the: mult[1] += local_mult(6) / (1+log2(1+lead_decay(0.000000) * length(0))); -the: field=title vecf[1] += mult[1](6) / length(10); +field=title content=The use of passwords for controlled access to com ...; +the: w[1] += w(6) / (1+log2(1+lead_decay(0.000000) * length(0))); +the: tf[1] += w[1](6) / length(10) (0.600000); +relevance = 0; idf[1] = log(((1 + total(5))/termoccur(5)); -the: relevance += 100000 * vecf[1](0.600000) * idf[1](0.182322) (10939); +the: relevance += 100000 * tf[1](0.600000) * idf[1](0.182322) (10939); score = relevance(10939); content: title the use of passwords for controlled access to computer resources author wood helen m medium book @@ -146,10 +155,12 @@ score = relevance(10939); 1 6511 -the: mult[1] += local_mult(5) / (1+log2(1+lead_decay(0.000000) * length(6))); -the: field=title-remainder vecf[1] += mult[1](5) / length(14); +field=title-remainder content=proceedings of a workshop held at the National Bu ...; +the: w[1] += w(5) / (1+log2(1+lead_decay(0.000000) * length(6))); +the: tf[1] += w[1](5) / length(14) (0.357143); +relevance = 0; idf[1] = log(((1 + total(5))/termoccur(5)); -the: relevance += 100000 * vecf[1](0.357143) * idf[1](0.182322) (6511); +the: relevance += 100000 * tf[1](0.357143) * idf[1](0.182322) (6511); score = relevance(6511); content: title computer science technology author medium book diff --git a/test/test_http_45.res b/test/test_http_45.res index 3ae7d3e..01510ca 100644 --- a/test/test_http_45.res +++ b/test/test_http_45.res @@ -29,8 +29,9 @@ 1 0 +relevance = 0; idf[1] = log(((1 + total(1))/termoccur(0)); -louis: relevance += 100000 * vecf[1](0.000000) * idf[1](0.000000) (0); +louis: relevance += 100000 * tf[1](0.000000) * idf[1](0.000000) (0); score = relevance(0); content: title computer processing of dynamic images from an anger scintillation camera author medium book diff --git a/test/test_http_49.res b/test/test_http_49.res index 643ff4f..dc0483f 100644 --- a/test/test_http_49.res +++ b/test/test_http_49.res @@ -30,12 +30,15 @@ 1 291121 -greece: mult[1] += local_mult(6) / (1+log2(1+lead_decay(0.000000) * length(4))); -greece: field=title vecf[1] += mult[1](6) / length(5); -greece: mult[1] += local_mult(3) / (1+log2(1+lead_decay(0.000000) * length(0))); -greece: field=subject vecf[1] += mult[1](3) / length(1); +field=title content=The religious teachers of Greece.; +greece: w[1] += w(6) / (1+log2(1+lead_decay(0.000000) * length(4))); +greece: tf[1] += w[1](6) / length(5) (1.200000); +field=subject content=Greece; +greece: w[1] += w(3) / (1+log2(1+lead_decay(0.000000) * length(0))); +greece: tf[1] += w[1](3) / length(1) (4.200000); +relevance = 0; idf[1] = log(((1 + total(1))/termoccur(1)); -greece: relevance += 100000 * vecf[1](4.200000) * idf[1](0.693147) (291121); +greece: relevance += 100000 * tf[1](4.200000) * idf[1](0.693147) (291121); score = relevance(291121); content: title the religious teachers of greece author adam james medium book diff --git a/test/test_http_5.res b/test/test_http_5.res index 1a2efae..8f6914d 100644 --- a/test/test_http_5.res +++ b/test/test_http_5.res @@ -27,12 +27,15 @@ 2 48160 -computer: mult[1] += local_mult(6) / (1+log2(1+lead_decay(0.000000) * length(4))); -computer: field=title vecf[1] += mult[1](6) / length(5); -computer: mult[1] += local_mult(6) / (1+log2(1+lead_decay(0.000000) * length(4))); -computer: field=title vecf[1] += mult[1](6) / length(5); +field=title content=How to program a computer; +computer: w[1] += w(6) / (1+log2(1+lead_decay(0.000000) * length(4))); +computer: tf[1] += w[1](6) / length(5) (1.200000); +field=title content=How to program a computer; +computer: w[1] += w(6) / (1+log2(1+lead_decay(0.000000) * length(4))); +computer: tf[1] += w[1](6) / length(5) (2.400000); +relevance = 0; idf[1] = log(((1 + total(10))/termoccur(9)); -computer: relevance += 100000 * vecf[1](2.400000) * idf[1](0.200671) (48160); +computer: relevance += 100000 * tf[1](2.400000) * idf[1](0.200671) (48160); score = relevance(48160); content: title how to program a computer author jack collins medium book @@ -55,10 +58,12 @@ score = relevance(48160); 1 40134 -computer: mult[1] += local_mult(6) / (1+log2(1+lead_decay(0.000000) * length(0))); -computer: field=title vecf[1] += mult[1](6) / length(3); +field=title content=Computer science &amp; technology :; +computer: w[1] += w(6) / (1+log2(1+lead_decay(0.000000) * length(0))); +computer: tf[1] += w[1](6) / length(3) (2.000000); +relevance = 0; idf[1] = log(((1 + total(10))/termoccur(9)); -computer: relevance += 100000 * vecf[1](2.000000) * idf[1](0.200671) (40134); +computer: relevance += 100000 * tf[1](2.000000) * idf[1](0.200671) (40134); score = relevance(40134); content: title computer science technology author medium book @@ -84,10 +89,12 @@ score = relevance(40134); 1 40134 -computer: mult[1] += local_mult(6) / (1+log2(1+lead_decay(0.000000) * length(1))); -computer: field=title vecf[1] += mult[1](6) / length(3); +field=title content=The Computer Bible /; +computer: w[1] += w(6) / (1+log2(1+lead_decay(0.000000) * length(1))); +computer: tf[1] += w[1](6) / length(3) (2.000000); +relevance = 0; idf[1] = log(((1 + total(10))/termoccur(9)); -computer: relevance += 100000 * vecf[1](2.000000) * idf[1](0.200671) (40134); +computer: relevance += 100000 * tf[1](2.000000) * idf[1](0.200671) (40134); score = relevance(40134); content: title the computer bible author medium book @@ -112,10 +119,12 @@ score = relevance(40134); 1 17200 -computer: mult[1] += local_mult(6) / (1+log2(1+lead_decay(0.000000) * length(5))); -computer: field=title vecf[1] += mult[1](6) / length(7); +field=title content=A plan for community college computer development.; +computer: w[1] += w(6) / (1+log2(1+lead_decay(0.000000) * length(5))); +computer: tf[1] += w[1](6) / length(7) (0.857143); +relevance = 0; idf[1] = log(((1 + total(10))/termoccur(9)); -computer: relevance += 100000 * vecf[1](0.857143) * idf[1](0.200671) (17200); +computer: relevance += 100000 * tf[1](0.857143) * idf[1](0.200671) (17200); score = relevance(17200); content: title a plan for community college computer development author medium book @@ -142,10 +151,12 @@ score = relevance(17200); 1 17200 -computer: mult[1] += local_mult(6) / (1+log2(1+lead_decay(0.000000) * length(4))); -computer: field=title vecf[1] += mult[1](6) / length(7); +field=title content=Washington metropolitan area rail computer feasib ...; +computer: w[1] += w(6) / (1+log2(1+lead_decay(0.000000) * length(4))); +computer: tf[1] += w[1](6) / length(7) (0.857143); +relevance = 0; idf[1] = log(((1 + total(10))/termoccur(9)); -computer: relevance += 100000 * vecf[1](0.857143) * idf[1](0.200671) (17200); +computer: relevance += 100000 * tf[1](0.857143) * idf[1](0.200671) (17200); score = relevance(17200); content: title washington metropolitan area rail computer feasibility study author englund carl r medium book @@ -175,10 +186,12 @@ score = relevance(17200); 1 16722 -computer: mult[1] += local_mult(5) / (1+log2(1+lead_decay(0.000000) * length(4))); -computer: field=title-remainder vecf[1] += mult[1](5) / length(6); +field=title-remainder content=a portfolio of thematic computer maps /; +computer: w[1] += w(5) / (1+log2(1+lead_decay(0.000000) * length(4))); +computer: tf[1] += w[1](5) / length(6) (0.833333); +relevance = 0; idf[1] = log(((1 + total(10))/termoccur(9)); -computer: relevance += 100000 * vecf[1](0.833333) * idf[1](0.200671) (16722); +computer: relevance += 100000 * tf[1](0.833333) * idf[1](0.200671) (16722); score = relevance(16722); content: title the puget sound region author mairs john w medium book @@ -207,10 +220,12 @@ score = relevance(16722); 1 12040 -computer: mult[1] += local_mult(6) / (1+log2(1+lead_decay(0.000000) * length(0))); -computer: field=title vecf[1] += mult[1](6) / length(10); +field=title content=Computer processing of dynamic images from an Ang ...; +computer: w[1] += w(6) / (1+log2(1+lead_decay(0.000000) * length(0))); +computer: tf[1] += w[1](6) / length(10) (0.600000); +relevance = 0; idf[1] = log(((1 + total(10))/termoccur(9)); -computer: relevance += 100000 * vecf[1](0.600000) * idf[1](0.200671) (12040); +computer: relevance += 100000 * tf[1](0.600000) * idf[1](0.200671) (12040); score = relevance(12040); content: title computer processing of dynamic images from an anger scintillation camera author medium book @@ -233,10 +248,12 @@ score = relevance(12040); 1 12040 -computer: mult[1] += local_mult(6) / (1+log2(1+lead_decay(0.000000) * length(8))); -computer: field=title vecf[1] += mult[1](6) / length(10); +field=title content=The use of passwords for controlled access to com ...; +computer: w[1] += w(6) / (1+log2(1+lead_decay(0.000000) * length(8))); +computer: tf[1] += w[1](6) / length(10) (0.600000); +relevance = 0; idf[1] = log(((1 + total(10))/termoccur(9)); -computer: relevance += 100000 * vecf[1](0.600000) * idf[1](0.200671) (12040); +computer: relevance += 100000 * tf[1](0.600000) * idf[1](0.200671) (12040); score = relevance(12040); content: title the use of passwords for controlled access to computer resources author wood helen m medium book @@ -261,8 +278,9 @@ score = relevance(12040); 1 0 +relevance = 0; idf[1] = log(((1 + total(10))/termoccur(9)); -computer: relevance += 100000 * vecf[1](0.000000) * idf[1](0.200671) (0); +computer: relevance += 100000 * tf[1](0.000000) * idf[1](0.200671) (0); score = relevance(0); content: title reconstruction tomography in diagnostic radiology and nuclear medicine author medium book diff --git a/test/test_http_50.res b/test/test_http_50.res index 3ae7d3e..01510ca 100644 --- a/test/test_http_50.res +++ b/test/test_http_50.res @@ -29,8 +29,9 @@ 1 0 +relevance = 0; idf[1] = log(((1 + total(1))/termoccur(0)); -louis: relevance += 100000 * vecf[1](0.000000) * idf[1](0.000000) (0); +louis: relevance += 100000 * tf[1](0.000000) * idf[1](0.000000) (0); score = relevance(0); content: title computer processing of dynamic images from an anger scintillation camera author medium book diff --git a/test/test_http_60.res b/test/test_http_60.res index 643ff4f..dc0483f 100644 --- a/test/test_http_60.res +++ b/test/test_http_60.res @@ -30,12 +30,15 @@ 1 291121 -greece: mult[1] += local_mult(6) / (1+log2(1+lead_decay(0.000000) * length(4))); -greece: field=title vecf[1] += mult[1](6) / length(5); -greece: mult[1] += local_mult(3) / (1+log2(1+lead_decay(0.000000) * length(0))); -greece: field=subject vecf[1] += mult[1](3) / length(1); +field=title content=The religious teachers of Greece.; +greece: w[1] += w(6) / (1+log2(1+lead_decay(0.000000) * length(4))); +greece: tf[1] += w[1](6) / length(5) (1.200000); +field=subject content=Greece; +greece: w[1] += w(3) / (1+log2(1+lead_decay(0.000000) * length(0))); +greece: tf[1] += w[1](3) / length(1) (4.200000); +relevance = 0; idf[1] = log(((1 + total(1))/termoccur(1)); -greece: relevance += 100000 * vecf[1](4.200000) * idf[1](0.693147) (291121); +greece: relevance += 100000 * tf[1](4.200000) * idf[1](0.693147) (291121); score = relevance(291121); content: title the religious teachers of greece author adam james medium book diff --git a/test/test_http_63.res b/test/test_http_63.res index 643ff4f..dc0483f 100644 --- a/test/test_http_63.res +++ b/test/test_http_63.res @@ -30,12 +30,15 @@ 1 291121 -greece: mult[1] += local_mult(6) / (1+log2(1+lead_decay(0.000000) * length(4))); -greece: field=title vecf[1] += mult[1](6) / length(5); -greece: mult[1] += local_mult(3) / (1+log2(1+lead_decay(0.000000) * length(0))); -greece: field=subject vecf[1] += mult[1](3) / length(1); +field=title content=The religious teachers of Greece.; +greece: w[1] += w(6) / (1+log2(1+lead_decay(0.000000) * length(4))); +greece: tf[1] += w[1](6) / length(5) (1.200000); +field=subject content=Greece; +greece: w[1] += w(3) / (1+log2(1+lead_decay(0.000000) * length(0))); +greece: tf[1] += w[1](3) / length(1) (4.200000); +relevance = 0; idf[1] = log(((1 + total(1))/termoccur(1)); -greece: relevance += 100000 * vecf[1](4.200000) * idf[1](0.693147) (291121); +greece: relevance += 100000 * tf[1](4.200000) * idf[1](0.693147) (291121); score = relevance(291121); content: title the religious teachers of greece author adam james medium book diff --git a/test/test_http_66.res b/test/test_http_66.res index 643ff4f..dc0483f 100644 --- a/test/test_http_66.res +++ b/test/test_http_66.res @@ -30,12 +30,15 @@ 1 291121 -greece: mult[1] += local_mult(6) / (1+log2(1+lead_decay(0.000000) * length(4))); -greece: field=title vecf[1] += mult[1](6) / length(5); -greece: mult[1] += local_mult(3) / (1+log2(1+lead_decay(0.000000) * length(0))); -greece: field=subject vecf[1] += mult[1](3) / length(1); +field=title content=The religious teachers of Greece.; +greece: w[1] += w(6) / (1+log2(1+lead_decay(0.000000) * length(4))); +greece: tf[1] += w[1](6) / length(5) (1.200000); +field=subject content=Greece; +greece: w[1] += w(3) / (1+log2(1+lead_decay(0.000000) * length(0))); +greece: tf[1] += w[1](3) / length(1) (4.200000); +relevance = 0; idf[1] = log(((1 + total(1))/termoccur(1)); -greece: relevance += 100000 * vecf[1](4.200000) * idf[1](0.693147) (291121); +greece: relevance += 100000 * tf[1](4.200000) * idf[1](0.693147) (291121); score = relevance(291121); content: title the religious teachers of greece author adam james medium book diff --git a/test/test_http_72.res b/test/test_http_72.res index 643ff4f..dc0483f 100644 --- a/test/test_http_72.res +++ b/test/test_http_72.res @@ -30,12 +30,15 @@ 1 291121 -greece: mult[1] += local_mult(6) / (1+log2(1+lead_decay(0.000000) * length(4))); -greece: field=title vecf[1] += mult[1](6) / length(5); -greece: mult[1] += local_mult(3) / (1+log2(1+lead_decay(0.000000) * length(0))); -greece: field=subject vecf[1] += mult[1](3) / length(1); +field=title content=The religious teachers of Greece.; +greece: w[1] += w(6) / (1+log2(1+lead_decay(0.000000) * length(4))); +greece: tf[1] += w[1](6) / length(5) (1.200000); +field=subject content=Greece; +greece: w[1] += w(3) / (1+log2(1+lead_decay(0.000000) * length(0))); +greece: tf[1] += w[1](3) / length(1) (4.200000); +relevance = 0; idf[1] = log(((1 + total(1))/termoccur(1)); -greece: relevance += 100000 * vecf[1](4.200000) * idf[1](0.693147) (291121); +greece: relevance += 100000 * tf[1](4.200000) * idf[1](0.693147) (291121); score = relevance(291121); content: title the religious teachers of greece author adam james medium book diff --git a/test/test_http_74.res b/test/test_http_74.res index e9c9b77..3a19ca9 100644 --- a/test/test_http_74.res +++ b/test/test_http_74.res @@ -27,10 +27,12 @@ 1 59412 -computer: mult[1] += local_mult(6) / (1+log2(1+lead_decay(0.000000) * length(4))); -computer: field=title vecf[1] += mult[1](6) / length(7); +field=title content=Washington metropolitan area rail computer feasib ...; +computer: w[1] += w(6) / (1+log2(1+lead_decay(0.000000) * length(4))); +computer: tf[1] += w[1](6) / length(7) (0.857143); +relevance = 0; idf[1] = log(((1 + total(1))/termoccur(1)); -computer: relevance += 100000 * vecf[1](0.857143) * idf[1](0.693147) (59412); +computer: relevance += 100000 * tf[1](0.857143) * idf[1](0.693147) (59412); score = relevance(59412); content: title washington metropolitan area rail computer feasibility study author englund carl r medium book diff --git a/test/test_http_76.res b/test/test_http_76.res index d626a78..f539920 100644 --- a/test/test_http_76.res +++ b/test/test_http_76.res @@ -23,10 +23,12 @@ 1 102165 -computer: mult[1] += local_mult(6) / (1+log2(1+lead_decay(0.000000) * length(0))); -computer: field=title vecf[1] += mult[1](6) / length(3); +field=title content=Computer science &amp; technology :; +computer: w[1] += w(6) / (1+log2(1+lead_decay(0.000000) * length(0))); +computer: tf[1] += w[1](6) / length(3) (2.000000); +relevance = 0; idf[1] = log(((1 + total(4))/termoccur(3)); -computer: relevance += 100000 * vecf[1](2.000000) * idf[1](0.510826) (102165); +computer: relevance += 100000 * tf[1](2.000000) * idf[1](0.510826) (102165); score = relevance(102165); content: title computer science technology author medium book @@ -52,10 +54,12 @@ score = relevance(102165); 1 102165 -computer: mult[1] += local_mult(6) / (1+log2(1+lead_decay(0.000000) * length(1))); -computer: field=title vecf[1] += mult[1](6) / length(3); +field=title content=The Computer Bible /; +computer: w[1] += w(6) / (1+log2(1+lead_decay(0.000000) * length(1))); +computer: tf[1] += w[1](6) / length(3) (2.000000); +relevance = 0; idf[1] = log(((1 + total(4))/termoccur(3)); -computer: relevance += 100000 * vecf[1](2.000000) * idf[1](0.510826) (102165); +computer: relevance += 100000 * tf[1](2.000000) * idf[1](0.510826) (102165); score = relevance(102165); content: title the computer bible author medium book @@ -78,10 +82,12 @@ score = relevance(102165); 1 30649 -computer: mult[1] += local_mult(6) / (1+log2(1+lead_decay(0.000000) * length(8))); -computer: field=title vecf[1] += mult[1](6) / length(10); +field=title content=The use of passwords for controlled access to com ...; +computer: w[1] += w(6) / (1+log2(1+lead_decay(0.000000) * length(8))); +computer: tf[1] += w[1](6) / length(10) (0.600000); +relevance = 0; idf[1] = log(((1 + total(4))/termoccur(3)); -computer: relevance += 100000 * vecf[1](0.600000) * idf[1](0.510826) (30649); +computer: relevance += 100000 * tf[1](0.600000) * idf[1](0.510826) (30649); score = relevance(30649); content: title the use of passwords for controlled access to computer resources author wood helen m medium book @@ -106,8 +112,9 @@ score = relevance(30649); 1 0 +relevance = 0; idf[1] = log(((1 + total(4))/termoccur(3)); -computer: relevance += 100000 * vecf[1](0.000000) * idf[1](0.510826) (0); +computer: relevance += 100000 * tf[1](0.000000) * idf[1](0.510826) (0); score = relevance(0); content: title reconstruction tomography in diagnostic radiology and nuclear medicine author medium book diff --git a/test/test_http_79.res b/test/test_http_79.res index 71e6f99..88da8f0 100644 --- a/test/test_http_79.res +++ b/test/test_http_79.res @@ -30,10 +30,12 @@ 1 60819 -adam: mult[1] += local_mult(3) / (1+log2(1+lead_decay(0.000000) * length(0))); -adam: field=author vecf[1] += mult[1](3) / length(2); +field=author content=Adam, James,; +adam: w[1] += w(3) / (1+log2(1+lead_decay(0.000000) * length(0))); +adam: tf[1] += w[1](3) / length(2) (1.500000); +relevance = 0; idf[1] = log(((1 + total(2))/termoccur(2)); -adam: relevance += 100000 * vecf[1](1.500000) * idf[1](0.405465) (60819); +adam: relevance += 100000 * tf[1](1.500000) * idf[1](0.405465) (60819); score = relevance(60819); content: title the religious teachers of greece author adam james medium book @@ -61,10 +63,12 @@ score = relevance(60819); 1 40546 -adam: mult[1] += local_mult(3) / (1+log2(1+lead_decay(0.000000) * length(2))); -adam: field=author vecf[1] += mult[1](3) / length(3); +field=author content=Smith, George Adam,; +adam: w[1] += w(3) / (1+log2(1+lead_decay(0.000000) * length(2))); +adam: tf[1] += w[1](3) / length(3) (1.000000); +relevance = 0; idf[1] = log(((1 + total(2))/termoccur(2)); -adam: relevance += 100000 * vecf[1](1.000000) * idf[1](0.405465) (40546); +adam: relevance += 100000 * tf[1](1.000000) * idf[1](0.405465) (40546); score = relevance(40546); content: title four psalms author smith george adam medium book diff --git a/test/test_http_81.res b/test/test_http_81.res index e17bbdf..e05cf1e 100644 --- a/test/test_http_81.res +++ b/test/test_http_81.res @@ -30,17 +30,20 @@ 1 374298 -teachers: mult[1] += local_mult(6) / (1+log2(1+lead_decay(0.000000) * length(2))); -greece: mult[2] += local_mult(6) / (1+log2(1+lead_decay(0.000000) * length(4))); -greece: mult[2] += mult[2](6) * follow(0.000000) / (1+log2(d(2)); -teachers: field=title vecf[1] += mult[1](6) / length(5); -greece: field=title vecf[2] += mult[2](6) / length(5); -greece: mult[2] += local_mult(3) / (1+log2(1+lead_decay(0.000000) * length(0))); -greece: field=subject vecf[2] += mult[2](3) / length(1); +field=title content=The religious teachers of Greece.; +teachers: w[1] += w(6) / (1+log2(1+lead_decay(0.000000) * length(2))); +greece: w[2] += w(6) / (1+log2(1+lead_decay(0.000000) * length(4))); +greece: w[2] += w[2](6) * follow(0.000000) / (1+log2(d(2)); +teachers: tf[1] += w[1](6) / length(5) (1.200000); +greece: tf[2] += w[2](6) / length(5) (1.200000); +field=subject content=Greece; +greece: w[2] += w(3) / (1+log2(1+lead_decay(0.000000) * length(0))); +greece: tf[2] += w[2](3) / length(1) (4.200000); +relevance = 0; idf[1] = log(((1 + total(1))/termoccur(1)); -teachers: relevance += 100000 * vecf[1](1.200000) * idf[1](0.693147) (83177); +teachers: relevance += 100000 * tf[1](1.200000) * idf[1](0.693147) (83177); idf[2] = log(((1 + total(1))/termoccur(1)); -greece: relevance += 100000 * vecf[2](4.200000) * idf[2](0.693147) (291121); +greece: relevance += 100000 * tf[2](4.200000) * idf[2](0.693147) (291121); score = relevance(374298); content: title the religious teachers of greece author adam james medium book diff --git a/test/test_icu_9.res b/test/test_icu_9.res index af0f1ef..39396ac 100644 --- a/test/test_icu_9.res +++ b/test/test_icu_9.res @@ -21,12 +21,15 @@ 1 72241 -computer: mult[1] += local_mult(6) / (1+log2(1+lead_decay(0.000000) * length(8))); -computer: field=title vecf[1] += mult[1](6) / length(10); -computer: mult[1] += local_mult(3) / (1+log2(1+lead_decay(0.000000) * length(0))); -computer: field=subject vecf[1] += mult[1](3) / length(1); +field=title content=The use of passwords for controlled access to com ...; +computer: w[1] += w(6) / (1+log2(1+lead_decay(0.000000) * length(8))); +computer: tf[1] += w[1](6) / length(10) (0.600000); +field=subject content=Computers; +computer: w[1] += w(3) / (1+log2(1+lead_decay(0.000000) * length(0))); +computer: tf[1] += w[1](3) / length(1) (3.600000); +relevance = 0; idf[1] = log(((1 + total(10))/termoccur(9)); -computer: relevance += 100000 * vecf[1](3.600000) * idf[1](0.200671) (72241); +computer: relevance += 100000 * tf[1](3.600000) * idf[1](0.200671) (72241); score = relevance(72241); content: title the use of passwords for controlled access to computer resources author wood helen m medium book @@ -53,12 +56,15 @@ score = relevance(72241); 2 48160 -computer: mult[1] += local_mult(6) / (1+log2(1+lead_decay(0.000000) * length(4))); -computer: field=title vecf[1] += mult[1](6) / length(5); -computer: mult[1] += local_mult(6) / (1+log2(1+lead_decay(0.000000) * length(4))); -computer: field=title vecf[1] += mult[1](6) / length(5); +field=title content=How to program a computer; +computer: w[1] += w(6) / (1+log2(1+lead_decay(0.000000) * length(4))); +computer: tf[1] += w[1](6) / length(5) (1.200000); +field=title content=How to program a computer; +computer: w[1] += w(6) / (1+log2(1+lead_decay(0.000000) * length(4))); +computer: tf[1] += w[1](6) / length(5) (2.400000); +relevance = 0; idf[1] = log(((1 + total(10))/termoccur(9)); -computer: relevance += 100000 * vecf[1](2.400000) * idf[1](0.200671) (48160); +computer: relevance += 100000 * tf[1](2.400000) * idf[1](0.200671) (48160); score = relevance(48160); content: title how to program a computer author jack collins medium book @@ -80,10 +86,12 @@ score = relevance(48160); 1 40134 -computer: mult[1] += local_mult(6) / (1+log2(1+lead_decay(0.000000) * length(1))); -computer: field=title vecf[1] += mult[1](6) / length(3); +field=title content=The Computer Bible /; +computer: w[1] += w(6) / (1+log2(1+lead_decay(0.000000) * length(1))); +computer: tf[1] += w[1](6) / length(3) (2.000000); +relevance = 0; idf[1] = log(((1 + total(10))/termoccur(9)); -computer: relevance += 100000 * vecf[1](2.000000) * idf[1](0.200671) (40134); +computer: relevance += 100000 * tf[1](2.000000) * idf[1](0.200671) (40134); score = relevance(40134); content: title the computer bible author medium book @@ -104,10 +112,12 @@ score = relevance(40134); 1 30100 -computer: mult[1] += local_mult(6) / (1+log2(1+lead_decay(0.000000) * length(0))); -computer: field=title vecf[1] += mult[1](6) / length(4); +field=title content=Computer science &amp; technology :; +computer: w[1] += w(6) / (1+log2(1+lead_decay(0.000000) * length(0))); +computer: tf[1] += w[1](6) / length(4) (1.500000); +relevance = 0; idf[1] = log(((1 + total(10))/termoccur(9)); -computer: relevance += 100000 * vecf[1](1.500000) * idf[1](0.200671) (30100); +computer: relevance += 100000 * tf[1](1.500000) * idf[1](0.200671) (30100); score = relevance(30100); content: title computer science technology author medium book @@ -128,10 +138,12 @@ score = relevance(30100); 1 17200 -computer: mult[1] += local_mult(6) / (1+log2(1+lead_decay(0.000000) * length(5))); -computer: field=title vecf[1] += mult[1](6) / length(7); +field=title content=A plan for community college computer development.; +computer: w[1] += w(6) / (1+log2(1+lead_decay(0.000000) * length(5))); +computer: tf[1] += w[1](6) / length(7) (0.857143); +relevance = 0; idf[1] = log(((1 + total(10))/termoccur(9)); -computer: relevance += 100000 * vecf[1](0.857143) * idf[1](0.200671) (17200); +computer: relevance += 100000 * tf[1](0.857143) * idf[1](0.200671) (17200); score = relevance(17200); content: title a plan for community college computer development author medium book @@ -156,10 +168,12 @@ score = relevance(17200); 1 17200 -computer: mult[1] += local_mult(6) / (1+log2(1+lead_decay(0.000000) * length(4))); -computer: field=title vecf[1] += mult[1](6) / length(7); +field=title content=Washington metropolitan area rail computer feasib ...; +computer: w[1] += w(6) / (1+log2(1+lead_decay(0.000000) * length(4))); +computer: tf[1] += w[1](6) / length(7) (0.857143); +relevance = 0; idf[1] = log(((1 + total(10))/termoccur(9)); -computer: relevance += 100000 * vecf[1](0.857143) * idf[1](0.200671) (17200); +computer: relevance += 100000 * tf[1](0.857143) * idf[1](0.200671) (17200); score = relevance(17200); content: title washington metropolitan area rail computer feasibility study author englund carl r medium book @@ -185,10 +199,12 @@ score = relevance(17200); 1 16722 -computer: mult[1] += local_mult(5) / (1+log2(1+lead_decay(0.000000) * length(4))); -computer: field=title-remainder vecf[1] += mult[1](5) / length(6); +field=title-remainder content=a portfolio of thematic computer maps /; +computer: w[1] += w(5) / (1+log2(1+lead_decay(0.000000) * length(4))); +computer: tf[1] += w[1](5) / length(6) (0.833333); +relevance = 0; idf[1] = log(((1 + total(10))/termoccur(9)); -computer: relevance += 100000 * vecf[1](0.833333) * idf[1](0.200671) (16722); +computer: relevance += 100000 * tf[1](0.833333) * idf[1](0.200671) (16722); score = relevance(16722); content: title the puget sound region author mairs john w medium book @@ -211,10 +227,12 @@ score = relevance(16722); 1 12040 -computer: mult[1] += local_mult(6) / (1+log2(1+lead_decay(0.000000) * length(0))); -computer: field=title vecf[1] += mult[1](6) / length(10); +field=title content=Computer processing of dynamic images from an Ang ...; +computer: w[1] += w(6) / (1+log2(1+lead_decay(0.000000) * length(0))); +computer: tf[1] += w[1](6) / length(10) (0.600000); +relevance = 0; idf[1] = log(((1 + total(10))/termoccur(9)); -computer: relevance += 100000 * vecf[1](0.600000) * idf[1](0.200671) (12040); +computer: relevance += 100000 * tf[1](0.600000) * idf[1](0.200671) (12040); score = relevance(12040); content: title computer processing of dynamic images from an anger scintillation camera author medium book @@ -237,8 +255,9 @@ score = relevance(12040); 1 0 +relevance = 0; idf[1] = log(((1 + total(10))/termoccur(9)); -computer: relevance += 100000 * vecf[1](0.000000) * idf[1](0.200671) (0); +computer: relevance += 100000 * tf[1](0.000000) * idf[1](0.200671) (0); score = relevance(0); content: title reconstruction tomography in diagnostic radiology and nuclear medicine author medium book diff --git a/test/test_post_10.res b/test/test_post_10.res index 27fcc5c..cb1e60a 100644 --- a/test/test_post_10.res +++ b/test/test_post_10.res @@ -21,12 +21,15 @@ 2 48160 -computer: mult[1] += local_mult(6) / (1+log2(1+lead_decay(0.000000) * length(4))); -computer: field=title vecf[1] += mult[1](6) / length(5); -computer: mult[1] += local_mult(6) / (1+log2(1+lead_decay(0.000000) * length(4))); -computer: field=title vecf[1] += mult[1](6) / length(5); +field=title content=How to program a computer; +computer: w[1] += w(6) / (1+log2(1+lead_decay(0.000000) * length(4))); +computer: tf[1] += w[1](6) / length(5) (1.200000); +field=title content=How to program a computer; +computer: w[1] += w(6) / (1+log2(1+lead_decay(0.000000) * length(4))); +computer: tf[1] += w[1](6) / length(5) (2.400000); +relevance = 0; idf[1] = log(((1 + total(10))/termoccur(9)); -computer: relevance += 100000 * vecf[1](2.400000) * idf[1](0.200671) (48160); +computer: relevance += 100000 * tf[1](2.400000) * idf[1](0.200671) (48160); score = relevance(48160); content: title how to program a computer author jack collins medium book @@ -44,10 +47,12 @@ score = relevance(48160); 1 40134 -computer: mult[1] += local_mult(6) / (1+log2(1+lead_decay(0.000000) * length(0))); -computer: field=title vecf[1] += mult[1](6) / length(3); +field=title content=Computer science &amp; technology :; +computer: w[1] += w(6) / (1+log2(1+lead_decay(0.000000) * length(0))); +computer: tf[1] += w[1](6) / length(3) (2.000000); +relevance = 0; idf[1] = log(((1 + total(10))/termoccur(9)); -computer: relevance += 100000 * vecf[1](2.000000) * idf[1](0.200671) (40134); +computer: relevance += 100000 * tf[1](2.000000) * idf[1](0.200671) (40134); score = relevance(40134); content: title computer science technology author medium book @@ -63,10 +68,12 @@ score = relevance(40134); 1 40134 -computer: mult[1] += local_mult(6) / (1+log2(1+lead_decay(0.000000) * length(1))); -computer: field=title vecf[1] += mult[1](6) / length(3); +field=title content=The Computer Bible /; +computer: w[1] += w(6) / (1+log2(1+lead_decay(0.000000) * length(1))); +computer: tf[1] += w[1](6) / length(3) (2.000000); +relevance = 0; idf[1] = log(((1 + total(10))/termoccur(9)); -computer: relevance += 100000 * vecf[1](2.000000) * idf[1](0.200671) (40134); +computer: relevance += 100000 * tf[1](2.000000) * idf[1](0.200671) (40134); score = relevance(40134); content: title the computer bible author medium book @@ -82,10 +89,12 @@ score = relevance(40134); 1 17200 -computer: mult[1] += local_mult(6) / (1+log2(1+lead_decay(0.000000) * length(5))); -computer: field=title vecf[1] += mult[1](6) / length(7); +field=title content=A plan for community college computer development.; +computer: w[1] += w(6) / (1+log2(1+lead_decay(0.000000) * length(5))); +computer: tf[1] += w[1](6) / length(7) (0.857143); +relevance = 0; idf[1] = log(((1 + total(10))/termoccur(9)); -computer: relevance += 100000 * vecf[1](0.857143) * idf[1](0.200671) (17200); +computer: relevance += 100000 * tf[1](0.857143) * idf[1](0.200671) (17200); score = relevance(17200); content: title a plan for community college computer development author medium book @@ -105,10 +114,12 @@ score = relevance(17200); 1 17200 -computer: mult[1] += local_mult(6) / (1+log2(1+lead_decay(0.000000) * length(4))); -computer: field=title vecf[1] += mult[1](6) / length(7); +field=title content=Washington metropolitan area rail computer feasib ...; +computer: w[1] += w(6) / (1+log2(1+lead_decay(0.000000) * length(4))); +computer: tf[1] += w[1](6) / length(7) (0.857143); +relevance = 0; idf[1] = log(((1 + total(10))/termoccur(9)); -computer: relevance += 100000 * vecf[1](0.857143) * idf[1](0.200671) (17200); +computer: relevance += 100000 * tf[1](0.857143) * idf[1](0.200671) (17200); score = relevance(17200); content: title washington metropolitan area rail computer feasibility study author englund carl r medium book @@ -128,10 +139,12 @@ score = relevance(17200); 1 16722 -computer: mult[1] += local_mult(5) / (1+log2(1+lead_decay(0.000000) * length(4))); -computer: field=title-remainder vecf[1] += mult[1](5) / length(6); +field=title-remainder content=a portfolio of thematic computer maps /; +computer: w[1] += w(5) / (1+log2(1+lead_decay(0.000000) * length(4))); +computer: tf[1] += w[1](5) / length(6) (0.833333); +relevance = 0; idf[1] = log(((1 + total(10))/termoccur(9)); -computer: relevance += 100000 * vecf[1](0.833333) * idf[1](0.200671) (16722); +computer: relevance += 100000 * tf[1](0.833333) * idf[1](0.200671) (16722); score = relevance(16722); content: title the puget sound region author mairs john w medium book @@ -149,10 +162,12 @@ score = relevance(16722); 1 12040 -computer: mult[1] += local_mult(6) / (1+log2(1+lead_decay(0.000000) * length(0))); -computer: field=title vecf[1] += mult[1](6) / length(10); +field=title content=Computer processing of dynamic images from an Ang ...; +computer: w[1] += w(6) / (1+log2(1+lead_decay(0.000000) * length(0))); +computer: tf[1] += w[1](6) / length(10) (0.600000); +relevance = 0; idf[1] = log(((1 + total(10))/termoccur(9)); -computer: relevance += 100000 * vecf[1](0.600000) * idf[1](0.200671) (12040); +computer: relevance += 100000 * tf[1](0.600000) * idf[1](0.200671) (12040); score = relevance(12040); content: title computer processing of dynamic images from an anger scintillation camera author medium book @@ -170,10 +185,12 @@ score = relevance(12040); 1 12040 -computer: mult[1] += local_mult(6) / (1+log2(1+lead_decay(0.000000) * length(8))); -computer: field=title vecf[1] += mult[1](6) / length(10); +field=title content=The use of passwords for controlled access to com ...; +computer: w[1] += w(6) / (1+log2(1+lead_decay(0.000000) * length(8))); +computer: tf[1] += w[1](6) / length(10) (0.600000); +relevance = 0; idf[1] = log(((1 + total(10))/termoccur(9)); -computer: relevance += 100000 * vecf[1](0.600000) * idf[1](0.200671) (12040); +computer: relevance += 100000 * tf[1](0.600000) * idf[1](0.200671) (12040); score = relevance(12040); content: title the use of passwords for controlled access to computer resources author wood helen m medium book @@ -191,8 +208,9 @@ score = relevance(12040); 1 0 +relevance = 0; idf[1] = log(((1 + total(10))/termoccur(9)); -computer: relevance += 100000 * vecf[1](0.000000) * idf[1](0.200671) (0); +computer: relevance += 100000 * tf[1](0.000000) * idf[1](0.200671) (0); score = relevance(0); content: title reconstruction tomography in diagnostic radiology and nuclear medicine author medium book diff --git a/test/test_post_8.res b/test/test_post_8.res index 27fcc5c..cb1e60a 100644 --- a/test/test_post_8.res +++ b/test/test_post_8.res @@ -21,12 +21,15 @@ 2 48160 -computer: mult[1] += local_mult(6) / (1+log2(1+lead_decay(0.000000) * length(4))); -computer: field=title vecf[1] += mult[1](6) / length(5); -computer: mult[1] += local_mult(6) / (1+log2(1+lead_decay(0.000000) * length(4))); -computer: field=title vecf[1] += mult[1](6) / length(5); +field=title content=How to program a computer; +computer: w[1] += w(6) / (1+log2(1+lead_decay(0.000000) * length(4))); +computer: tf[1] += w[1](6) / length(5) (1.200000); +field=title content=How to program a computer; +computer: w[1] += w(6) / (1+log2(1+lead_decay(0.000000) * length(4))); +computer: tf[1] += w[1](6) / length(5) (2.400000); +relevance = 0; idf[1] = log(((1 + total(10))/termoccur(9)); -computer: relevance += 100000 * vecf[1](2.400000) * idf[1](0.200671) (48160); +computer: relevance += 100000 * tf[1](2.400000) * idf[1](0.200671) (48160); score = relevance(48160); content: title how to program a computer author jack collins medium book @@ -44,10 +47,12 @@ score = relevance(48160); 1 40134 -computer: mult[1] += local_mult(6) / (1+log2(1+lead_decay(0.000000) * length(0))); -computer: field=title vecf[1] += mult[1](6) / length(3); +field=title content=Computer science &amp; technology :; +computer: w[1] += w(6) / (1+log2(1+lead_decay(0.000000) * length(0))); +computer: tf[1] += w[1](6) / length(3) (2.000000); +relevance = 0; idf[1] = log(((1 + total(10))/termoccur(9)); -computer: relevance += 100000 * vecf[1](2.000000) * idf[1](0.200671) (40134); +computer: relevance += 100000 * tf[1](2.000000) * idf[1](0.200671) (40134); score = relevance(40134); content: title computer science technology author medium book @@ -63,10 +68,12 @@ score = relevance(40134); 1 40134 -computer: mult[1] += local_mult(6) / (1+log2(1+lead_decay(0.000000) * length(1))); -computer: field=title vecf[1] += mult[1](6) / length(3); +field=title content=The Computer Bible /; +computer: w[1] += w(6) / (1+log2(1+lead_decay(0.000000) * length(1))); +computer: tf[1] += w[1](6) / length(3) (2.000000); +relevance = 0; idf[1] = log(((1 + total(10))/termoccur(9)); -computer: relevance += 100000 * vecf[1](2.000000) * idf[1](0.200671) (40134); +computer: relevance += 100000 * tf[1](2.000000) * idf[1](0.200671) (40134); score = relevance(40134); content: title the computer bible author medium book @@ -82,10 +89,12 @@ score = relevance(40134); 1 17200 -computer: mult[1] += local_mult(6) / (1+log2(1+lead_decay(0.000000) * length(5))); -computer: field=title vecf[1] += mult[1](6) / length(7); +field=title content=A plan for community college computer development.; +computer: w[1] += w(6) / (1+log2(1+lead_decay(0.000000) * length(5))); +computer: tf[1] += w[1](6) / length(7) (0.857143); +relevance = 0; idf[1] = log(((1 + total(10))/termoccur(9)); -computer: relevance += 100000 * vecf[1](0.857143) * idf[1](0.200671) (17200); +computer: relevance += 100000 * tf[1](0.857143) * idf[1](0.200671) (17200); score = relevance(17200); content: title a plan for community college computer development author medium book @@ -105,10 +114,12 @@ score = relevance(17200); 1 17200 -computer: mult[1] += local_mult(6) / (1+log2(1+lead_decay(0.000000) * length(4))); -computer: field=title vecf[1] += mult[1](6) / length(7); +field=title content=Washington metropolitan area rail computer feasib ...; +computer: w[1] += w(6) / (1+log2(1+lead_decay(0.000000) * length(4))); +computer: tf[1] += w[1](6) / length(7) (0.857143); +relevance = 0; idf[1] = log(((1 + total(10))/termoccur(9)); -computer: relevance += 100000 * vecf[1](0.857143) * idf[1](0.200671) (17200); +computer: relevance += 100000 * tf[1](0.857143) * idf[1](0.200671) (17200); score = relevance(17200); content: title washington metropolitan area rail computer feasibility study author englund carl r medium book @@ -128,10 +139,12 @@ score = relevance(17200); 1 16722 -computer: mult[1] += local_mult(5) / (1+log2(1+lead_decay(0.000000) * length(4))); -computer: field=title-remainder vecf[1] += mult[1](5) / length(6); +field=title-remainder content=a portfolio of thematic computer maps /; +computer: w[1] += w(5) / (1+log2(1+lead_decay(0.000000) * length(4))); +computer: tf[1] += w[1](5) / length(6) (0.833333); +relevance = 0; idf[1] = log(((1 + total(10))/termoccur(9)); -computer: relevance += 100000 * vecf[1](0.833333) * idf[1](0.200671) (16722); +computer: relevance += 100000 * tf[1](0.833333) * idf[1](0.200671) (16722); score = relevance(16722); content: title the puget sound region author mairs john w medium book @@ -149,10 +162,12 @@ score = relevance(16722); 1 12040 -computer: mult[1] += local_mult(6) / (1+log2(1+lead_decay(0.000000) * length(0))); -computer: field=title vecf[1] += mult[1](6) / length(10); +field=title content=Computer processing of dynamic images from an Ang ...; +computer: w[1] += w(6) / (1+log2(1+lead_decay(0.000000) * length(0))); +computer: tf[1] += w[1](6) / length(10) (0.600000); +relevance = 0; idf[1] = log(((1 + total(10))/termoccur(9)); -computer: relevance += 100000 * vecf[1](0.600000) * idf[1](0.200671) (12040); +computer: relevance += 100000 * tf[1](0.600000) * idf[1](0.200671) (12040); score = relevance(12040); content: title computer processing of dynamic images from an anger scintillation camera author medium book @@ -170,10 +185,12 @@ score = relevance(12040); 1 12040 -computer: mult[1] += local_mult(6) / (1+log2(1+lead_decay(0.000000) * length(8))); -computer: field=title vecf[1] += mult[1](6) / length(10); +field=title content=The use of passwords for controlled access to com ...; +computer: w[1] += w(6) / (1+log2(1+lead_decay(0.000000) * length(8))); +computer: tf[1] += w[1](6) / length(10) (0.600000); +relevance = 0; idf[1] = log(((1 + total(10))/termoccur(9)); -computer: relevance += 100000 * vecf[1](0.600000) * idf[1](0.200671) (12040); +computer: relevance += 100000 * tf[1](0.600000) * idf[1](0.200671) (12040); score = relevance(12040); content: title the use of passwords for controlled access to computer resources author wood helen m medium book @@ -191,8 +208,9 @@ score = relevance(12040); 1 0 +relevance = 0; idf[1] = log(((1 + total(10))/termoccur(9)); -computer: relevance += 100000 * vecf[1](0.000000) * idf[1](0.200671) (0); +computer: relevance += 100000 * tf[1](0.000000) * idf[1](0.200671) (0); score = relevance(0); content: title reconstruction tomography in diagnostic radiology and nuclear medicine author medium book diff --git a/test/test_post_9.res b/test/test_post_9.res index 5eeb215..a65abd9 100644 --- a/test/test_post_9.res +++ b/test/test_post_9.res @@ -14,8 +14,9 @@ 1 0 +relevance = 0; idf[1] = log(((1 + total(3))/termoccur(0)); -computer: relevance += 100000 * vecf[1](0.000000) * idf[1](0.000000) (0); +computer: relevance += 100000 * tf[1](0.000000) * idf[1](0.000000) (0); score = relevance(0); content: title bibliography of maine geology author medium book @@ -29,8 +30,9 @@ score = relevance(0); 1 0 +relevance = 0; idf[1] = log(((1 + total(3))/termoccur(0)); -computer: relevance += 100000 * vecf[1](0.000000) * idf[1](0.000000) (0); +computer: relevance += 100000 * tf[1](0.000000) * idf[1](0.000000) (0); score = relevance(0); content: title groundwater resource maps county series author medium book @@ -44,8 +46,9 @@ score = relevance(0); 1 0 +relevance = 0; idf[1] = log(((1 + total(3))/termoccur(0)); -computer: relevance += 100000 * vecf[1](0.000000) * idf[1](0.000000) (0); +computer: relevance += 100000 * tf[1](0.000000) * idf[1](0.000000) (0); score = relevance(0); content: title oil gas drilling author medium book