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

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

?? stop.c

?? 信息檢索中常用的技術
?? C
?? 第 1 頁 / 共 2 頁
字號:
            Part 2: If not found, add the label to the tree            Part 3: Return the state number   Notes:   This machine always returns a state with the given label            because if the machine does not have a state with the given            label, then one is created.**/static intGetState( machine, label, signature )   DFA machine;        /* in: DFA whose state labels are searched */   StrList label;      /* in: state label searched for */   unsigned signature; /* in: signature of the label requested */   {   SearchTree *ptr;       /* pointer to a search tree link field */   SearchTree new_node;   /* for a newly added search tree node */             /* Part 1: Search the tree for the requested state */   ptr = &(machine->tree);   while ( (NULL != *ptr) && (   (signature != (*ptr)->signature)                              || !StrListEqual((StrList)label,(*ptr)->label)) )      ptr = (signature <= (*ptr)->signature) ? &(*ptr)->left : &(*ptr)->right;             /* Part 2: If not found, add the label to the tree */   if ( NULL == *ptr )      {         /* create a new node and fill in its fields */      new_node = (SearchTree)GetMemory( NULL, sizeof(SearchTreeNode) );      new_node->signature = signature;      new_node->label = (StrList)label;      new_node->state = machine->num_states;      new_node->left = new_node->right = NULL;         /* allocate more states if needed, set up the new state */      if ( machine->num_states == machine->max_states )         {         machine->max_states += TABLE_INCREMENT;         machine->state_table =           (StateTable)GetMemory( (char *)machine->state_table,                                  machine->max_states*sizeof(StateTableEntry));         }      machine->state_table[machine->num_states].label = (StrList)label;      machine->num_states++;         /* hook the new node into the binary search tree */      *ptr = new_node;      }   else      StrListDestroy( (StrList)label );                   /* Part 3: Return the state number */   return( (*ptr)->state );   } /* GetState *//*FN***************************************************************************        AddArc( machine, state, arc_label, state_label, state_signature )   Returns: void   Purpose: Add an arc between two states in a DFA   Plan:    Part 1: Search for the target state among existing states            Part 2: Make sure the arc table is big enough            Part 3: Add the new arc   Notes:   None.**/static voidAddArc( machine, state, arc_label, state_label, state_signature )   DFA machine;              /* in/out: machine with an arc added */   int state;                /* in: with an out arc added */   char arc_label;           /* in: label on the new arc */   StrList state_label;      /* in: label on the target state */   unsigned state_signature; /* in: label hash signature to speed searching */   {   register int target;   /* destination state for the new arc */        /* Part 1: Search for the target state among existing states */   StrListSort( state_label );   target = GetState( machine, state_label, state_signature );               /* Part 2: Make sure the arc table is big enough */   if ( machine->num_arcs == machine->max_arcs )      {      machine->max_arcs += TABLE_INCREMENT;      machine->arc_table =         (ArcTable)GetMemory( (char *)machine->arc_table,                              machine->max_arcs * sizeof(ArcTableEntry) );      }                        /* Part 3: Add the new arc */   machine->arc_table[machine->num_arcs].label = arc_label;   machine->arc_table[machine->num_arcs].target = target;   machine->num_arcs++;   machine->state_table[state].num_arcs++;   } /* AddArc *//*FN***************************************************************************        BuildDFA( words )   Returns: DFA -- newly created finite state machine   Purpose: Build a DFA to recognize a list of words   Plan:    Part 1: Allocate space and initialize variables            Part 2: Make and label the DFA start state            Part 3: Main loop - build the state and arc tables            Part 4: Deallocate the binary search tree and the state labels            Part 5: Reallocate the tables to squish them down            Part 6: Return the newly constructed DFA   Notes:   None.**/DFABuildDFA( words )   StrList words;  /* in: that the machine is built to recognize */   {   DFA machine;               /* local for easier access to machine */   register int state;        /* current state's state number */   char arc_label;            /* for the current arc when adding arcs */   char *string;              /* element in a set of state labels */   char ch;                   /* the first character in a new string */   StrList current_label;     /* set of strings labeling a state */   StrList target_label;      /* labeling the arc target state */   unsigned target_signature; /* hashed label for binary search tree */   register int i;            /* for looping through strings */              /* Part 1: Allocate space and initialize variables */   machine = (DFA)GetMemory( NULL, sizeof(DFAStruct) );   machine->max_states = TABLE_INCREMENT;   machine->state_table =      (StateTable)GetMemory(NULL, machine->max_states*sizeof(StateTableEntry));   machine->num_states = 0;   machine->max_arcs = TABLE_INCREMENT;   machine->arc_table =      (ArcTable)GetMemory( NULL, machine->max_arcs * sizeof(ArcTableEntry) );   machine->num_arcs = 0;   machine->tree = NULL;                /* Part 2: Make and label the DFA start state */   StrListUnique( words );               /* sort and unique the list */   machine->state_table[0].label = words;   machine->num_states = 1;            /* Part 3: Main loop - build the state and arc tables */   for ( state = 0; state < machine->num_states; state++ )      {              /* The current state has nothing but a label, so */              /* the first order of business is to set up some */              /* of its other major fields                     */      machine->state_table[state].is_final = FALSE;      machine->state_table[state].arc_offset = machine->num_arcs;      machine->state_table[state].num_arcs = 0;             /* Add arcs to the arc table for the current state */             /* based on the state's derived set.  Also set the */             /* state's final flag if the empty string is found */             /* in the suffix list                              */      current_label = machine->state_table[state].label;      target_label = StrListCreate();      target_signature = HASH_START;      arc_label = EOS;      for ( i = 0; i < StrListSize(current_label); i++ )         {            /* get the next string in the label and lop it */         string = StrListPeek( current_label, i );         ch = *string++;            /* the empty string means mark this state as final */         if ( EOS == ch )            { machine->state_table[state].is_final = TRUE; continue; }            /* make sure we have a legitimate arc_label */         if ( EOS == arc_label ) arc_label = ch;            /* if the first character is new, then we must */            /* add an arc for the previous first character */         if ( ch != arc_label )            {            AddArc(machine, state, arc_label, target_label, target_signature);            target_label = StrListCreate();            target_signature = HASH_START;            arc_label = ch;            }            /* add the current suffix to the target state label */         StrListAppend( target_label, string );         target_signature += (*string + 1) * HASH_INCREMENT;         while ( *string ) target_signature += *string++;         }              /* On loop exit we have not added an arc for the */              /* last bunch of suffixes, so we must do so, as  */              /* long as the last set of suffixes is not empty */              /* (which happens when the current state label   */              /* is the singleton set of the empty string).    */      if ( 0 < StrListSize(target_label) )         AddArc( machine, state, arc_label, target_label, target_signature );      }      /* Part 4: Deallocate the binary search tree and the state labels */   DestroyTree( machine->tree );  machine->tree = NULL;   for ( i = 0; i < machine->num_states; i++ )      {      StrListDestroy( machine->state_table[i].label );      machine->state_table[i].label = NULL;      }            /* Part 5: Reallocate the tables to squish them down */   machine->state_table = (StateTable)GetMemory( (char *)machine->state_table,                               machine->num_states * sizeof(StateTableEntry) );   machine->arc_table = (ArcTable)GetMemory( (char *)machine->arc_table,                               machine->num_arcs * sizeof(ArcTableEntry) );                /* Part 6: Return the newly constructed DFA */   return( machine );   } /* BuildDFA *//*FN***************************************************************************        GetTerm( stream, machine, size, output )   Returns: char * -- NULL if stream is exhausted, otherwise output buffer   Purpose: Get the next token from an input stream, filtering stop words   Plan:    Part 1: Return NULL immediately if there is no input            Part 2: Initialize the local variables            Part 3: Main Loop: Put an unfiltered word into the output buffer            Part 4: Return the output buffer   Notes:   This routine runs the DFA provided as the machine parameter,            and collects the text of any term in the output buffer.  If            a stop word is recognized in this process, it is skipped.            Care is also taken to be sure not to overrun the output buffer.**/char *GetTerm( stream, machine, size, output )   FILE *stream;    /* in: source of input characters */   DFA machine;     /* in: finite state machine driving process */   int size;        /* in: bytes in the output buffer */   char *output;    /* in/out: where the next token in placed */   {   char *outptr;        /* for scanning through the output buffer */   int ch;              /* current character during input scan */   register int state;  /* current state during DFA execution */           /* Part 1: Return NULL immediately if there is no input */   if ( EOF == (ch = getc(stream)) ) return( NULL );                  /* Part 2: Initialize the local variables */   outptr = output;     /* Part 3: Main Loop: Put an unfiltered word into the output buffer */   do      {         /* scan past any leading delimiters */      while ( (EOF != ch ) &&              ((DELIM_CH == char_class[ch]) ||               (DIGIT_CH == char_class[ch])) ) ch = getc( stream );         /* start the machine in its start state */      state = 0;         /* copy input to output until reaching a delimiter, and also */         /* run the DFA on the input to watch for filtered words      */      while ( (EOF != ch) && (DELIM_CH != char_class[ch]) )         {         if ( outptr == (output+size-1) ) { outptr = output; state = 0; }         *outptr++ = convert_case[ch];         if ( DEAD_STATE != state )            {            register int i;   /* for scanning through arc labels */            int arc_start;    /* where the arc label list starts */            int arc_end;      /* where the arc label list ends */            arc_start = machine->state_table[state].arc_offset;            arc_end = arc_start + machine->state_table[state].num_arcs;            for ( i = arc_start; i < arc_end; i++ )               if ( convert_case[ch] == machine->arc_table[i].label )                  { state = machine->arc_table[i].target; break; }            if ( i == arc_end ) state = DEAD_STATE;            }         ch = getc( stream );         }         /* start from scratch if a stop word is recognized */      if ( (DEAD_STATE != state) && machine->state_table[state].is_final )         outptr = output;         /* terminate the output buffer */      *outptr = EOS;      }   while ( (EOF != ch) && !*output );                    /* Part 4: Return the output buffer */   return( output );   } /* GetTerm */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91小视频免费观看| 日本一区二区成人| 日本一区二区视频在线| 亚洲国产精品一区二区www在线| 免费在线欧美视频| 一本久道中文字幕精品亚洲嫩| 欧美一级搡bbbb搡bbbb| 亚洲人成精品久久久久| 美脚の诱脚舐め脚责91 | 91女厕偷拍女厕偷拍高清| 日韩你懂的在线观看| 亚洲高清中文字幕| 91丨porny丨中文| 国产婷婷色一区二区三区在线| 午夜欧美一区二区三区在线播放| 99精品热视频| 亚洲欧洲精品成人久久奇米网| 精品系列免费在线观看| 这里只有精品电影| 亚洲va韩国va欧美va精品| 一本久久综合亚洲鲁鲁五月天| 国产精品国产三级国产普通话99| 国产成人在线视频网址| 久久久久国产精品麻豆ai换脸| 九九**精品视频免费播放| 欧美一区二区三区爱爱| 亚洲va韩国va欧美va| 欧美精品日韩一本| 午夜精品福利一区二区三区av | 日韩精品一区在线观看| 亚洲小说欧美激情另类| 欧美日韩日本视频| 五月婷婷色综合| 欧美精品乱码久久久久久| 午夜伦欧美伦电影理论片| 欧美精品三级在线观看| 天堂成人免费av电影一区| 日韩欧美一级二级三级| 日韩成人免费看| 91精品国产综合久久久久| 青青草视频一区| 欧美一级日韩一级| 国产成人免费在线视频| 亚洲视频综合在线| 欧美亚洲综合色| 青青草国产成人av片免费| 精品国产免费人成电影在线观看四季 | 日本一区二区不卡视频| 99久久精品久久久久久清纯| 洋洋成人永久网站入口| 91精品国产综合久久精品app| 久久国产视频网| 国产精品久久三| 精品1区2区3区| 久久成人18免费观看| 国产精品久线观看视频| 欧美色综合天天久久综合精品| 日本一不卡视频| 久久精品视频在线免费观看 | 国产凹凸在线观看一区二区| 一区二区中文视频| 欧美一级欧美一级在线播放| 国产成人精品免费| 亚洲韩国精品一区| 久久久三级国产网站| 91丨九色丨国产丨porny| 日韩av在线免费观看不卡| 中文av字幕一区| 欧美精品久久天天躁| 成人性生交大合| 亚洲午夜日本在线观看| 久久久精品tv| 欧美一区二区视频在线观看2022| 岛国精品在线观看| 欧美a一区二区| 亚洲精品视频在线看| 久久新电视剧免费观看| 欧美日韩在线播放| 91丨porny丨蝌蚪视频| 久久国产精品色| 五月婷婷色综合| 亚洲精品视频一区二区| 久久久久亚洲综合| 欧美一区二区在线不卡| 色天使久久综合网天天| 国产很黄免费观看久久| 免费观看成人av| 亚洲一区二区三区视频在线播放 | 91久久一区二区| 高清在线观看日韩| 美女视频黄 久久| 亚洲永久精品大片| 中文字幕在线不卡一区二区三区| 欧美精品一区二区三区蜜桃视频| 欧美精三区欧美精三区| 色94色欧美sute亚洲线路二| 成人av资源网站| 成人午夜又粗又硬又大| 国产一区不卡视频| 国产一区二区在线看| 免费国产亚洲视频| 肉肉av福利一精品导航| 午夜伊人狠狠久久| 亚洲成av人片在www色猫咪| 亚洲欧美成人一区二区三区| 国产精品久久久久7777按摩| 国产情人综合久久777777| 久久久久国产一区二区三区四区| 精品国产乱码久久久久久闺蜜| 91精品国产综合久久小美女| 正在播放亚洲一区| 日韩三级高清在线| 欧美第一区第二区| 日韩欧美激情在线| 亚洲精品一区二区三区蜜桃下载| 日韩欧美一级在线播放| 久久综合成人精品亚洲另类欧美 | 日韩一区精品视频| 欧美aⅴ一区二区三区视频| 青青草成人在线观看| 激情综合网最新| 国产一区二区导航在线播放| 成人影视亚洲图片在线| 波多野结衣视频一区| av动漫一区二区| 91免费版pro下载短视频| 99久久精品久久久久久清纯| 日本黄色一区二区| 这里只有精品99re| 亚洲精品一区二区三区福利| 国产清纯白嫩初高生在线观看91 | 免费不卡在线视频| 国内精品免费在线观看| 国产激情视频一区二区在线观看 | 欧美国产精品专区| ...xxx性欧美| 亚洲第一成人在线| 激情小说欧美图片| 成人国产精品免费观看视频| 在线观看日韩毛片| 91精品国产综合久久婷婷香蕉| www国产成人免费观看视频 深夜成人网| 久久综合久久综合九色| 日韩美女精品在线| 日韩成人免费电影| 国产成人免费在线观看| 欧美在线色视频| 精品福利一二区| 亚洲精品乱码久久久久久黑人 | av成人免费在线观看| 欧美狂野另类xxxxoooo| 精品99999| 日韩美女啊v在线免费观看| 日韩精品一级二级| 国产91在线观看| 欧美日韩免费电影| 国产视频一区二区在线| 亚洲第一综合色| 国产jizzjizz一区二区| 在线观看国产一区二区| 国产亚洲综合av| 亚洲国产精品自拍| 国产成人av一区二区三区在线观看| 在线免费一区三区| 欧美激情一区二区三区蜜桃视频| 亚洲一区二区三区在线看| 国产精品自拍三区| 5月丁香婷婷综合| 中文字幕一区二区视频| 老汉av免费一区二区三区| 色悠悠久久综合| 国产日韩视频一区二区三区| 丝袜诱惑亚洲看片 | 国产一区在线看| 欧美一区二区视频在线观看2022| 亚洲老妇xxxxxx| 国产成人精品网址| 26uuu亚洲综合色| 日韩精品一二三四| 欧美日韩一区二区三区在线看| 国产精品素人视频| 国产一区二区免费在线| 日韩一区二区三区视频在线| 一区二区三区精品| 99久久久精品免费观看国产蜜| 久久只精品国产| 蜜臀av一区二区| 日韩一二三区不卡| 日韩成人伦理电影在线观看| 欧美四级电影网| 亚洲激情图片qvod| 色综合久久久久久久久| 综合欧美亚洲日本| 暴力调教一区二区三区| 国产欧美视频一区二区三区| 国内久久精品视频| 久久精品在线免费观看| 国产一区二区毛片| 亚洲国产精品成人综合色在线婷婷| 国产精品18久久久久久久久 |