penalize internal link spamming

This commit is contained in:
dervperson 2025-01-31 23:41:28 -05:00
parent 4ca61ac2fd
commit 5b0003c792

View file

@ -27,7 +27,9 @@ function rankCalc(result, iterations = 10, main = []) {
} }
domains = [...new Set(domains)]; domains = [...new Set(domains)];
fnc[unn] = Object.keys(fng[unn]).length / (1+domains.length); let lf = Object.keys(fng[unn]).length;
fnc[unn] = lf / (1+domains.length);
pr[unn] = 0.1 / rl; pr[unn] = 0.1 / rl;
} }
@ -36,7 +38,7 @@ function rankCalc(result, iterations = 10, main = []) {
for (let follow of fnu) { for (let follow of fnu) {
if (follow == unn) continue; if (follow == unn) continue;
let dst = fnc[fnu] || 0; let dst = fnc[fnu] || 0;
matrixe[unn][follow] = 1 + 0.3 / (dst + 3); matrixe[unn][follow] = 1 + 1 / (dst + 3);
msum_old += matrixe[unn][follow]; msum_old += matrixe[unn][follow];
} }
for (let unn2 in result) { for (let unn2 in result) {