isomorfeus-ferret 0.12.5 → 0.12.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/isomorfeus_ferret_ext/frt_q_phrase.c +6 -9
- data/lib/isomorfeus/ferret/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6fced309c17056d92c0613d5c7cb6ad3c67b894abb4be9b51265c29e19774ef5
|
4
|
+
data.tar.gz: cea4228781c82c24dfc4c1e65f308819cca0c5528078496f1859f0ea89cf0a70
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '09d9e4ff1377d72fabd563580b313a0faa09da26bd5acfd16463cc2cedb07599d41888908b16fd03fec7e4558c0c1faa5caa4567c42e4a816878f6bc853be92f'
|
7
|
+
data.tar.gz: 0e84afbe9a46912dc56d66c9af9d8c9893cb55867f913a2e19ff98f2ba36989302eb3243c8fb79245a3f0a793ae39ed4fc4cc46531dfa7bd20ed9e7378c1a0ba
|
@@ -86,8 +86,7 @@ static bool pp_next_position(PhPos *self)
|
|
86
86
|
if (self->count >= 0) { /* read subsequent pos's */
|
87
87
|
self->position = tpe->next_position(tpe) - self->offset;
|
88
88
|
return true;
|
89
|
-
}
|
90
|
-
else {
|
89
|
+
} else {
|
91
90
|
return false;
|
92
91
|
}
|
93
92
|
}
|
@@ -106,7 +105,7 @@ static int pp_cmp(const void *const p1, const void *const p2)
|
|
106
105
|
if (cmp == 0) {
|
107
106
|
cmp = PP_pp(p1)->position - PP_pp(p2)->position;
|
108
107
|
if (cmp == 0) {
|
109
|
-
|
108
|
+
return PP_pp(p1)->offset - PP_pp(p2)->offset;
|
110
109
|
}
|
111
110
|
}
|
112
111
|
return cmp;
|
@@ -121,8 +120,7 @@ static bool pp_less_than(const PhPos *pp1, const PhPos *pp2)
|
|
121
120
|
{
|
122
121
|
if (pp1->position == pp2->position) {
|
123
122
|
return pp1->offset < pp2->offset;
|
124
|
-
}
|
125
|
-
else {
|
123
|
+
} else {
|
126
124
|
return pp1->position < pp2->position;
|
127
125
|
}
|
128
126
|
}
|
@@ -456,7 +454,7 @@ static float sphsc_phrase_freq(FrtScorer *self)
|
|
456
454
|
res = pp_first_position(pp);
|
457
455
|
assert(res);(void)res;
|
458
456
|
if (check_repeats && (i > 0)) {
|
459
|
-
if (!sphsc_check_repeats(pp, phsc->phrase_pos, i)) {
|
457
|
+
if (!sphsc_check_repeats(pp, phsc->phrase_pos, i - 1)) {
|
460
458
|
goto return_freq;
|
461
459
|
}
|
462
460
|
}
|
@@ -465,9 +463,8 @@ static float sphsc_phrase_freq(FrtScorer *self)
|
|
465
463
|
}
|
466
464
|
frt_pq_push(pq, pp);
|
467
465
|
}
|
468
|
-
|
466
|
+
|
469
467
|
do {
|
470
|
-
pqsize--;
|
471
468
|
pp = (PhPos *)frt_pq_pop(pq);
|
472
469
|
pos = start = pp->position;
|
473
470
|
next_pos = PP(frt_pq_top(pq))->position;
|
@@ -488,8 +485,8 @@ static float sphsc_phrase_freq(FrtScorer *self)
|
|
488
485
|
last_pos = pp->position;
|
489
486
|
}
|
490
487
|
frt_pq_push(pq, pp); /* restore pq */
|
491
|
-
if (pqsize == 0) { done = true; }
|
492
488
|
} while (!done);
|
489
|
+
|
493
490
|
return_freq:
|
494
491
|
frt_pq_destroy(pq);
|
495
492
|
return freq;
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: isomorfeus-ferret
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.12.
|
4
|
+
version: 0.12.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jan Biedermann
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-02-
|
11
|
+
date: 2022-02-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|