Meridian Line's crew files deck and engine-room reports in English, Tagalog, and Mandarin, and each report can contain a crew member's name written in that language's own script. A regex-based PII masking function tuned for English name patterns is missing most of the non-English names. What is the better approach?
Select an answer to reveal the explanation.
Short Explanation
You can’t fix a regex that misses names in other scripts just by adding more English name patterns. A language-aware entity-recognition step can identify names across the languages and scripts before masking them.
Full Explanation
English-tuned regular expressions rely on surface patterns such as familiar spelling, capitalization, and name lists, which do not reliably capture names written in other scripts or following other naming conventions. A language-aware named-entity recognition step is the better fit because it identifies person names across the languages and scripts in the reports before masking, rather than relying on English-specific patterns. Adding more English name patterns still does not address names outside those patterns. Translating every report into English first introduces dependence on translation quality: a name may be mistranslated or rendered in a form the existing regex does not recognize, while adding an unnecessary step when multilingual recognition can work on the source text. Masking only names transliterated into familiar English spelling leaves native-script names exposed; reviewers’ ability to infer identity from context does not protect those names. Exam caveat: language-aware recognition should be checked against the languages and scripts actually present, since recognition quality can vary. Practical check: test representative reports in English, Tagalog, and Mandarin, including names written in each language’s own script, and confirm that the names are detected before masking.