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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 535294842e0ed4157e7148a2876c824364d4f7bff1538192088013420f6667a4
4
- data.tar.gz: 7ddc0f033782863e57b2b4f316f63f313365a117203b991b4f85d151cc3e479b
3
+ metadata.gz: 6fced309c17056d92c0613d5c7cb6ad3c67b894abb4be9b51265c29e19774ef5
4
+ data.tar.gz: cea4228781c82c24dfc4c1e65f308819cca0c5528078496f1859f0ea89cf0a70
5
5
  SHA512:
6
- metadata.gz: 31daaa79fbe048c238b3f3b4141885ac2cefb5e61a9d2a79e1b327341d2d5ea6bed6037da256563f29440a0d4d7d05e553dc83184e6ef46a0fab87a90c4b6905
7
- data.tar.gz: b1f48f41d0e9e100202c1a8c1a2cbeffcfb5040b62c992d33c8994634f4adfff6caeb66c1ed82e6e5f34101a4b6446b4e034d2372e3a211cd2de9a9d7df62697
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
- cmp = PP_pp(p1)->offset - PP_pp(p2)->offset;
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
- int pqsize = pq->size;
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;
@@ -1,5 +1,5 @@
1
1
  module Isomorfeus
2
2
  module Ferret
3
- VERSION = '0.12.5'
3
+ VERSION = '0.12.6'
4
4
  end
5
5
  end
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.5
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-10 00:00:00.000000000 Z
11
+ date: 2022-02-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake