1

所属分类:JavaScript/JQuery
开发工具:Java
文件大小:17KB
下载次数:2
上传日期:2016-10-08 22:33:21
上 传 者叶子有一个噩梦
说明:  功能方法一 public static ArrayList<String> getWordsFromSentence(String sentence) 1.把一个句子拆分成单词,然后把它们返回到数组列表中 (用短语分割符号,去除完毕不能再包含短语分割符,不要清除单词中的 _ , - , \ ) 2.把其中所有大写的单词变成小写 2.返回清除了标点符号的单词放到 ArrayList <String> getWordsFromSentence 的返回值中 功能方法二 public static String cleanWord(String word) 1.删除单词的前导和尾随标点符号字符(不要清除单词中的 _ , - , \ ) 2.单个单词中所有的大小写归一成小写 3.处理 _ , - , \ 思考需要怎么处理 4.返回清除了标点符号的单词放到 cleanWord(String word)的返回值中 功能方法三 public static ArrayList<String> convertFileLinesToSentences(ArrayList<String> filelines) 1.从一个文件文本中分割成一个新数组列表,每个条目存放一句句子,并且不能对文件文本进行其他变化。 注意三点: 1分割的标记为句子分割符以及文档结尾(分割完毕句子分割符不能再包含在句子中)2去除句子首位的多于空格3句子不能为空句子
(Functional approach a public static ArrayList <String> getWordsFromSentence (String sentence) 1. put a sentence split into words, and then return them to the array list (using the phrase segmentation symbols, complete removal can no longer contain the phrase delimiter, do not remove the word " _" , " -" " \" ) 2. all uppercase words to lowercase 2. return cleared punctuation words into ArrayList <String> getWordsFromSentence function return value Method two public static String cleanWord (String word) 1. Delete the word of the leading and trailing punctuation characters (do not remove the word " _" , " -" , " \" ) 2. Single word All case normalized to lowercase Solution " _" , " -" , " \" Consideration needs to deal with how 4. return cleared punctuation words into cleanWord (String word) return value method three public functions static ArrayList <String> convertFileLinesToSentences (ArrayList )

文件列表:
1\SentenceAnalyser.java (3338, 2016-04-26)
1\SentenceAnalyser代码.docx (14648, 2016-04-23)
1\String 作业.txt (1220, 2016-04-08)
1\String方法摘要 .txt (6555, 2016-04-18)
1 (0, 2016-10-08)

近期下载者

相关文件


收藏者