Skip to content

Commit

Permalink
Merge pull request #61 from lulunac27a/patch-1
Browse files Browse the repository at this point in the history
Make layer 2 and layer 3 score more accurate
  • Loading branch information
saertna authored Feb 3, 2024
2 parents 6baa358 + d6627ca commit b99475e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/maturitycalculation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ export function rateProgressiveSummarization(charCountTotal: number, layer2count
} else if (percentLayer2 <= 30) {
layer2maturity = 3;
} else if (percentLayer2 <= 40) {
layer2maturity = 2;
} else if (percentLayer2 <= 50) {
layer2maturity = 1;
} else {
layer2maturity = 0;
Expand All @@ -39,7 +41,7 @@ export function rateProgressiveSummarization(charCountTotal: number, layer2count
maturity = 1;
} else if (layer2maturity == 2 && layer3maturity == 0) {
maturity = 2;
} else if (layer2maturity >= 3 && layer3maturity == 0) {
} else if ((layer2maturity >= 3 && layer3maturity == 0) || (layer2maturity <= 2 && layer3maturity >= 4)) {
maturity = 3;
} else if ((layer2maturity == 3 || layer2maturity == 4) && (layer3maturity == 4 || layer3maturity == 5)) {
maturity = 4;
Expand Down

0 comments on commit b99475e

Please sign in to comment.