<commit_before><?php
namespace C5TL;

/**
 * Variuos gettext-related helper functions
 */
class Gettext
{
    /**
     * Returns the plural rule for a specific locale
     * @param string $locale The locale identifier
     * @return string
     * @throws \Exception Throws an \Exception if $locale is not a valid locale identifier of if something else goes wrong
     */
    public static function getPluralRule($locale)
    {
        static $cache;
        if (!is_array($cache)) {
            $cache = array();
        }
        if (!array_key_exists($locale, $cache)) {
            try {
                $tempDirectory = \C5TL\Options::getTemporaryDirectory();<commit_msg>Add link to gettext plural rules<commit_after><?php
namespace C5TL;

/**
 * Variuos gettext-related helper functions
 */
class Gettext
{
    /**
     * Returns the plural rule for a specific locale
     * @param string $locale The locale identifier
     * @return string
     * @throws \Exception Throws an \Exception if $locale is not a valid locale identifier of if something else goes wrong
     * @link http://git.savannah.gnu.org/cgit/gettext.git/tree/gettext-tools/src/plural-table.c
     */
    public static function getPluralRule($locale)
    {
        static $cache;
        if (!is_array($cache)) {
            $cache = array();
        }
        if (!array_key_exists($locale, $cache)) {
            try {
                $tempDirectory = \C5TL\Options::getTemporaryDirectory();
{'fraction_non_alphanumeric': 0.10511945392491467, 'fraction_numerical': 0.0027303754266211604, 'mean_word_length': 2.465721040189125, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6765483', 'n_tokens_mistral': 406, 'n_tokens_neox': 403, 'n_words': 126}