new StringRecordIterator(new FileLineIterable(new File(input), encoding, false), pattern),
minSupport),
minSupport,
maxHeapSize,
features,
new StringOutputConverter(new SequenceFileOutputCollector<Text, TopKStringPatterns>(writer)),
new ContextStatusUpdater(null));
} finally {
Closeables.closeQuietly(writer);
}
} else {
FPGrowth<String> fp = new FPGrowth<String>();
Collection<String> features = new HashSet<String>();
try {
fp.generateTopKFrequentPatterns(
new StringRecordIterator(new FileLineIterable(new File(input), encoding, false), pattern),
fp.generateFList(
new StringRecordIterator(new FileLineIterable(new File(input), encoding, false), pattern),
minSupport),
minSupport,
maxHeapSize,
features,
new StringOutputConverter(new SequenceFileOutputCollector<Text, TopKStringPatterns>(writer)),
new ContextStatusUpdater(null));
} finally {
Closeables.closeQuietly(writer);
}
}