Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
simtexth.cpp File Reference

(c338447261878111df7198fbd96051926464e865)

#include "simtexth.h"
#include "translator.h"
#include <QtCore/QByteArray>
#include <QtCore/QString>
#include <QtCore/QList>
+ Include dependency graph for simtexth.cpp:

Go to the source code of this file.

Functions

static void setCoOccurence (CoMatrix &m, char c, char d)
 
static int worth (const CoMatrix &m)
 
static CoMatrix reunion (const CoMatrix &m, const CoMatrix &n)
 
static CoMatrix intersection (const CoMatrix &m, const CoMatrix &n)
 
CandidateList similarTextHeuristicCandidates (const Translator *tor, const QString &text, int maxCandidates)
 

Variables

QT_BEGIN_NAMESPACE typedef QList< TranslatorMessageTML
 
static const int indexOf [256]
 
static const int bitCount [256]
 

Function Documentation

◆ intersection()

static CoMatrix intersection ( const CoMatrix & m,
const CoMatrix & n )
inlinestatic

Definition at line 138 of file simtexth.cpp.

Referenced by StringSimilarityMatcher::getSimilarityScore().

+ Here is the caller graph for this function:

◆ reunion()

static CoMatrix reunion ( const CoMatrix & m,
const CoMatrix & n )
inlinestatic

Definition at line 130 of file simtexth.cpp.

Referenced by StringSimilarityMatcher::getSimilarityScore().

+ Here is the caller graph for this function:

◆ setCoOccurence()

static void setCoOccurence ( CoMatrix & m,
char c,
char d )
inlinestatic

Definition at line 97 of file simtexth.cpp.

Referenced by CoMatrix::CoMatrix().

+ Here is the caller graph for this function:

◆ similarTextHeuristicCandidates()

CandidateList similarTextHeuristicCandidates ( const Translator * tor,
const QString & text,
int maxCandidates )

Definition at line 161 of file simtexth.cpp.

◆ worth()

static int worth ( const CoMatrix & m)
inlinestatic

Definition at line 122 of file simtexth.cpp.

References bitCount.

Referenced by StringSimilarityMatcher::getSimilarityScore().

+ Here is the caller graph for this function:

Variable Documentation

◆ bitCount

static const int bitCount
static
Initial value:
= {
0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4,
1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,
1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,
2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,
2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,
1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,
2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,
2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,
3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,
4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8
}

Definition at line 78 of file simtexth.cpp.

Referenced by worth().

◆ indexOf

static const int indexOf
static
Initial value:
= {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 2, 6, 7, 10, 12, 15, 19, 2, 6, 7, 10, 12, 15, 19, 0,
1, 3, 4, 5, 8, 9, 11, 13, 14, 16, 2, 6, 7, 10, 12, 15,
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 6, 10, 11, 12, 13, 14,
15, 12, 16, 17, 18, 19, 2, 10, 15, 7, 19, 2, 6, 7, 10, 0,
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 6, 10, 11, 12, 13, 14,
15, 12, 16, 17, 18, 19, 2, 10, 15, 7, 19, 2, 6, 7, 10, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 2, 6, 7, 10, 12, 15, 19, 2, 6, 7, 10, 12, 15, 19, 0,
1, 3, 4, 5, 8, 9, 11, 13, 14, 16, 2, 6, 7, 10, 12, 15,
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 6, 10, 11, 12, 13, 14,
15, 12, 16, 17, 18, 19, 2, 10, 15, 7, 19, 2, 6, 7, 10, 0,
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 6, 10, 11, 12, 13, 14,
15, 12, 16, 17, 18, 19, 2, 10, 15, 7, 19, 2, 6, 7, 10, 0
}

Definition at line 48 of file simtexth.cpp.

◆ TML

Definition at line 14 of file simtexth.cpp.