[PR #1300] Export native speaker hashes from PSIN dialogue turns #1330

Open
opened 2026-11-26 20:20:53 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/1300
Author: @kaoru-maki
Created: 11/24/2026
Status: 🔄 Open

Base: main ← Head: psin-native-speaker


📝 Commits (1)

  • 74838ba Export native speaker hashes from PSIN dialogue turns

📊 Changes

4 files changed (+234 additions, -1 deletions)

View changed files

📝 docs/text.md (+16 -0)
➕ tests/test_psin_dialogue.py (+91 -0)
➕ tools/psin_dialogue.py (+105 -0)
📝 tools/text_tables.py (+22 -1)

📄 Description

Claimed in the coordination issue as: PSIN-NATIVE-SPEAKER (claim)

What and why

Add text_tables.py --native-speakers to export the character hash selected by each PSIN conversation turn. Resolve the turn's slot within that conversation's participant array and keep the source and record offsets for each occurrence. This covers typed cues outside the AU_ naming pattern and leaves the existing --dialogue CSV compatible with current consumers.

The report leaves the character hash empty for missing, repeated or zero-hash slots. It validates the LSCH layout and bounds typed arrays and strings within their blocks. The native cue and label are sufficient to join on subtitle_hash locally. The report makes no assumption about a cue's wave number or AWC address.

Tested

  • python3 -IB tests/test_psin_dialogue.py, tests/test_text_tables.py, tests/test_psin_data.py and tests/test_psin_index.py (101 passed, 1 skipped).
  • python3 -IB tests/test_docs_cli_flags.py, tests/test_text_write_line_endings.py and tests/test_docs_links.py (23 passed).
  • Local aggregate check on Xbox 1.0.2.1: matched the existing offset, slot and hash references for 7,044 rows across 137 typed PSIN resources that yielded zero pairs under the AU_ expression.
  • git diff --check and scripts/check_no_game_data.py on all changed files.

GPUs tested: n/a (CPU-only, macOS arm64).

AI-assisted: yes.

Checklist

  • Based on the current main and merges cleanly.
  • One topic.
  • Only code, format documentation and synthetic test inputs are included.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/1300 **Author:** [@kaoru-maki](https://github.com/kaoru-maki) **Created:** 11/24/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `psin-native-speaker` --- ### 📝 Commits (1) - [`74838ba`](https://github.com/ubiquitarianism/leonida/commit/74838ba5f097d3af6b20d32f07eb5d0b9a01f333) Export native speaker hashes from PSIN dialogue turns ### 📊 Changes **4 files changed** (+234 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `docs/text.md` (+16 -0) ➕ `tests/test_psin_dialogue.py` (+91 -0) ➕ `tools/psin_dialogue.py` (+105 -0) 📝 `tools/text_tables.py` (+22 -1) </details> ### 📄 Description Claimed in the coordination issue as: PSIN-NATIVE-SPEAKER ([claim](https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7144955191)) ### What and why Add `text_tables.py --native-speakers` to export the character hash selected by each PSIN conversation turn. Resolve the turn's slot within that conversation's participant array and keep the source and record offsets for each occurrence. This covers typed cues outside the `AU_` naming pattern and leaves the existing `--dialogue` CSV compatible with current consumers. The report leaves the character hash empty for missing, repeated or zero-hash slots. It validates the LSCH layout and bounds typed arrays and strings within their blocks. The native cue and label are sufficient to join on `subtitle_hash` locally. The report makes no assumption about a cue's wave number or AWC address. ### Tested - `python3 -IB tests/test_psin_dialogue.py`, `tests/test_text_tables.py`, `tests/test_psin_data.py` and `tests/test_psin_index.py` (101 passed, 1 skipped). - `python3 -IB tests/test_docs_cli_flags.py`, `tests/test_text_write_line_endings.py` and `tests/test_docs_links.py` (23 passed). - Local aggregate check on Xbox 1.0.2.1: matched the existing offset, slot and hash references for 7,044 rows across 137 typed PSIN resources that yielded zero pairs under the `AU_` expression. - `git diff --check` and `scripts/check_no_game_data.py` on all changed files. GPUs tested: n/a (CPU-only, macOS arm64). AI-assisted: yes. ### Checklist - [x] Based on the current `main` and merges cleanly. - [x] One topic. - [x] Only code, format documentation and synthetic test inputs are included. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
starred/leonida#1330
No description provided.