Skip to content

Decide object, module, type, list and float - #56

Merged
tamnd merged 1 commit into
mainfrom
glossary-standalone
Aug 18, 2026
Merged

Decide object, module, type, list and float#56
tamnd merged 1 commit into
mainfrom
glossary-standalone

Conversation

@tamnd

@tamnd tamnd commented Aug 18, 2026

Copy link
Copy Markdown
Owner

The rows behind tamnd/python-docs-vi-translator#58, now that a row can say two things.

What was measured

Over the 548 catalogs of the pinned mirror, counting only prose the glossary matcher finds the term in, and masking markup on the Vietnamese side so :class: list`` does not read as the word "list":

term Vietnamese English decision
object đối tượng 63 object 46 đối tượng
list danh sách 34 list 15 danh sách, stands alone
type kiểu 30 type 16 kiểu, stands alone
float số thực 4 float 4 số thực, stands alone
module mô-đun 17 module 64 module, kept

type, list and float stand alone because each of them names a thing in a table somewhere: type is the argparse keyword in a table of argparse keywords, list is a cell in the json conversion table next to array, float is a cell in the struct format table next to _Float16. object does not, because 35 of its 36 standalone entries are the index category and read "bytearray (object)" to somebody using the index.

module had no row at all and no majority either, 64 to 17, and the split does not resolve by area: the tutorial runs the other way from the library reference. So it is decided on the reason rather than the count. mô-đun is module spelled with a hyphen in it and carries nothing a reader does not already get from module, where đối tượng, kiểu, danh sách and số thực are Vietnamese words that mean something. bytecode, docstring, iterable, lambda, traceback and REPL are already kept for exactly that reason.

import, slice and callable are the same shape as float and are deliberately left as they are. Their Vietnamese moves with the part of speech, nhập for the verb and import for the noun in "hệ thống import", and a row naming one rendering would fail G02 on the other. They stay keep_en until somebody words them.

What it moves

check before after
L02 untranslated (hard) 86 45
G03 kept term lost 94 103
G02 rendering missing 191 339
G04 term left in English 143 313

41 hard findings for 327 soft ones, and the soft ones are the point. Of G03's 103, module is 80, and 65 of those 80 are machine output from the 2026-08-17 tier 1 run. The model was inventing mô-đun because the glossary said nothing about module, and now it will not. The same holds across the new G02 and G04 findings: 198 of the 362 are machine, and the next run clears them.

The other 164 are human translations that disagree with each other, which is what a glossary is for and what a report is for. reports/quality.md now reads 0.19 misses per machine entry against 0.05, and the reason it read 0.05 is that the glossary had nothing to say about the words the model was getting wrong.

L02's remaining 45: object 36, Lists 3, three copyright notices, a Monty Python transcript and two one-offs. Lists is not folded into list on purpose; it is a section heading three times, each followed by prose beginning "Lists are mutable sequences", and a heading is translated.

Audit

548 catalogs, 41 checks, 29 passing, 2,545 findings. Hard failing: P01 26, P03 27, L01 4, L02 45.

Glossary v2 to v3, 642 terms, 51 kept in English. Every catalog rewritten for X-Generator: pydocvi 0.1.11.

L02 was reporting 86 entries whose Vietnamese is the English handed
back, and 77 of them were the single words module and object sitting in
an index category next to the thing they categorise. The glossary had
no row for either, and its rows for type, list and float said keep the
English, which is why G03 was reporting 71 correct translations of them.

Measured over the 548 catalogs of the pinned mirror, counting prose the
glossary matcher finds the term in and masking markup on the Vietnamese
side so an identifier inside a role does not read as the English word:

  object    doi tuong 63   object 46
  type      kieu      30   type   16
  list      danh sach 34   list   15
  float     so thuc    4   float   4
  module    mo-dun    17   module 64

object, type, list and float take the Vietnamese the corpus already
uses. type, list and float also take identifier, because each names a
thing in a table somewhere and the row now says both.

module has no majority and does not get one by area, so it is decided
on the reason instead. mo-dun is module spelled with a hyphen and
carries nothing a reader does not already get from module, where doi
tuong, kieu, danh sach and so thuc are Vietnamese words that mean
something. bytecode, docstring, iterable, lambda, traceback and REPL
are already kept for that reason and module belongs with them.

import, slice and callable are the same shape as float and are left
alone. Their Vietnamese moves with the part of speech, nhap for the
verb and import for the noun in "he thong import", and a row naming one
rendering would fail G02 on the other.

Needs pydocvi 0.1.11 for the identifier field, so every catalog is
rewritten with the new X-Generator.
@tamnd
tamnd merged commit ef4fca5 into main Aug 18, 2026
1 check failed
@tamnd
tamnd deleted the glossary-standalone branch August 18, 2026 09:17
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