(Pseudo code is acceptable) Please provide the function getValidWords, it should be runnable for the flatMap and filter out any words with non-alphabet characters. The basic purpose of this function is used to get the pure word frequency in one text file. (回答中请包含函数代码)

回答后才能看到答案和解析