mirror of
https://github.com/browsermt/bergamot-translator.git
synced 2024-09-11 05:35:33 +03:00
Tweak words per second metric in the test page log
This commit is contained in:
parent
d3969bcd2d
commit
28c0ab2e04
@ -117,7 +117,7 @@ the sky is blue
|
||||
const sentences = text.split("\n");
|
||||
let wordCount = 0;
|
||||
sentences.forEach(sentence => {
|
||||
wordCount += sentence.trim().split(" ").length;
|
||||
wordCount += sentence.trim().split(" ").filter(word => word.trim() !== "").length;
|
||||
})
|
||||
const start = Date.now();
|
||||
const translatedSentences = translate(sentences);
|
||||
|
Loading…
Reference in New Issue
Block a user