Type | Name and description |
---|---|
static String |
create |
static def |
endPunctuationList endPunctuationList the list of punctuation symbols that can be removed from the ends of words |
static int |
errorState |
static def |
fileHandle |
String |
fileName |
static def |
fileReader |
static String |
finalise |
static String |
indicesMap |
static String |
init |
def |
intValues |
static int |
maxBufferSize |
static String |
processBuffer |
def |
punctuatedWords |
static def |
startPunctuationList startPunctuationList the list of punctuation symbols that can be removed from the start of words |
def |
unPunctuatedWords |
static String |
valueList |
static String |
wordsMap |
Constructor and description |
---|
ConcordanceWords
() |
Type Params | Return Type | Name and description |
---|---|---|
|
static def |
charSum(def w) charSum transforms a word into a single integer based upon the sum of the ASCII characters that make up the word |
|
static def |
createBuffer(FileReader fileReader, int maxWords) Reads the file a line at a time using the fileReader and returns at least maxWords in buffer, except for the last buffer. |
|
int |
createInstance(List d) |
|
int |
createWordsAndIntValues(List d) |
|
int |
initClass(List d) |
|
static def |
processLine(def line) processLine takes a line of text which is split into words using tokenize(' ') |
|
static def |
removePunctuation(def w) removePunctuation removes any punctuation characters from the start and end of a word |
endPunctuationList the list of punctuation symbols that can be removed from the ends of words
startPunctuationList the list of punctuation symbols that can be removed from the start of words
charSum transforms a word into a single integer based upon the sum of the ASCII characters that make up the word
w
- String containing word to be transformed into an integerReads the file a line at a time using the fileReader and returns at least maxWords in buffer, except for the last buffer. Once the end of file is reached the method returns a null value. Words in the buffer may include punctuation.
fileReader
- The file fileName's associated fileReadermaxWords
- The minimum number of words in a returned buffer
processLine takes a line of text which is split into words using tokenize(' ')
line
- a line that has been read from a fileDemonstrations of the Use of the Groovy Parallel Patterns Library generated 18-09-2017 by Jon Kerridge, Edinburgh Napier University - j.kerridge@napier.ac.uk