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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? pv.c

?? 卡內基梅隆大學MaCallum開發的文本分類系統
?? C
?? 第 1 頁 / 共 2 頁
字號:
  int size = 0;  if (pv->write_last_di != di)    size += PV_WRITE_SIZE_INT (di - pv->write_last_di);  size += PV_WRITE_SIZE_INT (pi - pv->write_last_pi);  return size;}static inline intbow_pv_read_size_di_pi (bow_pv *pv, int di, int pi){  int size = 0;  if (pv->read_last_di != di)    size += PV_WRITE_SIZE_INT (di - pv->read_last_di);  size += PV_WRITE_SIZE_INT (pi - pv->read_last_pi);  return size;}/* Write "document index" DI and "position index" PI to FP.  Assumes   that PV->PVM is already created, and there is space there in this   PVM segment to write the info.  Returns the number of bytes   written. */static inline intbow_pv_write_next_di_pi (bow_pv *pv, int di, int pi){  int bytes_written = 0;  if (pv->pvm == NULL)    pv->pvm = bow_pvm_new (bow_pv_sizeof_first_segment);  assert (di >= pv->write_last_di);  if (di != pv->write_last_di)    {      bytes_written += 	bow_pvm_write_unsigned_int (pv->pvm, di - pv->write_last_di, 1);      pv->write_last_di = di;      pv->write_last_pi = -1;    }  bytes_written +=    bow_pvm_write_unsigned_int (pv->pvm, pi - pv->write_last_pi, 0);  pv->write_last_pi = pi;  return bytes_written;}/* Read "document index" DI and "position index" PI from FP.  Assumes   that FP is already seek'ed to the correct position.  Returns the   number of bytes read. */static inline intbow_pv_read_next_di_pi (bow_pv *pv, int *di, int *pi, FILE *fp){  unsigned int incr;  int bytes_read = 0;  int is_di;  bytes_read += bow_pv_read_unsigned_int (&incr, &is_di, fp);  if (is_di)    {      pv->read_last_di += incr;      pv->read_last_pi = -1;      bytes_read += bow_pv_read_unsigned_int (&incr, &is_di, fp);      assert (!is_di);    }  pv->read_last_pi += incr;  *di = pv->read_last_di;  *pi = pv->read_last_pi;  return bytes_read;}intbow_pvm_read_next_di_pi (bow_pv *pv, int *di, int *pi){  unsigned int incr;  int bytes_read = 0;  int is_di;  assert (pv->pvm);  /* If the special flag was set by bow_pv_unnext(), then return the     same values returned last time without reading the next entry,     and unset the flag. */  if (pv->read_seek_end < 0)    {      *di = pv->read_last_di;      *pi = pv->read_last_pi;      pv->read_seek_end = -pv->read_seek_end;      assert (pv->read_seek_end > 0);      return 0;    }  /* If we are about to read from the same location as we would write,     then we are at the end of the PV.  Return special DI and PI     values indicate that we are at the end. */  if (pv->pvm->read_end == pv->pvm->write_end)    {      *di = *pi = -1;      return 0;    }  bytes_read += bow_pvm_read_unsigned_int (pv->pvm, &incr, &is_di);  if (is_di)    {      pv->read_last_di += incr;      pv->read_last_pi = -1;      bytes_read += bow_pvm_read_unsigned_int (pv->pvm, &incr, &is_di);      assert (!is_di);    }  pv->read_last_pi += incr;  *di = pv->read_last_di;  *pi = pv->read_last_pi;  return bytes_read;}/* Add "document index" DI and "position index" PI to PV by writing... */voidbow_pv_add_di_pi (bow_pv *pv, int di, int pi, FILE *fp){  /* Make sure that PV->PVM definitely has enough room in this PVM     segment to write another DI and PI.  Will grow the PVM segment if     necessary.  Assumes that both DI and PI are greater than or equal     to the last DI and PI written, respectively.  */  pv->word_count++;  //if (di != pv->write_last_di) pv->document_count++;  if (pv->pvm == NULL)    pv->pvm = bow_pvm_new (bow_pv_sizeof_first_segment);  if (pv->pvm->size - pv->pvm->write_end < bow_pv_max_sizeof_di_pi)    bow_pvm_grow (&(pv->pvm));  //pv->byte_count +=   bow_pv_write_next_di_pi (pv, di, pi);}/* Read the next "document index" DI and "position index" PI.  Does   not assume that FP is already seek'ed to the correct position.   Will jump to a new PV segment on disk if necessary. */voidbow_pv_next_di_pi (bow_pv *pv, int *di, int *pi, FILE *fp){  int byte_count;  /* If the special flag was set by bow_pv_unnext(), then return the     same values returned last time without reading the next entry,     and unset the flag. */  if (pv->read_seek_end < 0)    {      *di = pv->read_last_di;      *pi = pv->read_last_pi;      pv->read_seek_end = -pv->read_seek_end;      assert (pv->read_seek_end > 0);      return;    }  /* If we are about to read from the location of the tailer of the     last segment written, then we are at the end of the PV on disk.     Go look for the next entry in memory in the PVM, if the PVM exists. */  if (pv->read_seek_end == pv->write_seek_last_tailer)    {      if (pv->pvm)	bow_pvm_read_next_di_pi (pv, di, pi);      else	*di = *pi = -1;      return;    }  /* Make sure that there was definitely enough room in this segment     to have written another DI and PI.  If not, then it was written     in the next segment, so go there and get set up for reading from     it.  We know that there really is another segment because     otherwise the above test would have been true. */  if (pv->read_segment_bytes_remaining == 0)    {      off_t seek_new_segment;      /* Go to the "tailer" of this segment, and read the seek         position of the next segment. */      fseeko (fp, pv->read_seek_end, SEEK_SET);      bow_fread_off_t (&seek_new_segment, fp);      fseeko (fp, seek_new_segment, SEEK_SET);      /* Read the number of bytes in this segment, and remember it. */      bow_fread_int (&(pv->read_segment_bytes_remaining), fp);      /* Remember the new position from which to read the next DI and PI */      pv->read_seek_end = ftello (fp);#if 0      /* When would this happen now? */      /* If this segment has not yet been written to, we are at end of PV */      if (pv->read_seek_end == pv->write_seek_end)	goto return_end_of_pv;#endif    }  /* Seek to the correct position, read the DI and PI, decrement our     count of the number of bytes remaining in this segment, and     update the seek position for reading the next DI and PI. */  fseeko (fp, pv->read_seek_end, SEEK_SET);  byte_count =    bow_pv_read_next_di_pi (pv, di, pi, fp);  pv->read_segment_bytes_remaining -= byte_count;  pv->read_seek_end += byte_count;  assert (pv->read_segment_bytes_remaining >= 0);}/* Undo the effect of the last call to bow_pv_next_di_pi().  That is,   make the next call to bow_pv_next_di_pi() return the same DI and PI   as the last call did.  This function may not be called multiple   times in a row without calling bow_pv_next_di_pi() in between. */voidbow_pv_unnext (bow_pv *pv){  /* Make sure that this function wasn't called two times in a row. */  assert (pv->read_seek_end > 0);  pv->read_seek_end = -pv->read_seek_end;}/* Rewind the read position to the beginning of the PV */voidbow_pv_rewind (bow_pv *pv, FILE *fp){  /* If PV is already rewound, just return immediately */  if (pv->read_seek_end == pv->seek_start + sizeof (int)      && pv->read_last_di == -1 && pv->read_last_pi == -1)    return;  if (pv->seek_start != -1)    {      fseeko (fp, pv->seek_start, SEEK_SET);      bow_fread_int (&(pv->read_segment_bytes_remaining), fp);      assert (pv->read_segment_bytes_remaining > 0);      pv->read_seek_end = ftello (fp);    }  pv->read_last_di = -1;  pv->read_last_pi = -1;  if (pv->pvm)    bow_pvm_rewind (pv->pvm);}/* Write the in-memory portion of PV to FP */voidbow_pv_write (bow_pv *pv, FILE *fp, FILE *pvfp){  bow_pv_flush (pv, pvfp);#define FAST_PV_WRITE 1#if FAST_PV_WRITE  fwrite (pv, sizeof (bow_pv) - sizeof(void*), 1, fp);#else  //bow_fwrite_int (pv->byte_count, fp);  bow_fwrite_int (pv->word_count, fp);  //bow_fwrite_int (pv->document_count, fp);  bow_fwrite_off_t (pv->seek_start, fp);  bow_fwrite_off_t (pv->read_seek_end, fp);  bow_fwrite_int (pv->read_last_di, fp);  bow_fwrite_int (pv->read_last_pi, fp);  //bow_fwrite_int (pv->read_segment_bytes_remaining, fp);  bow_fwrite_int (pv->write_last_di, fp);  bow_fwrite_int (pv->write_last_pi, fp);  bow_fwrite_off_t (pv->write_seek_last_tailer, fp);#endif}/* Read the in-memory portion of PV from FP */voidbow_pv_read (bow_pv *pv, FILE *fp){#if FAST_PV_WRITE  fread (pv, sizeof (bow_pv) - sizeof(void*), 1, fp);#else  //bow_fread_int (&pv->byte_count, fp);  bow_fread_int (&pv->word_count, fp);  //bow_fread_int (&pv->document_count, fp);  bow_fread_off_t (&pv->seek_start, fp);  bow_fread_off_t (&pv->read_seek_end, fp);  bow_fread_int (&pv->read_last_di, fp);  bow_fread_int (&pv->read_last_pi, fp);  //bow_fread_int (&pv->read_segment_bytes_remaining, fp);  bow_fread_int (&pv->write_last_di, fp);  bow_fread_int (&pv->write_last_pi, fp);  bow_fread_off_t (&pv->write_seek_last_tailer, fp);#endif}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
丁香婷婷综合网| 久久免费电影网| 国产在线视视频有精品| 亚洲黄色av一区| 久久精品亚洲国产奇米99| 欧美美女一区二区在线观看| 国产美女娇喘av呻吟久久| 五月婷婷久久丁香| 亚洲一区二区在线免费看| 国产精品污污网站在线观看| 国产人久久人人人人爽| 国产精品白丝在线| 亚洲图片欧美综合| 欧美aaa在线| 国产精品99久久久久久似苏梦涵| 国产a久久麻豆| 在线观看免费成人| 这里只有精品99re| 国产亚洲欧美激情| 亚洲欧美偷拍三级| 日本美女一区二区三区| 国产成人精品亚洲777人妖| bt欧美亚洲午夜电影天堂| 欧美午夜一区二区三区免费大片| 91精品综合久久久久久| 国产亚洲精品精华液| 亚洲免费观看高清完整版在线观看 | 精品裸体舞一区二区三区| 国产亚洲精久久久久久| 一区二区三区中文字幕在线观看| 麻豆一区二区99久久久久| 国产精品一品二品| 欧美日韩视频在线一区二区| 久久综合色综合88| 亚洲一区精品在线| 懂色av中文字幕一区二区三区| 色一区在线观看| 日韩精品一区二区在线| 最近日韩中文字幕| 国内精品久久久久影院薰衣草| 91最新地址在线播放| 欧美大片日本大片免费观看| 亚洲精品视频在线| 国产精品亚洲一区二区三区在线 | 欧美一级xxx| 18涩涩午夜精品.www| 成人黄色小视频在线观看| 欧美二区三区91| 亚洲男人的天堂av| 国产自产v一区二区三区c| 欧美嫩在线观看| 亚洲综合免费观看高清完整版在线| 狠狠色丁香婷婷综合| 91麻豆精品91久久久久同性| 亚洲人成亚洲人成在线观看图片| 国产久卡久卡久卡久卡视频精品| 欧美日韩夫妻久久| 亚洲精品久久久久久国产精华液| 国产成人免费在线视频| 欧美电影免费观看高清完整版在线观看 | 精品美女在线观看| 日韩成人dvd| 欧美三级在线视频| 亚洲黄网站在线观看| 91最新地址在线播放| 亚洲丝袜自拍清纯另类| 成人动漫视频在线| 国产精品久久久久久久久晋中| 国产成a人无v码亚洲福利| 久久麻豆一区二区| 国产精品一区二区在线看| 久久天堂av综合合色蜜桃网| 国产真实乱子伦精品视频| 精品国产乱码久久久久久牛牛| 日韩电影在线看| 91精品国产欧美一区二区18| 免费成人在线观看| www久久精品| 国产成人在线视频免费播放| 国产亚洲人成网站| 北岛玲一区二区三区四区| 国产精品美女久久久久久| 成人a区在线观看| 日韩美女视频一区二区| 日本电影欧美片| 亚洲不卡一区二区三区| 欧美日韩国产影片| 蜜桃精品视频在线| 日本一区二区三区视频视频| av网站免费线看精品| 亚洲一区影音先锋| 欧美网站大全在线观看| 免费日韩伦理电影| 国产精品美日韩| 在线观看一区不卡| 免费成人av在线播放| 精品88久久久久88久久久| av一本久道久久综合久久鬼色| 亚洲综合一区二区三区| 欧美精品乱码久久久久久按摩| 久久精品99国产精品日本| 国产日韩精品一区二区浪潮av| 91麻豆精品一区二区三区| 石原莉奈在线亚洲三区| 久久久99久久| 欧美挠脚心视频网站| 国产精品系列在线播放| 亚洲福利一区二区| 国产欧美精品一区二区色综合朱莉| 色先锋久久av资源部| 麻豆精品国产91久久久久久| 日本一二三四高清不卡| 欧美日韩高清一区二区不卡 | 亚洲日本在线看| 日韩一区二区三区电影在线观看 | 亚洲高清在线视频| 精品成人一区二区| 欧美日本在线播放| 成人做爰69片免费看网站| 日本中文字幕一区二区有限公司| 国产亚洲精品免费| 日韩精品一区二区三区视频在线观看| 99久久婷婷国产综合精品| 精久久久久久久久久久| 亚洲福利视频一区| 亚洲精品日韩一| 欧美国产精品v| 精品免费日韩av| 69堂亚洲精品首页| 欧美性色综合网| 91女厕偷拍女厕偷拍高清| 国产精品亚洲第一区在线暖暖韩国 | 欧美一级一级性生活免费录像| 成人激情午夜影院| 国产成人日日夜夜| 国精产品一区一区三区mba视频| 五月天中文字幕一区二区| 亚洲精品网站在线观看| 国产精品女人毛片| 日本一二三四高清不卡| 久久久久99精品一区| 久久先锋影音av鲁色资源| 欧美一区二区视频网站| 欧美喷潮久久久xxxxx| 欧美日韩视频在线观看一区二区三区 | 久久精品国产精品青草| 五月激情综合色| 日本视频中文字幕一区二区三区| 亚洲国产乱码最新视频| 亚洲精品视频观看| 亚洲自拍偷拍网站| 亚洲一区免费观看| 天天操天天干天天综合网| 亚洲成人1区2区| 日韩电影一二三区| 免费看黄色91| 国产很黄免费观看久久| 成人一级黄色片| 不卡免费追剧大全电视剧网站| 高清av一区二区| 色综合久久中文字幕综合网| 日本高清视频一区二区| 欧美日韩激情在线| 日韩午夜av电影| 国产欧美日韩在线看| 国产精品久久久久影视| 一二三区精品视频| 婷婷六月综合亚洲| 久久99国产精品免费网站| 国产成人精品免费网站| 成人av第一页| 欧美视频一区二| 精品久久久久久久久久久久久久久久久| 精品久久久久久无| 一区在线观看免费| 视频一区在线视频| 国产91丝袜在线播放九色| 99re热这里只有精品免费视频 | 久久亚洲欧美国产精品乐播| 国产欧美一区二区三区在线老狼| 亚洲天堂2014| 麻豆精品国产传媒mv男同| 99精品一区二区三区| 91.麻豆视频| 国产精品女主播在线观看| 亚洲电影视频在线| 丁香啪啪综合成人亚洲小说| 欧美体内she精高潮| 国产日产欧美一区二区三区| 亚洲大片免费看| 成人综合在线网站| 日韩欧美国产三级电影视频| 国产精品久久久久影院老司| 免费成人在线视频观看| 91网站黄www| 国产亚洲成年网址在线观看| 图片区小说区区亚洲影院| jlzzjlzz亚洲日本少妇| 日韩欧美123| 天天操天天综合网|