Anonymous user
NYSIIS: Difference between revisions
m
Allow for small suffix/honours list (too large otherwise)
m (Modified task description for clarity) |
m (Allow for small suffix/honours list (too large otherwise)) |
||
Line 5:
The task here is to implement the original NYSIIS algorithm, shown in Wikipedia, rather than any other subsequent modification. Also, before the algorithm is applied the input string should be converted to upper case with all white space removed.
An optional step is to handle multiple names, including double-barrelled names or double
;See also
Line 78:
// translate first characters of name:
// => MAC->MCC, KN->N, K->C, PH/PF->FF, SCH->SSS
For rule="^MAC->MCC", "^KN->N", "^K->C", "^(PH|PF)->FF", "^SCH->SSS" {
Set rem.Pattern=$Piece(rule, "->")
If rem.Locate() Set rem.Text=rem.ReplaceFirst($Piece(rule, "->", 2)) Quit
|