Skip to content

Wire in signwriting-to-text model - #8

Merged
AmitMY merged 1 commit into
mainfrom
feat/signwriting-to-text
Jul 5, 2026
Merged

AmitMY merged 1 commit into
mainfrom
feat/signwriting-to-text

Conversation

@AmitMY

@AmitMY AmitMY commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

What

Wires the sign/sockeye-signwriting-to-text model into bin, the CLI, and the FastAPI server. Previously only text→SignWriting was hooked up; signwriting_to_text() was broken — it passed the model path where a translator object was expected, never tokenized the input, and never decoded the output.

Key finding

This model is a separately-trained plain string→string model (num_source_factors: 1, num_target_factors: 1, subword-nmt BPE target) — not the factored/tiktoken pipeline create_parallel_data.py builds:

  • Source: SignWritingTokenizer tokens, prefixed with $<spoken> $<signed>
  • Target: BPE, de-@@'d back to spoken text

Changes

  • bin.py: tokenize_signwriting(), process_text_output(), translate_to_text(); extracted shared _run_translator() core; fixed signwriting_to_text()
  • server.py: loads both models, adds POST /signwriting-to-text
  • Dockerfile: primes the new endpoint during build
  • tests/test_server.py: round-trip test for the new direction

Verification

All 6 tests + ruff pass. Real translations:

FSW →
M528x518S15a28472x487S1f010490x502 fingerspelled
AS14c20S27106M518x529… goodbye
3-sign sequence "Hello world."

🤖 Generated with Claude Code

Fix the broken signwriting_to_text() CLI (it passed the model path as the
translator, never tokenized input, never decoded output) and expose the
direction via bin, CLI, and server.

The sign/sockeye-signwriting-to-text model is a separately-trained plain
string->string model (single source/target factor, subword-nmt BPE target),
not the factored/tiktoken pipeline. Source is SignWritingTokenizer tokens
prefixed with $spoken $signed; target is de-BPE'd spoken text.

- bin.py: tokenize_signwriting(), process_text_output(), translate_to_text();
  shared _run_translator() core
- server.py: load both models, add POST /signwriting-to-text
- Dockerfile: prime the new endpoint
- test: round-trip test for the new direction

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@AmitMY
AmitMY merged commit 5667dad into main Jul 5, 2026
2 checks passed
@AmitMY
AmitMY deleted the feat/signwriting-to-text branch July 5, 2026 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant