Skip to content

Instantly share code, notes, and snippets.

@sorenmacbeth
Created November 4, 2011 22:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sorenmacbeth/1340642 to your computer and use it in GitHub Desktop.
Save sorenmacbeth/1340642 to your computer and use it in GitHub Desktop.
a stateful defmapcatop
(defmapcatop tokenize-string {:stateful true}
([] (load-analyzer StandardAnalyzer/STOP_WORDS_SET))
([analyzer text]
(emit-tokens (tokenize-text analyzer text)))
([analyzer] nil))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment