use case · basics · inside 6+6 MarianMT FR→ES · q8 WASM · 130.79 MB · Apache-2.0

Inside Direct FR→ES: Register (vous/tu), Gender, Faux Amis & Beam Search

Compare Beam 1 (Greedy) vs Beam 2 vs Beam 4 speed-vs-fluency with live length_penalty tuning on the 6+6 MarianMT encoder-decoder, inspect how 74,822-piece SentencePiece segments Romance cognates, false friends (embarrassé, constipé, subir, attendre), and French diacritics (œ ç ù), and contrast live vous→usted vs tu→tú and grammatical gender ablations.

1 · OPUS-MT FR→ES worker (130.79 MB q8 WASM · auto-inits from cache)

2 · Live Beam 1 vs Beam 2 vs Beam 4 & Length Penalty Benchmark

Each beam width runs sequentially in the same WASM worker on your French sentence using the chosen length_penalty (0.5 favors concise Spanish clauses; 2.0 favors fuller phrasing). Highlighted Spanish tokens in Beam 2 and Beam 4 mark word-choice, register, or punctuation changes relative to Beam 1 (Greedy).

Select a French benchmark sentence

Prepare OPUS-MT FR→ES above to run live Beam 1 vs Beam 2 vs Beam 4 decoding.

Beam 1 (Greedy baseline)

—

Latency: — · Tokens: —

Beam 2 (diff vs Beam 1)

—

Latency: — · Overlap: —

Beam 4 (diff vs Beam 1)

—

Latency: — · Overlap: —

Measured Beam Search Latency & Throughput (CPU WASM)

Real SentencePiece Source Subwords (MarianTokenizer)

Run Beam comparison to inspect SentencePiece source subwords.

3 · Live SentencePiece Faux Amis, Cognates & Diacritic Fertility Explorer

Inspect how the 74,822-piece FR/ES vocabulary segments classic Romance false friends (embarrassé, constipé, subir, attendre), ligatures (cœur, chef-d'œuvre), cedillas (français, garçon), and grave ù (où) — alongside live isolated Spanish translations.

Prepare OPUS-MT FR→ES above to tokenize and translate French faux amis & diacritic probes.

French word Kind · Romance gloss Live SentencePiece pieces Live Spanish ms
Click Tokenize & Translate Probes once the model is ready.

4 · Live vous/tu Register, Grammatical Gender & ¿ / ¡ Minimal Pairs

Contrast paired French inputs side-by-side to observe direct zero-pivot Romance behavior: formal vous→usted vs informal tu→tú, feminine vs masculine adjective agreement, false friends vs true cognates, and inverted Spanish punctuation.

French → Spanish Minimal Pairs

Linguistic note: —

Select a minimal pair and click Run Register & Gender Pair once the model is ready.

Variant A

—

Tokens: — · Latency: —

Variant B

—

Tokens: — · Latency: —

Show the code — Off-thread Beam 1 vs Beam 2 vs Beam 4 & length_penalty comparison
Show the code — Deterministic LCS word-diff comparator

Model: Helsinki-NLP/opus-mt-fr-es → Xenova/opus-mt-fr-es (130.79 MB q8 WASM, Apache-2.0).