title: defined function got an unexpected keyword argument
body: <p>I've got a problem with this line:</p>
  
  <pre><code>processed = process(cleaned, lemmatizer=nltk.stem.wordnet.WordNetLemmatizer());
  </code></pre>
  
  <p>Why is the unexpected keyword argument popping up?</p>
  
  <pre><code>Error: TypeError: process() got an unexpected keyword argument 'lemmatizer'
  </code></pre>
  
  <p>Here is my code:</p>
  
  <pre><code>def process(text, filters=nltk.corpus.stopwords.words('english')):
  """ Normalizes case and handles punctuation
  Inputs:
      text: str: raw text
      lemmatizer: an instance of a class implementing the lemmatize() method
                  (the default argument is of type nltk.stem.wordnet.WordNetLemmatizer)
  Outputs:
      list(str): tokenized text
  """
  lemmatizer=nltk.stem.wordnet.WordNetLemmatizer()
  word_list = nltk.word_tokenize(text);
  
  lemma_list = [];
  for i in word_list:
      if i not in filters:
          try:
              lemma = lemmatizer.lemmatize(i);
              lemma_list.append(str(lemma));
          except:
              pass
  return " ".join(lemma_list)
  
  
  if __name__ == '__main__':
  #construct filter for processor
  file = open("accountant.txt").read().lower()
  filters = set(nltk.word_tokenize(file))
  filters.update(nltk.corpus.stopwords.words('english'))
  filters = list(filters)
  
  #webcrawling
  webContent = []
  dataJobs = pd.read_csv("test.csv");
  webContent = []
  for i in dataJobs["url"]:
      content = webCrawl(i);
      webContent.append(content);
  
  #clean the crawled text
  cleaned_list = []
  for j in webContent:
          cleaned = extractUseful(j);
          processed = process(cleaned, lemmatizer=nltk.stem.wordnet.WordNetLemmatizer());
          cleaned_list.append(processed)
  
  #save to csv
  contents = pd.DataFrame({ "Content":webContent, "Cleaned": cleaned_list})
  contents.to_csv("testwebcrawled.csv")
  
  
  dataJobs[['jd']]= cleaned_list
  dataJobs.to_csv("test_v2_crawled.csv")
  </code></pre>