title: Generating text features with spacy consumes too much time
body: <p>I am extracting text features like noun count from text. The following function is consuming too much time. How can I optimize this?</p>
  
  <pre><code>import spacy
  nlp = spacy.load('en')
  
  def get_numeric_features(df):    
  
      df['NOUN_COUNT'] = df.apply(lambda x: len([token.pos_ for token in nlp(x['TITLE_TEXT']) if token.pos_ == 'NOUN']),axis=1)
  
      return df
  
  start = time.time()
  df1 = get_numeric_features(df1)
  end = time.time()
  print(end - start)
  
  df1.head()
  </code></pre>
  
  <p>Time it took (around 23 mins for 130000 rows) </p>
  
  <pre><code>1415.4789326190948
  </code></pre>