} else {
textIterator = new SrxTextIterator(document, languageCode, reader, parameterMap);
}
} else if (algorithm == Algorithm.fast) {
if (text != null) {
textIterator = new FastTextIterator(document, languageCode, text, parameterMap);
} else {
textIterator = new FastTextIterator(document, languageCode, reader, parameterMap);
}
} else {
throw new IllegalArgumentException("Unknown algorithm: " + algorithm + ".");
}