OutputCollector<Text,StringTuple> output, Reporter reporter) throws IOException {
TokenStream stream = analyzer.tokenStream(key.toString(), new StringReader(value.toString()));
TermAttribute termAtt = (TermAttribute) stream.addAttribute(TermAttribute.class);
StringTuple document = new StringTuple();
while (stream.incrementToken()) {
if (termAtt.termLength() > 0) {
document.add(new String(termAtt.termBuffer(), 0, termAtt.termLength()));
}
}
output.collect(key, document);
}