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

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

?? pv.c

?? 卡內(nèi)基梅隆大學(xué)MaCallum開發(fā)的文本分類系統(tǒng)
?? C
?? 第 1 頁(yè) / 共 2 頁(yè)
字號(hào):
/* "Position vector", a (compressed) list of word positions in documents *//* Copyright (C) 1998 Andrew McCallum   Written by:  Andrew Kachites McCallum <mccallum@cs.cmu.edu>   This file is part of the Bag-Of-Words Library, `libbow'.   This library is free software; you can redistribute it and/or   modify it under the terms of the GNU Library General Public License   as published by the Free Software Foundation, version 2.      This library is distributed in the hope that it will be useful,   but WITHOUT ANY WARRANTY; without even the implied warranty of   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU   Library General Public License for more details.   You should have received a copy of the GNU Library General Public   License along with this library; if not, write to the Free Software   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA */#define _FILE_OFFSET_BITS 64#include <bow/libbow.h>#include <bow/archer.h>#define PV_DEBUG 1/* The total amount of memory consumed by PVM's */int bow_pvm_total_bytes = 0;/* The maximum memory we will allow PVM's to take before we flush them   to disk.  Currently set to 128M */int bow_pvm_max_total_bytes = 128 * 1024 * 1024;/* Allocate and return a new PVM that can hold SIZE bytes */bow_pvm *bow_pvm_new (int size){  bow_pvm *ret = bow_malloc (sizeof (bow_pvm) + size);  ret->size = size;  ret->read_end = 0;  ret->write_end = 0;  bow_pvm_total_bytes += sizeof (bow_pvm) + size;  return ret;}/* Increase the capacity of PVM, growing by doubling size until we get   to 128k, then just grow by 128k increments. */voidbow_pvm_grow (bow_pvm **pvm){  if ((*pvm)->size < 64 * 1024)    {      (*pvm)->size *= 2;      bow_pvm_total_bytes += (*pvm)->size;    }  else    {      (*pvm)->size += 64 * 1024;      bow_pvm_total_bytes += 64 * 1024;    }  *pvm = bow_realloc (*pvm, sizeof (bow_pvm) + (*pvm)->size);}/* Free the memory associated with the PVM */voidbow_pvm_free (bow_pvm *pvm){  bow_free (pvm);}/* Put the PVM's reader-pointer back to the beginning */static inline voidbow_pvm_rewind (bow_pvm *pvm){  pvm->read_end = 0;}/* PV functions *//* The first four bytes of a segment are an int that indicate how many   bytes are allocated in this segment.  The last four bytes of a   segment are an int that indicates the seek location of the next   segment.  The read_segment_bytes_remaining does not include   the size of the two int's. *//* Always enough for one "document index"/"word index" pair:   5 bytes == 6+4*7 == 34 bits for di, likewise for pi. */#define bow_pv_max_sizeof_di_pi (2 * 5)static int bow_pv_sizeof_first_segment = 2 * bow_pv_max_sizeof_di_pi;/* Fill in PV with the correct initial values. */voidbow_pv_init (bow_pv *pv, FILE *fp){  //pv->byte_count = 0;  pv->word_count = 0;  //pv->document_count = 0;  pv->pvm = NULL;  pv->seek_start = 0; //-1  pv->read_seek_end = 0;  pv->read_segment_bytes_remaining = -1;  pv->read_last_di = -1;  pv->read_last_pi = -1;  pv->write_last_di = -1;  pv->write_last_pi = -1;  pv->write_seek_last_tailer = 0;	/* This value must match READ_SEEK_END */}/* Write this PV's PVM to disk, and free the PVM. */voidbow_pv_flush (bow_pv *pv, FILE *fp){  off_t seek_new_segment;  off_t seek_new_tailer;  if (pv->pvm == NULL || pv->pvm->write_end == 0)    return;  /* Seek to the end of the file, which is the position at which this     segment of the PV will begin. */  fseeko (fp, 0, SEEK_END);  seek_new_segment = ftello (fp);  /* If none of this PV has ever been written to disk, remember this     position as the start position so that we can rewind there later. */  if (pv->seek_start == 0) //-1    {      pv->seek_start = seek_new_segment;      pv->read_seek_end = seek_new_segment;      pv->read_segment_bytes_remaining = pv->pvm->write_end;    }  /* Write the "header", which is the number of contents data bytes in     this segment. */  bow_fwrite_int (pv->pvm->write_end, fp);  /* Write the contents data */  fwrite (pv->pvm->contents, sizeof (unsigned char), pv->pvm->write_end, fp);  /* Write (a temporary value for) the "tailer".  Later we will put     here the seek position of the next pv segment on disk. */  /* xxx Don't actually need a ftello() here.  Do the math instead. */  seek_new_tailer = ftello (fp);  bow_fwrite_off_t (0, fp); //-1  /* If this is not the first time this PV has been flushed, then     the "tailer" of the previous flushed segment, and write the seek     position of this segment there. */  if (pv->write_seek_last_tailer != 0)    {      fseeko (fp, pv->write_seek_last_tailer, SEEK_SET);      bow_fwrite_off_t (seek_new_segment, fp);    }  pv->write_seek_last_tailer = seek_new_tailer;  bow_pvm_total_bytes -= sizeof (bow_pvm) + pv->pvm->size;  bow_pvm_free (pv->pvm);  pv->pvm = NULL;}/* Write to PVM the unsigned integer I, marked with the special flag   saying if it is a DI or a PI, (as indicated by IS_DI).  Assumes   there is enough space there in this PVM to write the info.  Returns   the number of bytes written. */static inline intbow_pvm_write_unsigned_int (bow_pvm *pvm, unsigned int i, int is_di){  bow_pe pe;  int byte_count = 1;		/* Count already the last byte */  /* assert (i < (1 < 6+7+7+7+1)); */  if (is_di)    pe.bits.is_di = 1;  else    pe.bits.is_di = 0;  if (i > 0x3f)			/* binary = 00111111 */    {      pe.bits.is_more = 1;      pe.bits.index = i & 0x3f;	/* binary = 00111111 */      pvm->contents[pvm->write_end++] = pe.byte;  /* Write the first byte */      byte_count++;      i = i >> 6;      while (i > 0x7f)		/* binary = 01111111 */	{	  pe.bits_more.is_more = 1;	  pe.bits_more.index = i & 0x7f;	  pvm->contents[pvm->write_end++] = pe.byte;	  byte_count++;	  i = i >> 7;	}	pe.bits_more.is_more = 0;	pe.bits_more.index = i;	pvm->contents[pvm->write_end++] = pe.byte;    }  else    {      pe.bits.is_more = 0;      pe.bits.index = i;      /* Write the first byte and only */      pvm->contents[pvm->write_end++] = pe.byte;    }  return byte_count;}/* Read an unsigned integer into I, and indicate whether it is a   "document index" or a "position index" by the value of IS_DI.   Returns the number of bytes read. */static inline intbow_pvm_read_unsigned_int (bow_pvm *pvm, unsigned int *i, int *is_di){  bow_pe pe;  int index;  int shift = 6;  int byte_count = 1;  pe.byte = pvm->contents[pvm->read_end++];  if (pe.bits.is_di)    *is_di = 1;  else    *is_di = 0;  index = pe.bits.index;  while (pe.bits.is_more)    /* The above test relies on pe.bits.is_more == pe.bits_more.is_more */    {      pe.byte = pvm->contents[pvm->read_end++];      byte_count++;      index |= pe.bits_more.index << shift;      shift += 7;    }  *i = index;  return byte_count;}/* Read an unsigned integer into I, and indicate whether it is a   "document index" or a "position index" by the value of IS_DI.   Assumes that FP is already seek'ed to the correct position. Returns   the number of bytes read. */static inline intbow_pv_read_unsigned_int (unsigned int *i, int *is_di, FILE *fp){  bow_pe pe;  int index;  int shift = 6;  int byte_count = 1;  pe.byte = fgetc (fp);  if (pe.bits.is_di)    *is_di = 1;  else    *is_di = 0;  index = pe.bits.index;  while (pe.bits.is_more)    /* The above test relies on pe.bits.is_more == pe.bits_more.is_more */    {      pe.byte = fgetc (fp);      byte_count++;      index |= pe.bits_more.index << shift;      shift += 7;    }  *i = index;  return byte_count;}#define PV_WRITE_SIZE_INT(N)			\(((N) < (1 << (6+1)))				\ ? 1						\ : (((N) < (1 << (6+7+1)))			\    ? 2						\    : (((N) < (1 << (6+7+7+1)))			\       ? 3					\       : (((N) < (1 << (6+7+7+7+1)))		\	  ? 4					\	  : 5))))static inline intbow_pv_write_size_di_pi (bow_pv *pv, int di, int pi){

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
97国产精品videossex| 亚洲制服丝袜在线| 欧洲精品在线观看| 国产老肥熟一区二区三区| 一区二区三区日韩欧美精品| 日韩美女在线视频| 在线精品亚洲一区二区不卡| 国产久卡久卡久卡久卡视频精品| 天天色 色综合| 国产精品毛片a∨一区二区三区| 51精品秘密在线观看| 91精品办公室少妇高潮对白| 国产伦精品一区二区三区视频青涩| 亚洲一区二区三区免费视频| 综合欧美亚洲日本| 国产亚洲欧美在线| 日韩一区二区三区电影| 欧美三级欧美一级| 91久久精品一区二区三| 国产毛片精品国产一区二区三区| 免费人成精品欧美精品| 亚洲成人一区二区在线观看| 亚洲欧美日韩国产手机在线| 国产精品进线69影院| 久久久99免费| 精品剧情v国产在线观看在线| 欧美日本乱大交xxxxx| 欧美电影免费观看高清完整版| 欧美视频一区在线| 91网站在线播放| 99免费精品在线| 波多野结衣中文一区| 国产91丝袜在线18| 国产精品小仙女| 国产精品一区二区在线观看不卡 | 一区二区三区电影在线播| 国产拍欧美日韩视频二区| 久久综合五月天婷婷伊人| 日韩欧美美女一区二区三区| 337p亚洲精品色噜噜狠狠| 欧美精品v日韩精品v韩国精品v| 在线观看日韩高清av| 欧美在线三级电影| 欧美在线视频日韩| 欧美精品视频www在线观看| 欧美日韩成人综合| 日韩亚洲欧美在线| 亚洲精品一区二区三区在线观看 | 亚洲制服丝袜一区| 午夜精品久久久| 青青国产91久久久久久| 青娱乐精品视频在线| 国产九色sp调教91| 国产丶欧美丶日本不卡视频| 成人h动漫精品一区二| 色伊人久久综合中文字幕| 欧美亚一区二区| 欧美一区二区黄| 久久综合狠狠综合久久激情| 中文字幕二三区不卡| 亚洲色图制服诱惑| 日韩精品一二三四| 精品影视av免费| 顶级嫩模精品视频在线看| 99精品视频中文字幕| 欧亚一区二区三区| 欧美tickling挠脚心丨vk| 亚洲国产精品成人久久综合一区 | 亚洲v日本v欧美v久久精品| 日韩av电影免费观看高清完整版 | 亚洲成av人影院| 精东粉嫩av免费一区二区三区| 国产成人av影院| 欧美在线你懂的| 精品久久久久一区| 日韩毛片一二三区| 免费久久99精品国产| 成人av影院在线| 这里只有精品视频在线观看| 国产欧美一区二区三区在线看蜜臀 | 日本色综合中文字幕| 高清shemale亚洲人妖| 在线观看一区不卡| 久久久国产一区二区三区四区小说| 中文字幕色av一区二区三区| 日日夜夜一区二区| 国产黄色91视频| 欧美日韩大陆一区二区| 亚洲国产成人自拍| 日韩精品高清不卡| av电影在线观看一区| 欧美成人精精品一区二区频| 亚洲精选一二三| 精彩视频一区二区| 欧美男女性生活在线直播观看| 国产日产欧美一区| 日韩黄色一级片| 一本色道久久综合精品竹菊| 欧美v日韩v国产v| 亚洲国产美女搞黄色| 成人性生交大合| 欧美电影免费观看高清完整版 | 亚洲伊人色欲综合网| 国产精品一区二区男女羞羞无遮挡 | 国产一区二区精品在线观看| 欧美伊人精品成人久久综合97| 国产亚洲精品资源在线26u| 亚洲6080在线| 日本丶国产丶欧美色综合| 精品黑人一区二区三区久久| 午夜日韩在线电影| 91免费观看在线| 中文字幕一区二区三区色视频 | 亚洲r级在线视频| 99久久国产免费看| 久久久久国产精品人| 日韩高清在线一区| 欧美色综合天天久久综合精品| 国产精品乱码久久久久久| 国产精品一色哟哟哟| 亚洲一区二区四区蜜桃| 91视视频在线观看入口直接观看www| 久久夜色精品一区| 久久国内精品视频| 884aa四虎影成人精品一区| 亚洲自拍偷拍图区| 91官网在线免费观看| 樱桃国产成人精品视频| 91天堂素人约啪| 亚洲色图自拍偷拍美腿丝袜制服诱惑麻豆| 国产99久久久国产精品潘金| 久久综合狠狠综合久久综合88| 久国产精品韩国三级视频| 日韩视频在线观看一区二区| 日本欧美一区二区三区乱码| 91精品国产综合久久福利| 日本视频一区二区三区| 日韩欧美国产一区在线观看| 久久激情五月激情| 精品毛片乱码1区2区3区| 精品一区二区三区免费观看| 精品国产电影一区二区| 激情欧美一区二区三区在线观看| 精品国产一区二区三区忘忧草| 久久精品国产网站| 久久婷婷成人综合色| 国产成人免费xxxxxxxx| 国产欧美精品日韩区二区麻豆天美| 国产成人一区在线| 国产精品人妖ts系列视频| 99r精品视频| 亚洲精品国产一区二区三区四区在线| 91婷婷韩国欧美一区二区| 亚洲一区二区三区四区在线| 欧美一区日韩一区| 狠狠狠色丁香婷婷综合激情| 久久电影网站中文字幕| 国产亚洲精品7777| 91丨九色丨蝌蚪富婆spa| 亚洲午夜视频在线| 欧美大片免费久久精品三p| 国产精品亚洲成人| 亚洲黄一区二区三区| 欧美精品九九99久久| 国产乱码精品一品二品| 亚洲三级在线看| 91精品国产福利| 国产精品一区免费在线观看| 亚洲乱码国产乱码精品精98午夜 | 欧美亚洲日本一区| 美女精品自拍一二三四| 亚洲国产经典视频| 欧美三级在线播放| 国产福利一区二区三区视频 | 国产日韩视频一区二区三区| 99久久精品国产麻豆演员表| 日韩精品欧美成人高清一区二区| 久久精品亚洲麻豆av一区二区| 91在线观看污| 美女一区二区久久| 国产精品久久久久7777按摩 | 国产日韩精品一区二区三区| 欧美亚洲国产一区二区三区va | 久久久综合网站| 91黄色免费版| 国产精品1024| 日韩av高清在线观看| 亚洲欧洲日韩女同| 日韩精品一区二区三区四区视频 | 亚洲欧美在线视频| 日韩免费观看2025年上映的电影| 91热门视频在线观看| 蜜臀91精品一区二区三区| **欧美大码日韩| 精品福利一二区| 欧美高清你懂得| 99久久精品一区二区| 久久99精品国产麻豆婷婷洗澡| 一区二区三区欧美在线观看| 欧美国产精品一区二区|