Skip to content

feat: complete IPA translation support#27

Open
konard wants to merge 4 commits into
mainfrom
issue-1-f9f2209a
Open

feat: complete IPA translation support#27
konard wants to merge 4 commits into
mainfrom
issue-1-f9f2209a

Conversation

@konard

@konard konard commented Sep 10, 2025

Copy link
Copy Markdown
Contributor

Summary

Resolves #1 by completing IPA translation support across the unified Human Language application.

  • translates arbitrary text token-by-token using Free Dictionary and Wiktionary fallbacks
  • prefers Wikidata P898 transcriptions for entities
  • selects the P898 transcription matching the active BCP-47 display language
  • exposes IPA displays in the alphabet, dictionary, and entity modes
  • keeps the Node.js and browser Wikidata clients aligned
  • caches token lookups for responsive repeated rendering

Reproduction and fix

Before this update, an entity with multiple language-tagged P898 values always displayed the first transcription. For example, selecting fr-FR from English and French claims still returned the English IPA.

toIpaForEntity now normalizes the requested language, prefers a matching transcription, then falls back to an untagged value or the first available value.

Tests

  • npm test — passed
  • npm run test:syntax — passed (46 files)
  • npm run check:web-archive — passed
  • cargo test --manifest-path rust/Cargo.toml — passed
  • cargo fmt --manifest-path rust/Cargo.toml --all -- --check — passed
  • cargo clippy --manifest-path rust/Cargo.toml --all-targets --all-features -- -D warnings — passed
  • npm run test:e2e:local — 10 passed; two unrelated existing checks depend on unavailable external resources (Google Fonts browser-console errors and a Wikidata fetch)

The IPA unit suite includes deterministic mocked coverage for arbitrary text, punctuation preservation, missing pronunciations, P898 parsing, language selection, fallbacks, and empty input.

Conflict resolution

Merged current main and resolved the legacy entities.html conflict in favor of the unified SPA redirect and its dedicated IPA service.

Resolves #1

Adding CLAUDE.md with task information for AI processing.
This file will be removed when the task is complete.

Issue: #1
@konard konard self-assigned this Sep 10, 2025
konard and others added 2 commits September 10, 2025 22:29
…port

- Add IPA transcription retrieval from Wikidata P898 property
- Support multiple language pronunciations with P407 qualifiers
- Support pronunciation variety qualifiers (P5237) for dialects
- Beautiful IPA display in entity viewer with /phonemic/ notation
- Comprehensive error handling and caching integration
- Add test suite for IPA functionality with real entity examples
- Update documentation to reflect IPA feature completion

Resolves #1: Make sure we have translation to IPA

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
@konard konard changed the title [WIP] Make sure we have translation to IPA (international phonetic alphabet) feat: Implement IPA (International Phonetic Alphabet) translation support Sep 10, 2025
@konard konard marked this pull request as ready for review September 10, 2025 19:37
@konard

konard commented Jul 12, 2026

Copy link
Copy Markdown
Contributor Author

We need to resolve conflicts, and double check that #1 is fully implemented, if we have something not fully implemented we should implement it fully.

@konard konard marked this pull request as draft July 12, 2026 04:50
@konard

konard commented Jul 12, 2026

Copy link
Copy Markdown
Contributor Author

🤖 AI Work Session Started

Starting automated work session at 2026-07-12T04:50:20.678Z

The PR has been converted to draft mode while work is in progress.

This comment marks the beginning of an AI work session. Please wait for the session to finish, and provide your feedback.

@konard konard changed the title feat: Implement IPA (International Phonetic Alphabet) translation support feat: complete IPA translation support Jul 12, 2026
@konard konard marked this pull request as ready for review July 12, 2026 04:57
@konard

konard commented Jul 12, 2026

Copy link
Copy Markdown
Contributor Author

Working session summary

Implemented and finalized PR #27.

  • Merged main and resolved all conflicts.
  • Added language-aware P898 IPA selection with regression coverage.
  • Updated README and PR description.
  • Pushed commit 7e99a4f.
  • Marked PR ready for review.
  • Fresh CI passed: syntax, links, unit tests, and Playwright E2E.
  • PR is CLEAN, mergeable, and the working tree is clean.

This summary was automatically extracted from the AI working session output.

@konard

konard commented Jul 12, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Solution Draft Log

This log file contains the complete execution trace of the AI solution draft process.

💰 Cost estimation:

  • Model: GPT-5.6 Sol
  • Provider: OpenAI
  • Public pricing estimate: $4.548936

📊 Context and tokens usage:

  • 111.0K / 200K (55%) input tokens, 8.7K / 128K (7%) output tokens

Total: (111.0K + 3.0M cached) input tokens, 8.7K output tokens, $4.548936 cost

🤖 Models used:

  • Tool: OpenAI Codex
  • Requested: gpt-5.6-sol
  • Thinking level: medium (~15999 tokens)
  • Model: GPT-5.6 Sol (gpt-5.6-sol)

📎 Log file uploaded as Gist (1443KB)


Now working session is ended, feel free to review and add any feedback on the solution draft.

@konard

konard commented Jul 12, 2026

Copy link
Copy Markdown
Contributor Author

✅ Ready to merge

This pull request is now ready to be merged:

  • All CI checks have passed
  • No merge conflicts
  • No pending changes

Monitored by hive-mind with --auto-restart-until-mergeable flag

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.

Make sure we have translation to IPA (international phonetic alphabet)

1 participant