/u/ia02/s51068/local/projects/release/programme/util.h

gehe zur Dokumentation dieser Datei
00001 
00005 typedef struct {
00009   char *name;
00013   float *vector;
00017   int vecSize;
00018 } keyword;
00019 
00020 
00026 typedef struct {
00030   char **words1;
00034   int words1Count;
00038   char **roles1;
00042   int roles1Count;
00046   char **words2;
00050   int words2Count;
00054   char **roles2;
00058   int roles2Count;
00059 } humanOutput;
00060 
00061 
00066 typedef struct {
00070   humanOutput *humanOut;
00074   int humanOutputCount;
00075 } humanOutputList;
00076 
00082 typedef struct {
00086   char **words;
00090   int wordsCount;
00095   char **roles;
00099   int rolesCount;
00100 } testOutput;
00101 
00102 
00107 typedef struct {
00111   char *inputPhrase;
00115   testOutput *output;
00116   int outputCount;
00117 } testContent;
00118 
00119 
00130 void extractData(char *line, float **data, int *vecSize, char **name, char del);
00131 
00138 int readCodebook(char *filename, keyword **keywords);
00143 int countLines(char *filename);
00144 
00151 int extractTokens(char *source,char del, char ***retval);
00152 
00153 int getRealMatch(humanOutputList *outList,
00154                  testContent *testList,
00155                  int count,
00156                  char **roles,
00157                  int roleCount,
00158                  int **retval,
00159                  int **retvalCounts,
00160                  int **problemIndex);
00161 
00162 
00163 int getPhraseMatch(humanOutput *human,
00164                    int humanCount,
00165                    testOutput *test,
00166                    int testCount,
00167                    char **roles,
00168                    int roleCount,
00169                    int **retval,
00170                    int **retvalCounts);
00171 
00172 
00182 int compareStringList(char **list1, int list1Count, char **list2, int list2Count);
00183 
00189 void printStringList(char **list, int size);
00190 
00200 int getFeatureNameByVector(keyword *cb, int cbSize, int *vector, int vectorSize, char ***names);
00201 
00210 int getVectorByName(keyword *cb, int cbSize, char *name, float **vector);
00211 
00220 int getIntVectorByName(keyword *cb, int cbSize, char *name, int **vector);
00221 
00231 int getIntVectorByNames(keyword *cb, int cbSize, char **names, int namesCount, int **vector);
00232 
00237 int getFirstOutUnitNr(int unitType);
00238 
00243 int getOutUnitCount(int unitType);
00244 
00250 float normFloat(float *vec1, int size);
00251 
00257 float normInt(int *vec1, int size);
00258 
00265 float innerProduct(int *vec1, float *vec2, int size);
00266 
00273 float cosDirection(int *vec1, float *vec2, int size);
00274 
00284 float* concatFloatVectors(float *vec1, int size1, float *vec2, int size2);
00285 
00295 int* concatIntVectors(int *vec1, int size1, int *vec2, int size2);
00296 
00304 float meanFromList(float *list, int size, int exclude);
00305 
00316 int vectorEqual(int *v1, float *v2, int size, float threshold);
00317 
00324 int getIndexByKey(char **list, int size, char *key);
00325 
00326 
00337 int findStringInList(char **list, int size, char *string, int *relativePos);
00338 
00345 char** copyStringList(char **list, int size);
00346 
00354 int findIntInList(int *list, int size, int integer);
00355 
00356 
00357 void emptyStringAtListPos(char **list, int size, int pos);
00358 
00359 
00360 
00361 
00362 
00363 

Erzeugt am Thu Jun 26 14:04:49 2008 für Diplomarbeit_Paul_Werner von  doxygen 1.5.0