Skip to content

Preserve tokens and test W3C intent speech - #938

Open
Kostenkov-2021 wants to merge 5 commits into
daisy:mainfrom
Kostenkov-2021:General-intent-fixes
Open

Kostenkov-2021 wants to merge 5 commits into
daisy:mainfrom
Kostenkov-2021:General-intent-fixes

Conversation

@Kostenkov-2021

@Kostenkov-2021 Kostenkov-2021 commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Prevent wrapper cleanup from dropping split function names, correct the re definition, and add bilingual speech and navigation coverage for W3C calculus and general intents.

Related PR and CI status

Related to #939. These PRs split the common/English changes and bilingual W3C intent tests (#938) from the Russian rules and regression coverage (#939).

The bilingual tests in this PR require the Russian rule changes from #939. When the PRs are tested separately, missing counterpart changes can therefore cause CI failures. Validate the combined changes and rerun CI after integration.

There is also a separate blocker in #939: tests/Languages/ru/w3c_core_expected.tsv is referenced by a test but is missing from that PR. That fixture must be included before the combined test suite can pass.

@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Linux library size: 0.59 MiB (0.00%)
Revision Release liblibmathcat.so
Base (ec90375) 0.59 MiB (618,920 bytes)
PR (eb8b44b) 0.59 MiB (618,920 bytes)
Change 0 bytes (0.00%)

Built with default features, Rust 1.96.0, and Ubuntu 24.04. Workflow run.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand why you added these to the IntentMappings. These are defined elsewhere. Many of these are listed and commented out. Probably they should have a comment above them that says "speech rules defined elsehwere" for the commented out ones. For the others, commented out versions with the 'defined-elsewhere' comment should be added.

Comment thread tests/Languages/intent.rs

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like test_core_speech() because it is just ru and en. Once it is more than just en (which probably should only be used to make sure something that is language independent but currently is not that disiplined), this should be split so that it is in each language's directory.

For tests in the intent directory, the tests should not be testing the language speech, they should be testing what the mathml turned into in the intent tree. The speech for that should go into Languages/lang/intent.rs.

@NSoiffer

NSoiffer commented Nov 2, 2026

Copy link
Copy Markdown
Collaborator

I appreciate your contribution and catching the typo in definitions.yaml along the missing rules. Please take a look at my comments and refactor the tests.

Prevent wrapper cleanup from dropping split function names, correct the `re` definition, and add bilingual speech and navigation coverage for W3C calculus and general intents.
Map definite integrals, derivatives, blanks, and invisible operators to English speech, and support both W3C and inferred repeating-decimal intent forms.
Drop explicit mappings for blank, integral, derivative, and invisible MathML operators from the English definitions, along with obsolete commented calculus mappings.
Document which speech intents are handled by shared or style-specific rules, and clarify why their duplicate definitions remain commented out.
Move W3C intent speech coverage into English and Russian test suites, exercising both speech styles, all verbosity levels, and semantic navigation. Set a stable English language baseline in intent tests to avoid host-locale-dependent fixities.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

2 participants