Return a plural noun.

    >>> mock_random.seed(0)
    >>> plural(random=mock_random)
    'onions'
    >>> plural(random=mock_random, capitalize=True)
    'Chimps'
    >>> plural(random=mock_random, slugify=True)
    'blisters'
543834
def plural(random=random, *args, **kwargs):
    
    return inflectify.plural(random.choice(nouns))
1361427
function translate(singular, plural) {
    if (!locales[currentLocale]) {
        read(currentLocale);
    }

    if (plural) {
        if (!locales[currentLocale][singular]) {
            locales[currentLocale][singular] = {
                'one': singular,
                'other': plural
            };
            write(currentLocale);
        }
    }

    if (!locales[currentLocale][singular]) {
        locales[currentLocale][singular] = singular;
        write(currentLocale);
    }
    return locales[currentLocale][singular];
}
649430
def _Pluralize(value, unused_context, args):
    """"""
    
    if len(args) == 0:
        s, p = '', 's'
    elif len(args) == 1:
        s, p = '', args[0]
    elif len(args) == 2:
        s, p = args
    else:
        # Should have been checked at compile time
        raise AssertionError
    
    if value > 1:
        return p
    else:
        return s
823614
public function plural_name()
    {
        $base = in_array(static::class, [Page::class, self::class]);
        if ($base) {
            return $this->config()->get('base_plural_name');
        }
        return parent::plural_name();
    }
417975
public static function pluralize($word)
    {
        $plural = array(
        '/(quiz)$/i' => '\1zes',
        '/^(ox)$/i' => '\1en',
        '/([m|l])ouse$/i' => '\1ice',
        '/(matr|vert|ind)ix|ex$/i' => '\1ices',
        '/(x|ch|ss|sh)$/i' => '\1es',
        '/([^aeiouy]|qu)ies$/i' => '\1y',
        '/([^aeiouy]|qu)y$/i' => '\1ies',
        '/(hive)$/i' => '\1s',
        '/(?:([^f])fe|([lr])f)$/i' => '\1\2ves',
        '/sis$/i' => 'ses',
        '/([ti])um$/i' => '\1a',
        '/(buffal|tomat)o$/i' => '\1oes',
        '/(bu)s$/i' => '\1ses',
        '/(alias|status)/i'=> '\1es',
        '/(octop|vir)us$/i'=> '\1i',
        '/(ax|test)is$/i'=> '\1es',
        '/s$/i'=> 's',
        '/$/'=> 's');

        $uncountable = array('equipment', 'information', 'rice', 'money', 'species', 'series', 'fish', 'sheep');

        $irregular = array(
        'person' => 'people',
        'man' => 'men',
        'child' => 'children',
        'sex' => 'sexes',
        'move' => 'moves');

        $lowercased_word = strtolower($word);

        foreach ($uncountable as $_uncountable) {
            if (substr($lowercased_word, (-1 * strlen($_uncountable))) == $_uncountable)
                return $word;
        }

        foreach ($irregular as $_plural=> $_singular) {
            if (preg_match('/('.$_plural.')$/i', $word, $arr)) {
                return preg_replace('/('.$_plural.')$/i', substr($arr[0], 0, 1) . substr($_singular, 1), $word);
            }
        }

        foreach ($plural as $rule => $replacement) {
            if (preg_match($rule, $word)) {
                return preg_replace($rule, $replacement, $word);
            }
        }
        return false;

    }
991225
def rule_factory(plural, singular):
    """"""
    @rules.rule(plural)
    def f(path, values):
        for v in values:
            if v:
                elem = etree.Element(
                    '{{http://purl.org/dc/elements/1.1/}}{0}'.format(singular))
                elem.text = v
                yield elem
    f.__name__ = plural
    return f
219877
function pluralize(word, count, inclusive) {
        var pluralized = count === 1
            ? pluralize.singular(word) : pluralize.plural(word);
        return (inclusive ? count + ' ' : '') + pluralized;
    }
