Skip to content

Instantly share code, notes, and snippets.

@SupermanScott
Created February 12, 2012 23:07
Show Gist options
  • Save SupermanScott/1811526 to your computer and use it in GitHub Desktop.
Save SupermanScott/1811526 to your computer and use it in GitHub Desktop.
for token in self.tokenizer(doc.get(field_name, '')):
original_word = token
for analyzer in self.analyzers:
token = analyzer(token)
processed_tokens[token] = processed_tokens.get(token, 0) + 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment