Skip to content

Morphology-aware Find & Replace for Malayalam (mlmorph integration) #178

@stultus

Description

@stultus

What

Make Find & Replace understand Malayalam morphology. Search രമേശ്, find every inflected form (രമേശന്റെ, രമേശിനെ, രമേശിനോട്, …). Replace with സുരേഷ് and have all 14+ inflections re-conjugate correctly to സുരേഷിന്റെ, സുരേഷിനെ, etc.

Why this matters

Renaming a Malayalam character today is a manual hunt-and-peck. The writer has to think of every grammatical case the name takes (genitive, dative, accusative, sociative, locative…) and edit each form. A 90-page screenplay can have 50+ inflected variants of a single character name.

Every screenwriting tool (Final Draft, WriterDuet, Highland, Fade In) treats inflected forms as different strings. No tool, in any language tradition, does this for screenplays. Doing it for Malayalam first is a unique-to-Scriptty win.

Dependency

Depends on the mlmorph FST integration (separate effort — pure-Rust port of SFST runtime + bundling malayalam.a). Once mlmorph runs, both the analyzer (find inflections) and the generator (re-conjugate replacement) become available.

Technical sketch

  • Find: query mlmorph::analyze(target) to get the lemma + tag set. Walk the doc, run mlmorph::analyze on each Malayalam token, match by lemma. Highlight all matches.
  • Replace: for each match, get the original tag set, then mlmorph::generate(replacement_lemma + tags) to produce the correctly-inflected form. Confirm dialog before bulk-applying so the writer sees the conjugation table.
  • UI: extend the existing FindReplaceBar with a "Match all forms" toggle (only enabled when in Malayalam mode and the search term parses as a known lemma).

Out of scope

English morphology. English F&R already works because English barely inflects.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions