亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? cluster.c

?? 隱馬爾科夫模型工具箱
?? C
?? 第 1 頁 / 共 5 頁
字號:
   }}#endif/* Complain about a broken header */static void invalid_header(void){   HError(17013, "Classmap has broken header - missing '='");}/* Import a HLM classmap file. Currently ignores contents of 'EscMode' field. GLM Also non-IN?*/void import_classmap(char *fname, int numb_words){#define max_line_len 500    FILE     *file;               /* Input file handle */   char      line[max_line_len]; /* Line read buffer */   int       C;                  /* Current class index */   int       size;               /* Size of current class */   int       i;                  /* Loop counter */   char     *ptr;                /* Text pointer */   UInt      id;                 /* Word id */   int       reassigned = 0;     /* Number of reassigned classes */   int       unexpected = 0;     /* Number of unexpected lines trailing class descriptions */   Boolean   pipe_status;   if (trace & T_FILE) {      printf("Importing classmap '%s'\n", fname);   }   W = numb_words;   clMemb = CNew(&global_stack, W * sizeof(int));     /* Set impossible classmap in order to do integrity check after import */   for (i=0; i<W; i++) {      clMemb[i] = -1;   }      N = 0;   file = FOpen(fname, LCMapFilter, &pipe_status);   check_file(file, fname, "import_classmap");   while (fgets(line, max_line_len, file)) {      if (strncmp(line, "Entries", 7)==0) {         ptr = strchr(line, '=');         if (!ptr) invalid_header();         ptr++;         ptr = strtok(ptr, " \t\n");         N = atoi(ptr);         if (trace & T_EXTRA) {            printf("Number of classes = %d\n", N);         }      }      else if (strncmp(line, "Iterations", 10)==0) {         ptr = strchr(line, '=');         if (!ptr) invalid_header();         ptr++;         ptr = strtok(ptr, " \t\n");         export_index = atoi(ptr);      }      else if (strncmp(line, "EscMode", 7)==0) {         ptr = strchr(line, '=');         if (!ptr) invalid_header();         ptr++;         ptr = strtok(ptr, " \t\n");         if (strcmp(ptr, "HTK")==0) {            if (inCMapRawTrap && inCMapRaw) {               HError(-17013, "Class map specifies HTK escaping on input but configuration file specifies Raw escaping -- using HTK escaping for input");            }            inCMapRaw = FALSE;         }         else if (strcmp(ptr, "Raw")==0) {            if (inCMapRawTrap && !inCMapRaw) {               HError(-17013, "Class map specifies Raw escaping on input but configuration file specifies HTK escaping -- using Raw escaping for input");            }            inCMapRaw = TRUE;         }         else {            HError(17013, "Classmap has unknown escaping of type '%s'", ptr);         }         if (!outCMapRawTrap) {            if (outCMapRaw != inCMapRaw) {               HError(-17013, "Setting output class map escaping to same format as input class map (%s)", inCMapRaw?"Raw":"HTK");            }            outCMapRaw = inCMapRaw;  /* This is common sense */         }         if (inCMapRaw != outCMapRaw) {            HError(-17013, "Input class map escaping and output class map escaping differ (this is not a problem -- this warning is to alert you in case you meant them to be the same)");         }      }      else if (strncmp(line, "\\Classes\\", 9)==0) {         break;      }   }   if (feof(file)) {      HError(17013, "Classmap file is corrupt/contains no classes!");   }   if (!N) {      HError(17013, "Corrupt classmap header - must specify number of classes!");   }   if (trace & T_EXTRA) {      printf("Iterations = %d\n", export_index);   }   C = 0;   while (fgets(line, max_line_len, file)) {      if (C>=N) {         if (strstr(line, " IN")) {            HError(17013, "More classes are described than are specified in the header!");         }         else {            ptr = strtok(line, " \t\n");            if (!ptr)               continue;            else {               HError(-17013, "Warning: ignoring '%s' at end of classmap file", ptr);            }         }      }      if (strstr(line, " IN")) {         /* Start of a new class */         /* Make this class 'C' */         strtok(line, " \t");         ptr = strtok(NULL, " \t");         if (!ptr) {            HError(17013, "Failure reading class header %d in classmap (no id)", C);         }         if (atoi(ptr) != C+1) {            /* We'll renumber this class */            reassigned++;         }         ptr = strtok(NULL, " \t");         if (!ptr) {            HError(17013, "Failure reading class header %d in classmap (no size)", C);         }         size = atoi(ptr); /* Read number of words in class */         for (i=0; i<size; i++) {            fgets(line, max_line_len, file);            ptr = strtok(line, " \t\n");            if (!ptr) {               /* Warn about the blank line */               HError(-17013, "Found empty line inside class %d definition", C);               i--;               continue;            }            /* Unescape word if necessary */            if (!inCMapRaw) {               if (strlen(ptr)>255) {                  HError(17013, "Cannot handle words longer than 255 characters when using HTK escaping (recompile with higher tmp[] buffer size in Cluster.c)");               }               ParseString(ptr, tmp);               /* Put word in class */               id = get_id_from_word(tmp);            }            else {               /* Put word in class */               id = get_id_from_word(ptr);            }            if (inCMapRaw && strcmp(what_is_word(id), ptr)!=0) {               HError(17095, "import_classmap: word '%s' is id '%d'; id is '%s'!", ptr, id, what_is_word(id));            }            else if (!inCMapRaw && strcmp(what_is_word(id), tmp)!=0) {               HError(17095, "import_classmap: word '%s' is id '%d'; id is '%s'!", tmp, id, what_is_word(id));            }            if (clMemb[id] != -1) {               HError(17094, "Word '%s' occurs more than once in classmap!", ptr);            }            clMemb[id] = C;         }         C++;      }      else {         /* Where is class header? It's gone missing! */         if (strlen(line)>0) {            if (strchr(line, '\n'))               *strchr(line, '\n')='\0'; /* Strip linefeed */            if (strlen(line)==0)               continue;            HError(-17013, "Unexpected line '%s' in classmap", line);            unexpected++;         }         if (unexpected>9) {            HError(17013, "Too many unexpected lines in classmap - aborting now");         }         /* Loop round to see if it's coming up next */      }   }   if (C<N) {      HError(17013, "Less classes are described than are specified in the header!");   }   if (trace & T_TOP) {      if (reassigned) {         if (reassigned>1) {            printf("%d class ids were reassigned\n", reassigned);         }         else {            printf("1 class id was reassigned\n");         }      }      else {         printf("No class ids were reassigned\n");      }   }   /* Check all words were assigned */   for (i=0; i<W; i++) {      if (clMemb[i]==-1) {         HError(17052,"import_classmap: Not all words were assigned to classes");      }   }   FClose(file, pipe_status);   if (trace & T_FILE) {      printf("Class map import successful\n");   }}/* Write out p(word | class) probabilities */void write_word_probs(char *filename){   FILE *out;   int   i;   /* Loop counter */   double probability;   Boolean pipe_status;   /* These files never use HTK escaping */      out = FOpen(filename, NoOFilter, &pipe_status);   check_file(out, filename, "write_word_probs");   /* Write header */   fprintf(out, "Word|Class probabilities\n");   fprintf(out, "\n");   fprintf(out, "Derived from: %s\n", export_prefix);   fprintf(out, "Number of classes: %d\n", N);   fprintf(out, "Number of words: %d\n", W);   fprintf(out, "Iterations: %d\n", export_index);   fprintf(out, "\n");   fprintf(out, "%-15s\tClass name\tProbability (log)\n", "Word");   for (i=0; i<W; i++) {      if (uni[i]==0) uni[i]=1;   }   /* Use tmp_sum1[] to save having to allocate a new array (so can't call      this from within a class change calculation, but this isn't a problem!)   */   for (i=0; i<N; i++) {      tmp_sum1[i] = 0;   }   for (i=0; i<W; i++) {      tmp_sum1[clMemb[i]] += uni[i];   }   for (i=0; i<W; i++) {      probability = (double)uni[i]/((double)tmp_sum1[clMemb[i]]);      fprintf(out, "%-15s\tCLASS%-4d\t%f\n", what_is_word(i), clMemb[i]+1,              LOG_NATURAL(probability));      if (LOG_NATURAL(probability)<-90) {         printf("prob is %f, discount is %f, uni is %d\n", LOG_NATURAL((double)uni[i]/((double)tmp_sum1[clMemb[i]])), mlv[clMemb[i]], uni[i]);      }   }   FClose(out, pipe_status);   if (trace & T_FILE) {      printf("Wrote word|class probabilities to '%s'\n", filename);   }}/* Write out p(word | class) counts */void write_word_counts(char *filename){   FILE *out;   int   i;   /* Loop counter */   Boolean pipe_status;   /* These files never use HTK escaping */   /* Open output file */   out = FOpen(filename, NoOFilter, &pipe_status);   check_file(out, filename, "write_word_counts");   /* Write header */   fprintf(out, "Word|Class counts\n");   fprintf(out, "\n");   fprintf(out, "Derived from: %s\n", export_prefix);   fprintf(out, "Number of classes: %d\n", N);   fprintf(out, "Number of words: %d\n", W);   fprintf(out, "Iterations: %d\n", export_index);   fprintf(out, "\n");   fprintf(out, "%-15s\tClass name\tCount\n", "Word");      for (i=0; i<W; i++) {      fprintf(out, "%-15s\tCLASS%-4d\t%d\n", what_is_word(i), clMemb[i]+1, uni[i]);   }   FClose(out, pipe_status);   if (trace & T_FILE) {      printf("Wrote word|class counts to '%s'\n", filename);   }}/* Specify whether to keep the unknown word in its own solo-member class or not */void classes_keep_unk_separate(int keep_separate){   unk_sep = (Boolean) keep_separate;   start_class = unk_sep?3:2;}/* Pass in start, end and unknown word ids */void set_ids(int start, int end, int unk){   start_id = start;   end_id = end;   unk_id = unk;}/* This set of functions takes unigram counts, stores them, and   then allows them to be retrieved. It simply allocates a count   for each possible word id, since they are allocated in a   continuous block.*//* Initialise this unigram storage module */void unigram_init(int words){   max_words = words;   uni = CNew(&global_stack, words * sizeof(unigram));   sum_of_all_uni_counts = 0;}/* Add a unigram */void unigram_add(NGram ng, int count){   if (ng[0]>=max_words) {      /* Something's gone wrong */      HError(17093, "unigram_add: Found a word id higher than the base+number of words - word ids are expected to be allocated in an unbroken chunk\n[Current unigram is (%d); number of words is %d]", ng[0], max_words);   }   uni[ng[0]] += count;   sum_of_all_uni_counts += count;   return;}/* Read a unigram */UInt unigram_read(UInt id){#ifdef INTEGRITY_CHECK      if ((id<0) || (id>=max_words)) {         HError(17092, "unigram_read: attempt to read unigram outside bounds (%d; %d words)", id, max_words);      }#endif   return uni[id];}/* This section contains functions to store a sequence of bigrams - they must   be sequenced before passing to this code, since it relies on the input   being sorted.   Both forward and backward word to all bigrams look-up tables are built,   so given either u or v from a bigram (u,v) then the set of all (u,*) or   (*,v) can be found. *//* Grab some space from our current local storage block */static void *get_space(int size){   static void* ptr;   /* Test against our not-worth-using cut-off point */   if (size>block_cut_off)      return New(&global_stack, size);   /* Use New() again if necessary to get a new block */   if (((int)block+(int)size) >= (int)block_end) {      block = New(&global_heap, block_grab_size);      block_end = (void *) ((int)block+(int)block_grab_size);   }   /* Hand back the next free space */   ptr = block;   block = (void*) ((int) block + (int) size);     /* Next free byte */   block = (void*) ((((int)block)+3) & (~(int)3)); /* Word-align */   return ptr;}/* Add a bigram */void bigram_add(NGram ng, int count)

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
aa级大片欧美| 亚洲一区二区三区国产| 国产精品久久午夜| 亚洲精品高清在线观看| 奇米在线7777在线精品| 国产一区二区不卡| 91麻豆国产精品久久| 在线综合视频播放| 久久精品无码一区二区三区| 亚洲视频每日更新| 麻豆成人久久精品二区三区小说| 丰满白嫩尤物一区二区| 在线观看精品一区| 久久综合色8888| 伊人一区二区三区| 韩国女主播一区二区三区| 色婷婷综合激情| 日韩一区二区三区免费看 | 丝袜诱惑亚洲看片| 国产夫妻精品视频| 911精品国产一区二区在线| www激情久久| 亚洲精品videosex极品| 国产精品综合久久| 欧美日免费三级在线| 国产精品欧美精品| 免费观看91视频大全| 色综合一个色综合| 久久久久久久久久久久电影| 亚洲综合图片区| 成人av资源在线观看| 日韩视频在线你懂得| 亚洲精品日日夜夜| 国产精品亚洲一区二区三区妖精| 欧美日韩一区二区电影| 中文字幕在线一区免费| 蜜臀久久99精品久久久画质超高清| 91免费版pro下载短视频| 久久日一线二线三线suv| 亚洲成人午夜电影| 色噜噜久久综合| 国产色婷婷亚洲99精品小说| 麻豆专区一区二区三区四区五区| 色婷婷综合在线| 欧美韩国日本一区| 精品一区二区三区欧美| 欧美日韩亚洲综合一区二区三区| 中文字幕在线一区| 国产精品18久久久久久久久| 欧美不卡一区二区三区| 亚洲成人免费影院| 日本道精品一区二区三区| 中文字幕亚洲在| 国产精品2024| 国产午夜三级一区二区三| 蜜乳av一区二区| 欧美精品在线视频| 亚洲国产精品一区二区久久| 暴力调教一区二区三区| 久久久久久久久免费| 久久99精品一区二区三区三区| 欧美日韩国产成人在线91| 亚洲成人精品一区| 在线一区二区观看| 一区二区三区成人| 91成人在线精品| 亚洲精品国产无套在线观| 色综合天天综合网天天狠天天| 亚洲国产高清aⅴ视频| 国产一区二区精品久久| 久久久午夜电影| 国产成人精品免费视频网站| 中文字幕第一区二区| av亚洲精华国产精华精华| 国产精品婷婷午夜在线观看| 国产999精品久久久久久绿帽| 欧美激情一区二区三区四区| 国产成人夜色高潮福利影视| 中文字幕巨乱亚洲| aaa亚洲精品| 亚洲欧美福利一区二区| 99久久国产免费看| 国产精品美女久久久久久| 日韩av中文在线观看| 日韩视频永久免费| 日本va欧美va精品发布| 欧美久久久久久蜜桃| 视频一区在线播放| 欧美伦理影视网| 性做久久久久久免费观看 | 午夜精品一区在线观看| 欧美亚洲国产一区在线观看网站| 亚洲另类春色国产| 欧洲国产伦久久久久久久| 一区二区欧美视频| 色8久久精品久久久久久蜜| 国产精品久久午夜| 欧美探花视频资源| 日韩和欧美一区二区| 欧美一区二区三区在线视频| 日本aⅴ亚洲精品中文乱码| 欧美本精品男人aⅴ天堂| 国产精一品亚洲二区在线视频| 久久精品免视看| 成人综合在线网站| 亚洲欧洲成人自拍| 91国产免费看| 午夜婷婷国产麻豆精品| 欧美va亚洲va在线观看蝴蝶网| 精品一区二区三区在线视频| 久久久久久夜精品精品免费| 国产精品99久久久久久有的能看 | 成人免费在线视频| 一本大道久久a久久精品综合| 亚洲欧洲综合另类| 日韩区在线观看| 国产精品一区二区在线观看不卡| 中文字幕乱码日本亚洲一区二区| 91理论电影在线观看| 亚洲成人在线观看视频| 欧美大片在线观看一区| 成人黄色在线看| 又紧又大又爽精品一区二区| 日韩一区二区中文字幕| 国产毛片精品视频| 自拍偷自拍亚洲精品播放| 欧美日韩国产美| 国产精品99久久久| 国产精品视频观看| 日韩一级欧美一级| 成人激情小说网站| 午夜欧美大尺度福利影院在线看| 精品久久久久久亚洲综合网| 91麻豆6部合集magnet| 久久激情五月激情| 一区二区三区国产精品| 精品999久久久| 色视频欧美一区二区三区| 麻豆精品视频在线| 18欧美乱大交hd1984| 日韩视频免费观看高清完整版 | 欧美精品自拍偷拍| 99精品1区2区| 久久精品国产亚洲5555| 亚洲欧美一区二区不卡| 日韩亚洲欧美一区二区三区| 99视频精品免费视频| 日韩电影一区二区三区四区| 亚洲人精品午夜| 日韩精品在线看片z| 91小视频免费观看| 麻豆91在线播放免费| 玉米视频成人免费看| 久久一留热品黄| 在线观看日韩一区| av不卡在线播放| 久久国产精品区| 图片区小说区国产精品视频| 国产精品日日摸夜夜摸av| 欧美一级搡bbbb搡bbbb| 成人av综合在线| 国产高清久久久久| 日本不卡123| 一级精品视频在线观看宜春院| 久久综合一区二区| 欧美一区二视频| 欧洲精品一区二区| 欧美性三三影院| 91在线观看下载| 粉嫩一区二区三区在线看| 久草在线在线精品观看| 亚洲va在线va天堂| ...xxx性欧美| 精品免费一区二区三区| 91精品国产综合久久精品图片| 99久久婷婷国产综合精品| 美女免费视频一区二区| 日本美女一区二区| 亚洲成人免费观看| 一区二区成人在线视频 | 国产一区在线看| 日本怡春院一区二区| 亚洲国产精品一区二区久久恐怖片| 亚洲欧洲精品一区二区精品久久久| 国产欧美一区二区三区在线老狼| 精品国产成人在线影院| 91精品国产免费| 欧美熟乱第一页| 欧美亚洲免费在线一区| 在线精品视频免费播放| 色综合天天做天天爱| 91麻豆免费观看| 久久99国产精品久久| 国产成人精品综合在线观看| 韩日欧美一区二区三区| 精品一区二区三区在线观看国产| 久久国产精品72免费观看| 久久精品国产在热久久| 极品少妇xxxx精品少妇偷拍| 久久精品国产亚洲aⅴ|