Text::...acritic(3pm)

πŸ’– NAME πŸ’–

Text::Undiacritic β€” bestie, it literally just removes diacritics from a string. That's the whole vibe. No cap. ✨

This page lives in the manual as Text::...acritic(3pm), iykyk. πŸŽ€


🌸 VERSION 🌸

This doc is describing Text::Undiacritic 0.01. Yes, 0.01. Baby module. Main character origin story. πŸ‘‘


✨ SYNOPSIS ✨

use Text::Undiacritic qw(undiacritic);
$ascii_string = undiacritic( $czech_string );

That's it. That's the whole thing. Two lines and you're slaying. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

So here's the tea: it takes characters that have diacritics and turns them into their base characters. Simple, clean, iconic.

But wait, there's more πŸ‘€ β€” it also converts things into their base character in the cases where UNICODE straight up does not give you a decomposition. UNICODE really said "no ✨ for you" and this module said "bet, I'll handle it myself."

E.g. all those characters '... WITH STROKE' like 'LATIN SMALL LETTER L WITH STROKE' have no decomposition at all. In that case the result will be 'LATIN SMALL LETTER L'. So your strokey little L just becomes a regular L. Lowkey beautiful. πŸ₯Ή

And why do you even care? Because removing diacritics is useful for matching text independent of spelling variants. Fr fr. Search that doesn't ghost you just because someone typed a č instead of a c. πŸ’–


πŸŽ€ SUBROUTINES/METHODS πŸŽ€

undiacritic

$ascii_string = undiacritic( $characters );

Removes diacritics from $characters and hands you back a simplified character string. Glow-up complete. 🌈

Heads up bestie: the input string must be in character modus, i.e. UNICODE code points. Give it bytes and it's giving chaos, not results. 😭

🩺 DIAGNOSTICS 🩺

Nothing here. Empty. A whole section with zero content. It's giving "we left the group chat on read." πŸ’€


βš™οΈ CONFIGURATION AND ENVIRONMENT βš™οΈ

Also empty. No config, no env vars, no nothing. The module is self-sufficient. Independent queen. πŸ‘‘


🧚 DEPENDENCIES 🧚

It needs its little friends:

  • version
  • charnames
  • Unicode::Normalize

Squad goals. 🫢


🚫 INCOMPATIBILITIES 🚫

Nothing listed. Zero beef. Peace and love. ✌️🌸


⚠️ BUGS AND LIMITATIONS ⚠️

There is no experience if this module gives useful results for scripts other than Latin. That's it. That's the limitation. Latin only, bestie β€” don't roll up with your other scripts expecting miracles. πŸ™ˆ


πŸ’œ AUTHOR πŸ’œ

Helmut Wollmersdorfer "<WOLLMERS@cpan.org>" β€” the icon who wrote this. Shoutout. πŸ“£


Copyright (c) 2007, Helmut Wollmersdorfer "<WOLLMERS@cpan.org>". All rights reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. So go wild, legally. πŸ’–


Okay and for the cute sign-off: this whole thing is perl v5.36.0 flavored, dated 2023-02-05, and it lives in the manual as Text::...acritic(3pm). Bye bestie, go undiacritic something gorgeous. πŸ’…βœ¨πŸŽ€

πŸ“¦ where this page comes from