]> gitweb.factorcode.org Git - factor.git/commitdiff
suffix-arrays.words: removing, not that useful.
authorJohn Benediktsson <mrjbq7@gmail.com>
Sat, 16 Apr 2016 16:17:05 +0000 (09:17 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Sat, 16 Apr 2016 16:17:05 +0000 (09:17 -0700)
basis/suffix-arrays/words/words.factor [deleted file]

diff --git a/basis/suffix-arrays/words/words.factor b/basis/suffix-arrays/words/words.factor
deleted file mode 100644 (file)
index 5089986..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-! Copyright (C) 2008 Marc Fauconneau.
-! See http://factorcode.org/license.txt for BSD license.
-USING: kernel arrays math accessors sequences math.vectors
-math.order sorting binary-search sets assocs fry suffix-arrays ;
-IN: suffix-arrays.words
-
-! to search on word names
-
-: new-word-sa ( words -- sa )
-    [ name>> ] map >suffix-array ;
-
-: name>word-map ( words -- map )
-    dup [ name>> V{ } clone ] H{ } map>assoc
-    [ '[ dup name>> _ at push ] each ] keep ;
-
-: query-word-sa ( map begin sa -- matches ) query '[ _ at ] map concat ;
-
-! usage example :
-! clear all-words 100 head dup name>word-map "test" rot new-word-sa query .