SPRAAK
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Data Structures | Namespaces | Typedefs | Enumerations | Functions | Variables
cwr_err.c File Reference

Error rate for cwr-systems. More...

Data Structures

struct  SprCwrCESeq
 
struct  SprCwrCECost
 
struct  SprCwrErr
 
struct  SprCwrCEDistMat
 
struct  SprCwrCEChrDiff
 

Namespaces

 xref_spr_dist_mat
 Distance matrices
 

Typedefs

typedef double(* _FuncPtr1_CWR_ERR_ )(const void *info, int ndx_ref, int ndx_cmp)
 

Enumerations

enum  {
  SPR_CWR_INSERTION, SPR_CWR_DELETION, SPR_CWR_SUBSTITUTION, SPR_CWR_CORRECT,
  SPR_CWR_DIFF_TERMINATED
}
 

Functions

void spr_cwr_err_free (SprCwrErr *info)
 
int spr_cwr_err_seq_expand (SprCwrCESeq *seq, int add_el)
 
SprCwrCEDistMatspr_cwr_err_dist_free_data (SprCwrCEDistMat *dmat)
 
SprCwrCEDistMatspr_cwr_err_dist_mat_read (const char *fname, const SprStrHashTbl *dic)
 
SprCwrCEChrDiffspr_cwr_err_chr_diff_free (SprCwrCEChrDiff *info)
 
SprCwrCEChrDiffspr_cwr_err_chr_diff_init (const char *options, int opt_len, const SprStrHashTbl *ndx2str)
 
double spr_cwr_err_chr_diff_func (const SprCwrCEChrDiff *info, int ndx_ref, int ndx_cmp)
 
int spr_cwr_err (SprCwrErr *info)
 

Variables

const SprCwrErr spr_cwr_empty_cwr_err
 
const char *const spr_cwr_err_str []
 
double(* spr_cwr_err_nist_werr )(const void *info, int ndx_ref, int ndx_cmp)
 
double(* spr_cwr_err_dist_mat )(const void *info, int ndx_ref, int ndx_cmp)
 Alignment cost function based on (phonetic) features. More...
 
const SprCmdOptDesc spr_cwr_od_err_chr_diff []
 

Detailed Description

Error rate for cwr-systems.

Align a reference and test sequence given some distance metric and calculate the substitution, insertion and deletion rate. The alignment optimizes a cost (a float, primary goal) and a sub-cost (an integer, secondary goal). The sub-cost function (secondary goal) is fixed and gives preference to deletetions over insertions over substitutions. The cost function (primary goal) can be user implemented.

Currently the following cost functions (primary goals) are implemented:

  1. the NIST distance metric, i.e. same cost for an ins/del/sub
    note: the preference for using ins/del over sub is controled with the sub-cost
  2. a substitution (+ insertion & deletion) matrix or a hierarchical (feature-based) distance matrix
    for more info see Distance matrices

Author
Kris Demuynck
Date
August 1995
Revision History:
05/96 - KD
cwr_err now also updates a confusion "matrix"
15/04 - KD
cwr_err now can work with user defined distance metrics
06/06 - KD
added more distance functions (based on unique letter combinations)