Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
bobimicroweber committed May 23, 2024
1 parent b21409e commit ec504e2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions src/rhyme-helper-bg.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ class RhymeHelperBG {
if (wordLastThreeLetters === withWordLastThreeLetters) {
rhymeRate = rhymeRate + 0.5;
}
if (wordLastTwoLetters === withWordLastTwoLetters) {
rhymeRate = rhymeRate + 0.05;
}
// if (wordLastTwoLetters === withWordLastTwoLetters) {
// rhymeRate = rhymeRate + 0.05;
// }

if (wordSimilar.length > 0) {
for (let similar of wordSimilar) {
Expand All @@ -44,9 +44,9 @@ class RhymeHelperBG {
let wordSimilarThreeLetters = similar.substring(similar.length - 3);
let wordSimilarFourLetters = similar.substring(similar.length - 4);

if (wordSimilarTwoLetters === withWordLastTwoLetters) {
rhymeRate = rhymeRate + 0.05;
}
// if (wordSimilarTwoLetters === withWordLastTwoLetters) {
// rhymeRate = rhymeRate + 0.05;
// }
if (wordSimilarThreeLetters === withWordLastThreeLetters) {
rhymeRate = rhymeRate + 0.5;
}
Expand Down
4 changes: 2 additions & 2 deletions tests/rhyme-helper.test.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
const RhymeHelperBG = require("../src/rhyme-helper-bg");
test("Check rhymes", () => {

expect(RhymeHelperBG.getRhymeRate("Сняг", "Як"))
.toBeGreaterThan(0.04);
// expect(RhymeHelperBG.getRhymeRate("Сняг", "Як"))
// .toBeGreaterThan(0.04);

expect(RhymeHelperBG.getRhymeRate("Божидар", "Говедар"))
.toBeGreaterThan(0.5);
Expand Down

0 comments on commit ec504e2

Please sign in to comment.