文件名称:English-sentence-word
介绍说明--下载内容均来自于网络,请自行研究使用
分词思想:用是s[]来存取输入的句子,t[h][j]来存储分词后的每个单词,由于每个单词也是一个字符串
,所以要用二维数组来存,然后从s中逐个读入字符,如果是字符就将当前s[i]存入t[h][j],并
j+1,如果是空格或标点则结束上一个单词的读入,h+1,并将j置0准备下一个单词的存储-Word idea: use is s [] to access the input sentence, t [h] [j] to store each word after word, because each word is a string, so use two-dimensional array to store, and then s read one by one from the character, the character will be present if s [i] into t [h] [j], and j+1, if spaces or punctuation on the end of a word is read, h+1, and j 0 is set ready for the next word in the memory
,所以要用二维数组来存,然后从s中逐个读入字符,如果是字符就将当前s[i]存入t[h][j],并
j+1,如果是空格或标点则结束上一个单词的读入,h+1,并将j置0准备下一个单词的存储-Word idea: use is s [] to access the input sentence, t [h] [j] to store each word after word, because each word is a string, so use two-dimensional array to store, and then s read one by one from the character, the character will be present if s [i] into t [h] [j], and j+1, if spaces or punctuation on the end of a word is read, h+1, and j 0 is set ready for the next word in the memory
(系统自动生成,下载前可以参看下载内容)
下载文件列表
English sentence word.cpp