Description: 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
To Search:
File list (Check if you may need any files):
1\SentenceAnalyser.java
.\SentenceAnalyser代码.docx
.\String 作业.txt
.\String方法摘要 .txt
1