Changeset 38333 in project


Ignore:
Timestamp:
03/24/20 02:46:51 (2 weeks ago)
Author:
Kon Lovett
Message:

explicit typing (TBD levenshtein-operators, levenshtein-distance/vector* - returns 1 or 2 values, what was i thinking?)

Location:
release/5/levenshtein/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • release/5/levenshtein/trunk/levenshtein-byte.scm

    r38328 r38333  
    22;;;; Kon Lovett, Mar '20
    33;;;; Kon Lovett, Apr '12
     4;;;; Kon Lovett, Sep '05
    45
    56(module levenshtein-byte
     
    1011(import scheme)
    1112(import (chicken base))
     13(import (chicken type))
    1214(import (chicken foreign))
    1315(import (chicken blob))
    1416(import type-errors)
    1517
     18
     19(define-type byte-sequence (or string blob))
     20
     21(: levenshtein-distance/byte (byte-sequence byte-sequence -> fixnum))
     22;
    1623(define (levenshtein-distance/byte s t)
    1724        (unless (or (string? s) (blob? s))
  • release/5/levenshtein/trunk/levenshtein-print.scm

    r38328 r38333  
    3030(: print-levenshtein-matrix (array -> void))
    3131(: print-levenshtein-matrix-slice (array fixnum fixnum fixnum fixnum -> void))
     32(: print-levenshtein-matrix-element ((or string (pair string strin)) -> void))
    3233
    3334;; SRFI-63 (from srfi-63.scm example)
     
    6667    (display (padded-string elm 15)) ) )
    6768
    68 #|
     69#| ;KRL's array-lib
    6970(use array-lib-hof format-modular levenshtein-vector)
    7071
  • release/5/levenshtein/trunk/levenshtein-transpose-byte.scm

    r38328 r38333  
    1111(import scheme)
    1212(import (chicken base))
     13(import (chicken type))
    1314(import (chicken foreign))
    1415(import (chicken blob))
    1516(import type-errors)
    1617
     18(define-type byte-sequence (or string blob))
     19
     20(: levenshtein-distance/transpose-byte (byte-sequence byte-sequence -> fixnum))
     21;
    1722(define (levenshtein-distance/transpose-byte s t)
    1823        (unless (or (string? s) (blob? s))
     
    2025        (unless (or (string? t) (blob? t))
    2126                (error-argument-type 'levenshtein-distance/transpose-byte t "string or blob" "target") )
    22   ((foreign-lambda* unsigned-int ((scheme-object os) (scheme-object ot))
    23 #<<EOF
     27  ((foreign-lambda* unsigned-int ((scheme-object os) (scheme-object ot)) #<<EOF
    2428
    2529/* The purpose; otherwise use levenshtein-distance/byte */
  • release/5/levenshtein/trunk/levenshtein-vector.scm

    r38328 r38333  
    1111(import scheme)
    1212(import (chicken base))
     13(import (chicken type))
    1314(import (chicken fixnum))
    1415(import (srfi 1))
     
    2223
    2324;;;
     25
     26;; Types
     27
     28;return 1 or 2 values!
     29#;(: levenshtein-distance/vector* (vector vector #!rest -> *))
    2430
    2531;;
  • release/5/levenshtein/trunk/levenshtein.egg

    r38329 r38333  
    33
    44( (synopsis "Levenshtein edit distance")
    5   (version "2.0.0")
     5  (version "2.0.1")
    66  (category data)
    77        (author "[[kon lovett]]")
Note: See TracChangeset for help on using the changeset viewer.