privacore-open-source-searc.../BaseScoringParameters.h
2018-06-22 16:01:03 +02:00

49 lines
1.3 KiB
C

#ifndef BASESCORINGPARAMETERS_H_
#define BASESCORINGPARAMETERS_H_
//base scoring/ranking parameters. Mostly weights but also a few on/off and other adjustments
struct BaseScoringParameters {
float m_languageWeights[64]; //MAX_LANGUAGES
float m_siteRankMultiplier;
float m_termFreqWeightFreqMin;
float m_termFreqWeightFreqMax;
float m_termFreqWeightMin;
float m_termFreqWeightMax;
float m_diversityWeightMin, m_diversityWeightMax;
float m_densityWeightMin, m_densityWeightMax;
float m_hashGroupWeightBody,
m_hashGroupWeightTitle,
m_hashGroupWeightHeading,
m_hashGroupWeightInlist,
m_hashGroupWeightInMetaTag,
m_hashGroupWeightInLinkText,
m_hashGroupWeightInTag,
m_hashGroupWeightNeighborhood,
m_hashGroupWeightInternalLinkText,
m_hashGroupWeightInUrl,
m_hashGroupWeightInMenu,
m_hashGroupWeightExplicitKeywords,
m_hashGroupWeightMidDomain,
m_hashGroupWeightLemma;
float m_synonymWeight;
float m_bigramWeight;
float m_pageTemperatureWeightMin;
float m_pageTemperatureWeightMax;
bool m_usePageTemperatureForRanking;
float m_flagScoreMultiplier[26];
int m_flagRankAdjustment[26];
BaseScoringParameters() { clear(); }
void clear();
void traceToLog(const char *prefix);
bool allLanguageWeightsAreTheSame() const;
};
#endif