Return the plural of text.

        If count supplied, then return text if count is one of:
            1, a, an, one, each, every, this, that
        otherwise return the plural.

        Whitespace at the start and end is preserved.
173042
def plural(self, text, count=None):
        
        pre, word, post = self.partition_word(text)
        if not word:
            return text
        plural = self.postprocess(
            word,
            self._pl_special_adjective(word, count)
            or self._pl_special_verb(word, count)
            or self._plnoun(word, count),
        )
        return "{}{}{}".format(pre, plural, post)
1127188
def ngettext(self, singular, plural, num, domain=None, **variables):
        
        variables.setdefault('num', num)
        t = self.get_translations(domain)
        return t.ungettext(singular, plural, num) % variables
362410
def defnoun(self, singular, plural):
        
        self.checkpat(singular)
        self.checkpatplural(plural)
        self.pl_sb_user_defined.extend((singular, plural))
        self.si_sb_user_defined.extend((plural, singular))
        return 1
155086
function fmtLong(ms) {
  var msAbs = Math.abs(ms);
  if (msAbs >= d) {
    return plural(ms, msAbs, d, 'day');
  }
  if (msAbs >= h) {
    return plural(ms, msAbs, h, 'hour');
  }
  if (msAbs >= m) {
    return plural(ms, msAbs, m, 'minute');
  }
  if (msAbs >= s) {
    return plural(ms, msAbs, s, 'second');
  }
  return ms + ' ms';
}
1210282
def plural(self):
		'''  '''

		element = self._first('NN')
		if element:
			if 'kein Plur' in element:
				# There is no plural
				return ['']
			if re.search(', ([\w|\s|/]+)>', element, re.U):
				# Plural form is provided
				return re.findall(', ([\w|\s|/]+)>', element, re.U)[0].split('/')
			if re.search(', -(\w+)>', element, re.U):
				# Suffix is provided
				suffix = re.findall(', -(\w+)>', element, re.U)[0]
				return [self.word + suffix]
			if element.endswith('->'):
				# Plural is the same as singular
				return [self.word]
		return [None]
58652
def gettext(self, singular, plural=None, n=1, locale=None) -> str:
        
        if locale is None:
            locale = self.ctx_locale.get()

        if locale not in self.locales:
            if n is 1:
                return singular
            else:
                return plural

        translator = self.locales[locale]

        if plural is None:
            return translator.gettext(singular)
        else:
            return translator.ngettext(singular, plural, n)
1156350
def pluralize(item):
        
        assert isinstance(item, (int, list))
        if isinstance(item, int):
            return 's' if item > 1 else ''
        if isinstance(item, list):
            return 's' if len(item) > 1 else ''
        return ''
585783
def one_or_more(e, delimiter=None):
    
    if delimiter is None:
        delimiter = lambda s, grm, pos: (s, Ignore, (pos, pos))
    msg = 'Expected one or more of: {}'.format(repr(e))
    def match_one_or_more(s, grm=None, pos=0):
        start = pos
        s, obj, span = e(s, grm, pos)
        pos = span[1]
        data = [] if obj is Ignore else [obj]
        try:
            while True:
                s, obj, span = delimiter(s, grm, pos)
                pos = span[1]
                if obj is not Ignore:
                    data.append(obj)
                s, obj, span = e(s, grm, pos)
                pos = span[1]
                if obj is not Ignore:
                    data.append(obj)
        except PegreError:
            pass
        return PegreResult(s, data, (start, pos))
    return match_one_or_more
326401
def _num_plurals(self, catalogue):
        
        match = re.search(r'nplurals=\s*(\d+)', self.get_plural(catalogue) or '')
        if match:
            return int(match.groups()[0])
        return 2
233952
def as_plural(result_key):
    
    # Not at all guaranteed to work in all cases...
    if result_key.endswith('y'):
        return re.sub("y$", "ies", result_key)
    elif result_key.endswith('address'):
        return result_key + 'es'
    elif result_key.endswith('us'):
        return re.sub("us$", "uses", result_key)
    elif not result_key.endswith('s'):
        return result_key + 's'
    else:
        return result_key
881013
def wordcount(text):
    ''''''
    bannedwords = read_file('stopwords.txt')
    wordcount = {}
    separated = separate(text)
    for word in separated:
        if word not in bannedwords:
            if not wordcount.has_key(word):
                wordcount[word] = 1
            else:
                wordcount[word] += 1
    return wordcount
1031156
def matches(text, what):
    '''
    
    
    '''
    return text.find(what) > -1 if is_string(what) else what.match(text)
758105
def npgettext(self, context, singular, plural, num, domain=None, **variables):
        """"""
        variables.setdefault('num', num)
        t = self.get_translations(domain)
        return t.unpgettext(context, singular, plural, num) % variables
1058526
def pluralize(locale, entry, count)
      return entry unless entry.is_a?(Hash) and count
      key = :zero if count == 0 && entry.has_key?(:zero)
      key ||= count <= 1 ? :one : :other
      raise InvalidPluralizationData.new(entry, count) unless entry.has_key?(key)
      entry[key]
    end
1145426
def space():
    ''''''
    @Parser
    def space_parser(text, index=0):
        if index < len(text) and text[index].isspace():
            return Value.success(index + 1, text[index])
        else:
            return Value.failure(index, 'one space')
    return space_parser
1102111
public static function plural($value, $count = 2)
	{
		if ($count == 1) return $value;

		// First we'll check the cache of inflected values. We cache each word that
		// is inflected so we don't have to spin through the regular expressions
		// on each subsequent method calls for this word by the app developer.
		if (isset(static::$pluralCache[$value]))
		{
			return static::$pluralCache[$value];
		}

		$irregular = array_flip(static::$irregular);

		// When doing the singular to plural transformation, we'll flip the irregular
		// array since we need to swap sides on the keys and values. After we have
		// the transformed value we will cache it in memory for faster look-ups.
		$plural = static::$plural;

		$result = static::inflect($value, $plural, $irregular);

		return static::$pluralCache[$value] = $result;
	}
378505
def plural_fmt(name, cnt):
        
        if cnt == 1:
            return '{} {}'.format(cnt, name)
        else:
            return '{} {}s'.format(cnt, name)