407331
static function plural($string) {
		$plural = array(
			array('/(quiz)$/i', "$1zes"),
			array('/^(ox)$/i', "$1en"),
			array('/([m|l])ouse$/i', "$1ice"),
			array('/(matr|vert|ind)ix|ex$/i', "$1ices"),
			array('/(x|ch|ss|sh)$/i', "$1es"),
			array('/([^aeiouy]|qu)y$/i', "$1ies"),
			array('/([^aeiouy]|qu)ies$/i', "$1y"),
			array('/(hive|move)$/i', "$1s"),
			array('/(?:([^f])fe|([lr])f)$/i', "$1$2ves"),
			array('/sis$/i', "ses"),
			array('/([ti])um$/i', "$1a"),
			array('/(buffal|tomat)o$/i', "$1oes"),
			array('/(bu)s$/i', "$1ses"),
			array('/(alias|status|campus)$/i', "$1es"),
			array('/(octop|cact|vir)us$/i', "$1i"),
			array('/(ax|test)is$/i', "$1es"),
			array('/^(m|wom)an$/i', "$1en"),
			array('/(child)$/i', "$1ren"),
			array('/(p)erson$/i', "$1eople"),
			array('/s$/i', "s"),
			array('/$/', "s")
		);

		$words = self::getWords($string);
		$word = array_pop($words);

		// check for matches using regular expressions
		foreach ($plural as &$pattern) {
			if (preg_match($pattern[0], $word)) {
				$prefix = substr($string, 0, strrpos($string, $word));
				return $prefix . preg_replace($pattern[0], $pattern[1], $word);
			}
		}
		return $string . 's';
	}
858537
def get_kind_name_plural(kind):
        ""
        if kind in ['comedy', 'cinema', 'dance', 'theatre']:
            return kind.title()
        elif kind == 'museum':
            return 'Galleries/Museums'
        else:
            return '{}s'.format(Event.get_kind_name(kind))
957982
def defadj(self, singular, plural):
        
        self.checkpat(singular)
        self.checkpatplural(plural)
        self.pl_adj_user_defined.extend((singular, plural))
        return 1
1293804
public String pluralize(String word, int number) {
    if (number == 1) { return word; }
    Matcher matcher = pattern.matcher(word);
    if (matcher.matches()) {
      String pre = matcher.group(1);
      String trimmedWord = matcher.group(2);
      String post = matcher.group(3);
      String plural = pluralizeInternal(trimmedWord);
      if (plural == null) { return fallbackPluralizer.pluralize(word, number); }
      return pre + postProcess(trimmedWord, plural) + post;
    }
    return word;
  }
28243
def articles(self):
		'''  '''

		result = [None, None]
		element = self._first('NN')
		if element:
			element = element.split('\r\n')[0]
			if ' | ' in element:
				# This means there is a plural
				singular, plural = element.split(' | ')
				singular, plural = singular.strip(), plural.strip()
			else:
				# This means there is no plural
				singular, plural = element.strip(), ''
				result[1] = ''
			if singular:
				result[0] = singular.split(' ')[0].split('/')
			if plural:
				result[1] = plural.split(' ')[0].split('/')
		return result
905792
def random_word(self, *args, **kwargs):
        
        word = ""
        current = (">", 0)
        while current[0] != "<":
            choices = self[current]
            choice = random_weighted_choice(choices)
            current = choice
            word += current[0][-1]
        return word[:-1]
1204126
def random_word(size=6):
	
	words = shutit_assets.get_words().splitlines()
	word = ''
	while len(word) != size or "'" in word:
		word = words[int(random.random() * (len(words) - 1))]
	return word.lower()
1341445
def lazy_gettext(self, singular, plural=None, n=1, locale=None) -> LazyProxy:
        
        return LazyProxy(self.gettext, singular, plural, n, locale)
378505
def plural_fmt(name, cnt):
        
        if cnt == 1:
            return '{} {}'.format(cnt, name)
        else:
            return '{} {}s'.format(cnt, name)
1026919
def domain(random=random, *args, **kwargs):
    
    words = random.choice([
        noun(random=random),
        thing(random=random),
        adjective(random=random)+noun(random=random),
    ])
    return _slugify(words)+tld(random=random)