Changeset 26554 in project


Ignore:
Timestamp:
04/23/12 02:02:20 (8 years ago)
Author:
Kon Lovett
Message:

vector support.

Location:
release/4/levenshtein/trunk
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • release/4/levenshtein/trunk/levenshtein.wiki

    r26552 r26554  
    111111==== levenshtein-distance/generic-string
    112112
    113 <procedure>(levenshtein-distance/generic-string SOURCE TARGET [#:insert-cost INSERT-COST] [#:delete-cost DELETE-COST] [#:substitute-cost SUBSTITUTE-COST] [#:=? EQ-PROC] [#:limit-cost LIMIT-COST] [#:numeric-means NUMERIC-MEANS] [#:string-means STRING-MEANS])</procedure>
     113<procedure>(levenshtein-distance/generic-string SOURCE TARGET [#:insert-cost INSERT-COST] [#:delete-cost DELETE-COST] [#:substitute-cost SUBSTITUTE-COST] [#:=? EQL] [#:limit-cost LIMIT-COST] [#:numeric-means NUMERIC-MEANS] [#:string-means STRING-MEANS])</procedure>
    114114
    115115Calculates the edit distance from the {{SOURCE}} to the {{TARGET}}.
     
    120120; DELETE-COST : A {{number}}. The edit cost of a delete, default {{1}}.
    121121; SUBSTITUTE-COST : A {{number}}. The edit cost of a substitute, default {{1}}.
    122 ; EQ-PROC : A {{procedure}}; {{(-> object object boolean)}}. The equality predicate, default {{char=?}}. Probably not useful to override the default predicate.
     122; EQL : A {{procedure}}; {{(-> object object boolean)}}. The equality predicate, default {{char=?}}. Probably not useful to override the default predicate.
    123123; LIMIT-COST : A {{number}} or {{#f}}. Limit edit distance calculation to cost, default {{#f}}. Number type must be compatible with the numeric-means.
    124124; NUMERIC-MEANS : A procedure-means. The arithmetic means, default {{levenshtein-fixnum-means}}.
     
    131131==== levenshtein-distance/generic-sequence
    132132
    133 <procedure>(levenshtein-distance/generic-sequence SOURCE TARGET [#:insert-cost INSERT-COST] [#:delete-cost DELETE-COST] [#:substitute-cost SUBSTITUTE-COST] [#:get-work-vector GET-WORK-VECTOR] [#:=? EQ-PROC] [#:limit-cost LIMIT-COST] [#:numeric-means NUMERIC-MEANS] [#:string-means STRING-MEANS])</procedure>
     133<procedure>(levenshtein-distance/generic-sequence SOURCE TARGET [#:insert-cost INSERT-COST] [#:delete-cost DELETE-COST] [#:substitute-cost SUBSTITUTE-COST] [#:get-work-vector GET-WORK-VECTOR] [#:eql EQL] [#:limit-cost LIMIT-COST] [#:numeric-means NUMERIC-MEANS] [#:string-means STRING-MEANS])</procedure>
    134134
    135135Calculates the edit distance from the {{SOURCE}} to the {{TARGET}}.
     
    142142; DELETE-COST : A {{number}}. The edit cost of a delete, default {{1}}.
    143143; SUBSTITUTE-COST : A {{number}}. The edit cost of a substitute, default {{1}}.
    144 ; EQ-PROC : A {{procedure}}; {{(-> object object boolean)}}. The equality predicate, default {{eqv?}}.
     144; EQL : A {{procedure}}; {{(-> object object boolean)}}. The equality predicate, default {{eqv?}}.
    145145; LIMIT-COST : A {{number}} or {{#f}}. Limit edit distance calculation to cost, default {{#f}}. Number type must be compatible with the numeric-means.
    146146; NUMERIC-MEANS : A procedure-means. The arithmetic means, default {{levenshtein-fixnum-means}}.
     
    153153operations performed.
    154154
    155           (pre "(require-extension levenshtein-vector)")
     155==== Usage
     156
     157<enscript language=scheme>
     158(use levenshtein-vector)
     159</enscript>
    156160
    157161==== levenshtein-distance/vector*
    158162
    159 <procedure>(levenshtein-distance/vector* SOURCE TARGET [EDIT-OPER ...] [#:=? EQ-PROC] [#:operations? OPERATIONS] [#:numeric-means NUMERIC-MEANS])</procedure>
     163<procedure>(levenshtein-distance/vector* SOURCE TARGET [EDIT-OPER ...] [#:eql EQL] [#:mult MULT] [#:plus PLUS] [#:lt LT] [#:operations? OPERATIONS])</procedure>
    160164
    161165Calculates the edit distance from the source vector {{SOURCE}} to the target
     
    166170; TARGET : A {{string}}.
    167171; EDIT-OPER :  Edit operation definitions to apply. Defaults are the basic Insert, Delete, and Substitute.
    168 ; EQ-PROC : A {{procedure}}; {{(-> object object boolean)}}. The equality predicate, default {{char=?}}.
     172; EQL : A {{procedure}}; {{(-> object object boolean)}}. The equality predicate, default {{char=?}}.
     173; MULT : A {{procedure}}; {{(-> number number number)}}. The multiply operation, default {{fx*}}.
     174; PLUS : A {{procedure}}; {{(-> number number number)}}. The plus operation, default {{fx+}}.
     175; LT : A {{procedure}}; {{(-> number number boolean)}}. The less-than operation, default {{fx<}}.
    169176; OPERATIONS : A {{boolean}}. Include the matrix of edit operations performed? Default {{#f}}.
    170 ; NUMERIC-MEANS : A procedure-means. The arithmetic means, default {{levenshtein-fixnum-means}}.
    171 
    172           (pre "(require-extension levenshtein-path-iterator)")
    173177
    174178=== Edit Operators
Note: See TracChangeset for help on using the changeset viewer.