]> gitweb.factorcode.org Git - factor.git/commitdiff
porter-stemmer: use zip.
authorJohn Benediktsson <mrjbq7@gmail.com>
Fri, 19 Jan 2018 20:13:58 +0000 (12:13 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Fri, 19 Jan 2018 20:13:58 +0000 (12:13 -0800)
basis/porter-stemmer/porter-stemmer-tests.factor

index 041c177fcedcd981e09efc2618984696b31ed4ed..c30335b1e84b1e1f74e482eca38df06db9fc39c6 100644 (file)
@@ -1,6 +1,6 @@
 IN: porter-stemmer.tests
-USING: arrays io kernel porter-stemmer sequences tools.test
-io.files io.encodings.utf8 ;
+USING: arrays assocs io kernel porter-stemmer sequences
+tools.test io.files io.encodings.utf8 ;
 
 { 0 } [ "xa" consonant-seq ] unit-test
 { 0 } [ "xxaa" consonant-seq ] unit-test
@@ -60,5 +60,5 @@ io.files io.encodings.utf8 ;
     "vocab:porter-stemmer/test/voc.txt" utf8 file-lines
     [ stem ] map
     "vocab:porter-stemmer/test/output.txt" utf8 file-lines
-    [ 2array ] 2map [ first2 = ] reject
+    zip [ = ] assoc-reject
 ] unit-test