module Difftance::EditDistance
Extended Modules
Defined in:
difftance/edit_distance.crInstance Method Summary
-
#dp(before before_str : String, after after_str : String, costs = {deletion: 1, insertion: 1, substitution: 1})
Wagner–Fischer algorithm
- #edit_distance(before before_str : String, after after_str : String, costs = {deletion: 1, insertion: 1, substitution: 1}, no_substitution = false)
-
#edit_distance_no_substitution(before before_str : String, after after_str : String, costs = {deletion: 1, insertion: 1})
Wu, S., Manber, U., Myers, E.W., & Miller, W.
Instance Method Detail
def dp(before before_str : String, after after_str : String, costs = {deletion: 1, insertion: 1, substitution: 1})
#
Wagner–Fischer algorithm
def edit_distance(before before_str : String, after after_str : String, costs = {deletion: 1, insertion: 1, substitution: 1}, no_substitution = false)
#
def edit_distance_no_substitution(before before_str : String, after after_str : String, costs = {deletion: 1, insertion: 1})
#
Wu, S., Manber, U., Myers, E.W., & Miller, W. (1990). An O(NP) Sequence Comparison Algorithm. Inf. Process. Lett., 35, 317-323. https://api.semanticscholar.org/CorpusID:9968782 ins=1, del=1, sub=2(disallowing substitution)