00001 /* Author: Andrew Schein -*- c++ -*- */ 00002 00003 /* 00004 As progress progressed on the project, a switch away from csr towards aoa matrices followed. 00005 instance matrix must be prepared for the different types. 00006 */ 00007 00008 #ifndef NPS_IMAT_SHARED_H 00009 #define NPS_IMAT_SHARED_H 00010 #ifndef NPS_VOC_HTAB32 00011 #include <glib.h> 00012 #endif 00013 #include <stdio.h> 00014 #include <stdint.h> 00015 #include "../bio/bio.h" 00016 #include "../error/error.h" 00017 #include "../nps/Object.h" 00018 00019 nps_domain_t Nps_Imat = { "Instance Matrix" }; 00020 nps_errorType_t Nps_Imat_LineTooLong = {"Line Too Long"}; 00021 nps_errorType_t Nps_Imat_FeaturePrefix = {"'_' disallowed in feature prefix"}; 00022 nps_errorType_t Nps_Imat_ExtraWS = {"Extra white space"}; 00023 nps_errorType_t Nps_Imat_DoubleParse = {"Unable to parse string as double"}; 00024 nps_errorType_t Nps_Imat_ParseKey = {"Unable to parse key"}; 00025 nps_errorType_t Nps_Imat_MissingDelim = {"Delimiter missing"}; 00026 nps_errorType_t Nps_Imat_ParseWeight = {"Unable to parse weight"}; 00027 nps_errorType_t Nps_Imat_KeyUnique = {"Instance keys are not unique"}; 00028 00029 00030 /* below is the original non-object formulation */ 00031 typedef struct { 00032 int64_t lineNo; 00033 char *fileName; 00034 FILE *file; 00035 // char *error; /* NULL -> no error */ 00036 void *featDict; 00037 void *instDict; 00038 void *labDict; 00039 } nps_imat_state; 00040 00041 nps_imat_state *nps_imat_state_new(); 00042 void nps_imat_state_del(); 00043 00044 00045 00046 00047 #endif