// iterate over the annotation array and detect matches
int currentPos = 0;
while (currentPos < annotFSs.length) {
// check for dictionary matches at the current token position
DictionaryMatch dictMatch = this.dictionaries[i].matchEntry(currentPos, annotFSs,
this.inputMatchFeaturePath);
// check if we have a dictionary match
if (dictMatch != null) {
// -- we have found a match starting at the current position --
// get match length of the match
int matchLength = dictMatch.getMatchLength();
// create annotation for the match we found
int start = annotFSs[currentPos].getBegin();
int end = annotFSs[currentPos + matchLength - 1].getEnd();
FeatureStructure fs = cas.createAnnotation(currentDictOutputType, start, end);