cd /news/ai-tools/building-a-diff-view-for-a-spanish-r… · home › topics › ai-tools › article
[ARTICLE · art-182164] src=dev.to ↗ pub= topic=ai-tools verified=true sentiment=· neutral

Building a diff view for a Spanish rewriting editor

A developer outlined a design for a diff view in a Spanish rewriting editor, using Humanizador's side-by-side interface as a reference model. The approach pairs each change as an original range and a result range read from their own texts, handles reordered passages, zero-length omissions, repeated words and protected terms, and keeps marks legible without relying on color alone.

recommendation

Store diffs as paired original and result ranges with positional indices, and give each change a focusable control that jumps between both spans so reviewers can verify substitutions without relying on color.

more in playbook: Verifying model output
by read5 min views7 publishedDec 4, 2026

A rewriting editor has two texts on screen and one job for the person reading them: make it easy to decide what to keep. Humanizador, an AI humanizer for Spanish, shows a gray underline beneath replaced wording in the original and yellow marks in the result. Its interface gives you a concrete example of the review problem. The design ideas below are ways to build your own view based on what a reader can see and do there.

Take «El comité revisará la solicitud antes del viernes» and «El comité examinará la solicitud antes del viernes». For the review view, you need to know where «revisará» appears in the original and where «examinará» appears in the result. Each side should still be readable as an ordinary sentence. Keep the shared text in place and annotate the range that changed on each side. When a reader selects the substitution, make it easy to locate the other end of the pair.

A useful design representation is a change record with an original range and a result range. Read the ranges from their own texts. If «examinará» occupies a different number of characters, the offsets for later changes in the result can differ from the original. Test a sentence that repeats the same word. Looking up the string «revisará» when a person selects the second occurrence could pair the wrong text. Use the position in the specific version to keep them distinct.

Consider «La entrega se hará en el patio debido al cierre del acceso principal» and «Como el acceso principal estará cerrado, la entrega se hará en el patio». The order has changed and some of the words that stayed are now far apart. Showing a sequence of tiny replacements can make the reader hunt for a meaningful correspondence. Where a sentence has been substantially rearranged, consider grouping the changed passage so the reader can compare its parts in context.

Handle missing text on either side as its own case. If «por favor» disappears, a range in the result might have zero length. Keep a visible way back to the omission, such as a marker at the nearest phrase boundary or a row in a change list. If a new clause has no original counterpart, identify where it appears in the result and give the reader enough surrounding text to judge it. Choose a consistent rule for repeated wording before designing the highlights. it matters as soon as a sentence contains two instances of «el jueves».

Humanizador shows the original and result together. Gray underlines mark replaced text on the original side and yellow indicates the wording on the result side. In a view you build, a focusable change control can point to both spans. Give it a label that identifies the original and revised expressions. If the other span is outside the visible area, let someone jump to it and find their way back. On a narrow display, a paired view for the active change can give you the same comparison without squeezing two full paragraphs side by side.

Keep the marks useful without asking readers to rely on color alone. An underline, a label in a change list or a visible focus indicator can communicate what has been selected. Offer an ordinary reading view as well. Humanizador's «Mostrar cambios» control can turn off the marks for a continuous read. That's helpful after a detailed pass, when the main question is how the sentences sound together.

Humanizador lets the writer enter words that should stay as written. The site asks you to keep the original spelling, accents and capitalization. It also explains that singular and plural forms can be entered separately. A test case for your own design could protect «Área Técnica» in two places and check that each occurrence still reads well after nearby wording changes. Other cases might include an address with punctuation and a label with a model number.

Make it possible to find the protected expression on both sides. Then look at what the text says around it. «Área Técnica enviará las actas antes del jueves» and «Área Técnica enviará las actas el jueves» both preserve the name. The reader still needs to catch the change in deadline. A successful exact match can answer a spelling question. Checking the commitment takes a reading of the sentence.

Humanizador can generate another version from the same original and provides a selector to read the full alternatives in turn. It also shows word and sentence alternatives when someone selects a word in the result. «Deshacer» restores the wording before the last adjustment. «Volver al original» restores the selected sentence and leaves the other edits in place.

For your own design, decide which text each control acts on before defining the highlight behavior. When a reader switches proposals, show changes against the original for the newly selected proposal. When they restore one sentence, refresh its comparison and keep the rest of their decisions in place. A search for an old offset after a local edit can land halfway through the wrong word, so derive the displayed positions from the revision that is on screen.

Try the view with a passage containing a protected name, a repeated date and an exception. Ask someone to find the change that affects the exception, then read the result with the marks hidden. If they can move between the exact substitution and the full sentence without losing their place, the review view is doing its job.
── more in #ai-tools 4 stories · sorted by recency
── more on @humanizador 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/building-a-diff-view…] indexed:0 read:5min 2026-12-04 · —