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.h File Reference

(d6ec2c354f23ee1555720a136a5f276fd4358a5e)

#include <QString>
#include <QList>
Include dependency graph for simtexth.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Candidate
struct  CoMatrix
class  StringSimilarityMatcher

Typedefs

typedef QList< CandidateCandidateList

Functions

bool operator== (const Candidate &c, const Candidate &d)
bool operator!= (const Candidate &c, const Candidate &d)
static int getSimilarityScore (const QString &str1, const QString &str2)
CandidateList similarTextHeuristicCandidates (const Translator *tor, const QString &text, int maxCandidates)

Variables

const int textSimilarityThreshold = 190

Typedef Documentation

◆ CandidateList

Definition at line 40 of file simtexth.h.

Function Documentation

◆ getSimilarityScore()

int getSimilarityScore ( const QString & str1,
const QString & str2 )
inlinestatic

Checks how similar two strings are. The return value is the score, and a higher score is more similar than one with a low score. Linguist considers a score over 190 to be a good match.

See also
StringSimilarityMatcher

Definition at line 80 of file simtexth.h.

◆ operator!=()

bool operator!= ( const Candidate & c,
const Candidate & d )
inline

Definition at line 36 of file simtexth.h.

References operator==().

Here is the call graph for this function:

◆ operator==()

bool operator== ( const Candidate & c,
const Candidate & d )
inline

Definition at line 32 of file simtexth.h.

Referenced by operator!=().

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.

Variable Documentation

◆ textSimilarityThreshold

const int textSimilarityThreshold = 190

Definition at line 7 of file simtexth.h.