Skip to content

Instantly share code, notes, and snippets.

@erochest
Created May 7, 2012 15:57
Show Gist options
  • Save erochest/2628628 to your computer and use it in GitHub Desktop.
Save erochest/2628628 to your computer and use it in GitHub Desktop.
Interaction while testing https://gist.github.com/2627485
user=> (defn test-m [stemmer] [stemmer (m stemmer) (m2 stemmer)])
#'user/test-m
user=> (-> (make-stemmer "ba") test-m)
[{:word [\b \a], :index 1} 0 0]
user=> (-> (make-stemmer "bava") test-m)
[{:word [\b \a \v \a], :index 3} 1 0]
user=> (-> (make-stemmer "baba") test-m)
[{:word [\b \a \b \a], :index 3} 1 0]
user=> (-> (make-stemmer "bababa") test-m)
[{:word [\b \a \b \a \b \a], :index 5} 2 0]
user=> (-> (make-stemmer "babababa") test-m)
[{:word [\b \a \b \a \b \a \b \a], :index 7} 3 0]
user=> (-> (make-stemmer "bababababa") test-m)
[{:word [\b \a \b \a \b \a \b \a \b \a], :index 9} 4 0]
user=> (-> (make-stemmer "bababbababa") test-m)
[{:word [\b \a \b \a \b \b \a \b \a \b \a], :index 10} 4 1]
user=> (-> (make-stemmer "bababbabbaba") test-m)
[{:word [\b \a \b \a \b \b \a \b \b \a \b \a], :index 11} 4 2]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment