privacore-open-source-searc.../BaseScoringParameters.h

49 lines
1.3 KiB
C
Raw Normal View History

#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,
2018-06-22 10:01:03 -04:00
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);
2018-05-24 09:39:59 -04:00
bool allLanguageWeightsAreTheSame() const;
};
#endif