Setup PatternExtractor to read and write from a data file.