Skip to content

PartialFinal fuzzy matching does not work for syllables with initials (e.g. go → gou/gong) #136

Description

@Hendrix4858

With PartialFinal enabled:

o -> o / ou / ong

works as expected.

However:

go

is parsed as g + o, producing candidates like 干呕 instead of matching gou (狗, 够) or gong (工, 公).

The same issue also affects inputs such as do, to, no, etc.

From debugging, it seems there are two reasons:

longestMatch() falls back to parsing go as g + o.
getFuzzy() applies PartialFinal only to PinyinInitial::Zero, so o can expand to ou/ong, but go cannot expand to gou/gong.

I think PartialFinal should also work for syllables with initials.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions