uncommented code from main

This commit is contained in:
Karma Riuk
2025-05-11 09:26:37 +02:00
parent 3ecaa2253a
commit 91ffbc467e

View File

@ -98,19 +98,18 @@ export function bleu(refSentence, candSentence, maxN = 4, smooth = false) {
return bp * geoMean; return bp * geoMean;
} }
// Example usage: // if __name__ == "__main__"
if (process.argv[1] === import.meta.filename) { if (process.argv[1] === import.meta.filename) {
const test_pairs = [ const test_pairs = [
// ["the cat is on the mat", "the cat is on the mat"], ["the cat is on the mat", "the cat is on the mat"],
// ["the cat is on the mat", "the the the the the the the"], ["the cat is on the mat", "the the the the the the the"],
// ["the cat is on the mat", "the cat on the mat"], ["the cat is on the mat", "the cat on the mat"],
// ["the cat is on the mat", "the cat is on the"], ["the cat is on the mat", "the cat is on the"],
// ["the cat is on the mat", "foo bar baz qux"], ["the cat is on the mat", "foo bar baz qux"],
// [ [
// "The quick brown fox jumps over the lazy dog", "The quick brown fox jumps over the lazy dog",
// "The quick brown dog jumps over the lazy fox", "The quick brown dog jumps over the lazy fox",
// ], ],
[ [
"This could be `static` to prevent any funkiness, i.e. attempting to use class state during the constructor or similar.", "This could be `static` to prevent any funkiness, i.e. attempting to use class state during the constructor or similar.",
"This could be `static` to prevent any funkiness, i.e. attempting to use class state during the constructor or similar.", "This could be `static` to prevent any funkiness, i.e. attempting to use class state during the constructor or similar.",