original_docstring: Replaces multiple stopwords with single stopwords.
docstring: Replaces multiple stopwords with single stopwords.
docstring_tokens: Replaces multiple stopwords with single stopwords .
code: def replace_multiple_stopwords(text):
      """Replaces multiple stopwords with single stopwords."""
  
      # If text is empty, return None.
      if not text: return None
      # If texts is tokenized, merge tokens.
      if is_tokenized(text):
          was_tokenized = True
          normalized_text = merge_tokens(text)
      else:
          was_tokenized = False
          normalized_text = text
      # Replaces apostrophe pattern with '.
      normalized_text = sub('[.!?]+', _get_single_match, normalized_text)
      # Strip text.
      normalized_text = normalized_text.strip()
      # If was tokenized, re-tokenize text.
      if was_tokenized:
          normalized_text = word_tokenize(normalized_text)
      # Return normalized text.
      return normalized_text
code_tokens: def replace_multiple_stopwords ( text ) : if not text : return None if is_tokenized ( text ) : was_tokenized = True normalized_text = merge_tokens ( text ) else : was_tokenized = False normalized_text = text normalized_text = sub ( '[.!?]+' , _get_single_match , normalized_text ) normalized_text = normalized_text . strip ( ) if was_tokenized : normalized_text = word_tokenize ( normalized_text ) return normalized_text
short_docstring: Replaces multiple stopwords with single stopwords.
short_docstring_tokens: Replaces multiple stopwords with single stopwords .
comment: """Replaces multiple stopwords with single stopwords."""$SEP$# If text is empty, return None.$SEP$# If texts is tokenized, merge tokens.$SEP$# Replaces apostrophe pattern with '.$SEP$# Strip text.$SEP$# If was tokenized, re-tokenize text.$SEP$# Return normalized text.