original_docstring: Take the vector sum of all tokens in each tweet
  
      Args:
          tweets: All tweets
          p2v: Phrase2Vec model
  
      Returns:
          Average vectors for each tweet
          Truth
      
docstring: Take the vector sum of all tokens in each tweet
docstring_tokens: Take the vector sum of all tokens in each tweet
code: def prepare_tweet_vector_averages(tweets, p2v):
      """Take the vector sum of all tokens in each tweet
  
      Args:
          tweets: All tweets
          p2v: Phrase2Vec model
  
      Returns:
          Average vectors for each tweet
          Truth
      """
      tokenizer = tk.TweetTokenizer(preserve_case=False, reduce_len=True, strip_handles=True)
  
      avg_vecs = list()
      y = list()
  
      for tweet in tweets:
          tokens = tokenizer.tokenize(tweet.text)
          avg_vecs.append(np.sum([p2v[x] for x in tokens], axis=0) / len(tokens))
          y.append(tweet.label)
  
      return avg_vecs, y
code_tokens: def prepare_tweet_vector_averages ( tweets , p2v ) : tokenizer = tk . TweetTokenizer ( preserve_case = False , reduce_len = True , strip_handles = True ) avg_vecs = list ( ) y = list ( ) for tweet in tweets : tokens = tokenizer . tokenize ( tweet . text ) avg_vecs . append ( np . sum ( [ p2v [ x ] for x in tokens ] , axis = 0 ) / len ( tokens ) ) y . append ( tweet . label ) return avg_vecs , y
short_docstring: Take the vector sum of all tokens in each tweet
short_docstring_tokens: Take the vector sum of all tokens in each tweet
comment: """Take the vector sum of all tokens in each tweet
  
      Args:
          tweets: All tweets
          p2v: Phrase2Vec model
  
      Returns:
          Average vectors for each tweet
          Truth
      """