Lucene++ - a full-featured, c++ search engine
API Documentation
Main Page
Related Pages
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
include
SloppyPhraseScorer.h
Go to the documentation of this file.
1
2
// Copyright (c) 2009-2014 Alan Wright. All rights reserved.
3
// Distributable under the terms of either the Apache License (Version 2.0)
4
// or the GNU Lesser General Public License.
6
7
#ifndef SLOPPYPHRASESCORER_H
8
#define SLOPPYPHRASESCORER_H
9
10
#include "
PhraseScorer.h
"
11
12
namespace
Lucene {
13
14
class
SloppyPhraseScorer
:
public
PhraseScorer
{
15
public
:
16
SloppyPhraseScorer
(
const
WeightPtr
&
weight
,
Collection<TermPositionsPtr>
tps,
Collection<int32_t>
offsets,
const
SimilarityPtr
&
similarity
, int32_t
slop
, ByteArray
norms
);
17
virtual
~SloppyPhraseScorer
();
18
19
LUCENE_CLASS
(
SloppyPhraseScorer
);
20
21
protected
:
22
int32_t
slop
;
23
Collection<PhrasePositionsPtr>
repeats
;
24
Collection<PhrasePositionsPtr>
tmpPos
;
// for flipping repeating pps
25
bool
checkedRepeats
;
26
27
public
:
40
virtual
double
phraseFreq
();
41
42
protected
:
45
PhrasePositionsPtr
flip
(
const
PhrasePositionsPtr
& pp,
const
PhrasePositionsPtr
& pp2);
46
58
int32_t
initPhrasePositions
();
59
64
PhrasePositionsPtr
termPositionsDiffer
(
const
PhrasePositionsPtr
& pp);
65
};
66
67
}
68
69
#endif
clucene.sourceforge.net