Skip to content

Commit

Permalink
Updated configuration for html text translation to work in wasm test …
Browse files Browse the repository at this point in the history
…page (#269)

* Updated translator configuration in wasm test page
 - Added alignment: soft

* Set ResponseOptions::alignment to "true"
 - Had to be set for html text translation to work
  • Loading branch information
abhi-agg authored Dec 1, 2021
1 parent e8fd01e commit 8e79897
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion wasm/test_page/js/worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ cpu-threads: 0
quiet: true
quiet-translation: true
gemm-precision: int8shiftAlphaAll
alignment: soft
`;

const modelFile = `${rootURL}/${languagePair}/${modelRegistry[languagePair]["model"].name}`;
Expand Down Expand Up @@ -323,7 +324,7 @@ const _parseTranslatedTextSentenceQualityScores = (vectorResponse) => {
}

const _prepareResponseOptions = () => {
return {qualityScores: true, alignment: false, html: true};
return {qualityScores: true, alignment: true, html: true};
}

const _prepareSourceText = (input) => {
Expand Down

0 comments on commit 8e79897

Please sign in to comment.