freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

自然語言理解工程報告(已改無錯字)

2023-03-19 16:14:57 本頁面
  

【正文】 int K1=0,K2=0,K3=0。 cout請輸入前 K1 個漢字 K1=。 cinK1。 cout請輸入前 K2 個詞 K2=。 cinK2。 cout請輸入前 K3 個詞 K3=。 cinK3。 output1()。 while(!()amp。amp。K1) { tmp=()。 ()。 outfile\tendl。 K1。 } outfileendl。 output2()。 while(!()amp。amp。K2) { tmp=()。 ()。 outfile\tendl。 K2。 } outfileendl。 output3()。 while(!()amp。amp。K3) { tmp=()。 ()。 outfile\tendl。 K3。 } outfileendl。 } int main() { init()。//初始化文本 double t。 t=start()。//計時 count()。 //統(tǒng)計漢字個數(shù) sort1()。 //排序 output4()。 close()。 end(t)。 //計時結(jié)束 system(pause)。 return 0。 } 二) 結(jié)果演示: (此處采用選擇字符輸出個數(shù)) (二) 切分語料 一) 代碼: includeiostream includefstream includevector includestring includemap includequeue includectime using namespace std。 ifstream infile1,infile2,infile3,infile4。 ofstream outfile1,outfile2,outfile3。 mapstring,intwordnum。 priority_queue pair int,string ,vector pair int,string queue1。//定義優(yōu)先隊列 void init()//文本初始 化 { (,ios::in)。//讀人民日報語料 if(!infile1) { cerropen error!endl。 exit(1)。 } char a[100]。 cout請輸入要切分的文件名: 。 cina。 (a,ios::in)。//待處理語料讀入 if(!infile4) { cerropen error!endl。 exit(1)。 } (,ios::out)。//結(jié)果 統(tǒng)計 if(!outfile1) { cerropen error!endl。 exit(1)。 } (,ios::out)。//未處理語料初步處理結(jié)果 if(!outfile2) { cerropen error!endl。 exit(1)。 } (,ios::app)。//輸出結(jié)果 if(!outfile2) { cerropen error!endl。 exit(1)。 } outfile3a切分結(jié)果: endl。 } void close() { ()。 ()。 ()。 ()。 ()。 ()。 ()。 } double start()//統(tǒng)計運(yùn)行時間,開始 { return clock()。 } void end(double t) { cout Elapsed Time: (clock()t)/CLOCKS_PER_SEC sendl。 } void count() { string s=。 int i=0。 unsigned char temp[100]。//最大長度為 100 unsigned char temp1[2]。 while(true)//從文本讀入人民日報語料,并統(tǒng)計 ,依據(jù)第一個字為漢字,以 39。\39。為結(jié)束標(biāo)志 { i=0。 infile1temp[i]。//逐個字符讀入 if(()) break。 if(temp[i]0x80) continue。 /*if(temp[i]0xB0)//除去 符號 { infile1temp[i]。 continue。 }*/ while((temp[i]!=39。/39。))//讀取 { if(temp[i]==39。{39。) break。 s+=temp[i]。 i++。 infile1temp[i]。 } wordnum[s]++。//對應(yīng)字頻加 1 s=。 } s=。 while(true)//要分詞語料的處理 ,添加未登陸字 { infile2temp1[0]。//逐個字符讀入 if(()) break。 if(temp1[0]=0x80)//GB2312 下的
點(diǎn)擊復(fù)制文檔內(nèi)容
環(huán)評公示相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號-1