Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
21
Task/Soundex/PicoLisp/soundex-1.l
Normal file
21
Task/Soundex/PicoLisp/soundex-1.l
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
(de soundex (Str)
|
||||
(pack
|
||||
(pad -4
|
||||
(cons
|
||||
(uppc (char (char Str)))
|
||||
(head 3
|
||||
(let Last NIL
|
||||
(extract
|
||||
'((C)
|
||||
(and
|
||||
(setq C
|
||||
(case (uppc C)
|
||||
(`(chop "BFPV") "1")
|
||||
(`(chop "CGJKQSXZ") "2")
|
||||
(("D" "T") "3")
|
||||
("L" "4")
|
||||
(("M" "N") "5")
|
||||
("R" "6") ) )
|
||||
(<> Last C)
|
||||
(setq Last C) ) )
|
||||
(cdr (chop Str)) ) ) ) ) ) ) )
|
||||
27
Task/Soundex/PicoLisp/soundex-2.l
Normal file
27
Task/Soundex/PicoLisp/soundex-2.l
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
(de soundex (Str)
|
||||
(let (Str (chop Str) Last)
|
||||
(pack
|
||||
(pad
|
||||
-4
|
||||
(cons
|
||||
(uppc (car Str))
|
||||
(head
|
||||
3
|
||||
(filter
|
||||
gt0
|
||||
(cdr
|
||||
(mapcar
|
||||
'((C)
|
||||
(and
|
||||
(setq C
|
||||
(case (uppc C)
|
||||
(`(chop "AEIOUY") 0)
|
||||
(`(chop "BFPV") 1)
|
||||
(`(chop "CGJKQSXZ") 2)
|
||||
(("D" "T") 3)
|
||||
("L" 4)
|
||||
(("M" "N") 5)
|
||||
("R" 6) ) )
|
||||
(<> Last C)
|
||||
(setq Last C) ) )
|
||||
Str ) ) ) ) ) ) ) ) )
|
||||
Loading…
Add table
Add a link
Reference in a new issue