github.com/aarzilli/tools@v0.0.0-20151123112009-0d27094f75e0/text/levenshtein/type-cost-match-options.go (about) 1 package levenshtein 2 3 // Options control the way in which the levenshtein matrix 4 // is computed. 5 type Options struct { 6 InsCost int 7 DelCost int 8 SubCost int 9 } 10 11 // DefaultOptions. 12 // Giving slight preference of insert/delete over substitution. 13 var DefaultOptions Options = Options{ 14 InsCost: 1, 15 DelCost: 1, 16 SubCost: 2, // SubCost can be 1, but not lower than InsCost - otherwise Editscript fails 17 }