File: weights.hpp

package info (click to toggle)
aspell 0.60.8.2-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 15,336 kB
  • sloc: cpp: 24,378; sh: 12,340; perl: 1,924; ansic: 1,661; makefile: 852; sed: 16
file content (23 lines) | stat: -rw-r--r-- 769 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23

#ifndef __aspeller_weights_hh__
#define __aspeller_weights_hh__

namespace aspeller {

  struct EditDistanceWeights {
    int del1;    // the cost of deleting a char in the first string
    int del2;    // the cost of inserting a character or deleting a char
                    // in the second string
    int swap;    // the cost of swapping two adjacent letters
    int sub;     // the cost of replacing one letter with another
    int similar; // the cost of a "similar" but not exact match for
                    // two characters
    int min;     // the min of del1, del2, swap and sub.
    int max;     // the max of del1, del2, swap and sub.
    EditDistanceWeights()
      : del1(1), del2(1), swap(1), sub(1), similar(0), min(1), max(1) {}
  };
  
}

#endif