Skip to content
Myr

Accented character normalization for Vietnamese characters (#2090)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Fix #2088

authored by Khon Trieu · committed by GitHub · parent 3e36f2b · Browse files · 1 file+68 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+68 added−0 removed

  • other:+68 added−0 removed

1 file+68 added−0 removed

modified:src/algo/normalize.go+68 added
403 unmodified lines
404 0x0178: 'Y', // WITH DIAERESIS, LATIN CAPITAL LETTER405 0x024E: 'Y', // WITH STROKE, LATIN CAPITAL LETTER406 0x028F: 'Y', // , LATIN LETTER SMALL CAPITAL407 0x1D22: 'Z', // , LATIN LETTER SMALL CAPITAL408409 'Ắ': 'A',410 'Ấ': 'A',411 'Ằ': 'A',412 'Ầ': 'A',413 'Ẳ': 'A',414 'Ẩ': 'A',415 'Ẵ': 'A',416 'Ẫ': 'A',417 'Ặ': 'A',418 'Ậ': 'A',419420 'ắ': 'a',421 'ấ': 'a',422 'ằ': 'a',423 'ầ': 'a',424 'ẳ': 'a',425 'ẩ': 'a',426 'ẵ': 'a',427 'ẫ': 'a',428 'ặ': 'a',429 'ậ': 'a',430431 'Ế': 'E',432 'Ề': 'E',433 'Ể': 'E',434 'Ễ': 'E',435 'Ệ': 'E',436437 'ế': 'e',438 'ề': 'e',439 'ể': 'e',440 'ễ': 'e',441 'ệ': 'e',442443 'Ố': 'O',444 'Ớ': 'O',445 'Ồ': 'O',446 'Ờ': 'O',447 'Ổ': 'O',448 'Ở': 'O',449 'Ỗ': 'O',450 'Ỡ': 'O',451 'Ộ': 'O',452 'Ợ': 'O',453454 'ố': 'o',455 'ớ': 'o',456 'ồ': 'o',457 'ờ': 'o',458 'ổ': 'o',459 'ở': 'o',460 'ỗ': 'o',461 'ỡ': 'o',462 'ộ': 'o',463 'ợ': 'o',464465 'Ứ': 'U',466 'Ừ': 'U',467 'Ử': 'U',468 'Ữ': 'U',469 'Ự': 'U',470471 'ứ': 'u',472 'ừ': 'u',473 'ử': 'u',474 'ữ': 'u',475 'ự': 'u',476}477478// NormalizeRunes normalizes latin script letters479func NormalizeRunes(runes []rune) []rune {
13 unmodified lines