public ShingleAnalyzerWrapper(Analyzer delegate,int minShingleSize,int maxShingleSize,String tokenSeparator,boolean outputUnigrams,boolean outputUnigramsIfNoShingles,String fillerToken) {super(delegate.getReuseStrategy());this.delegate = delegate;if (maxShingleSize < 2) {throw new IllegalArgumentException("Max shingle size must be >= 2");}this.maxShingleSize = maxShingleSize;if (minShingleSize < 2) {throw new IllegalArgumentException("Min shingle size must be >= 2");}if (minShingleSize > maxShingleSize) {throw new IllegalArgumentException("Min shingle size must be <= max shingle size");}this.minShingleSize = minShingleSize;this.tokenSeparator = (tokenSeparator == null ? "" : tokenSeparator);this.outputUnigrams = outputUnigrams;this.outputUnigramsIfNoShingles = outputUnigramsIfNoShingles;this.fillerToken = fillerToken;}

public ShingleAnalyzerWrapper(Analyzer @delegate, int minShingleSize, int maxShingleSize,string tokenSeparator, bool outputUnigrams, bool outputUnigramsIfNoShingles, string fillerToken): base(@delegate.Strategy){this.@delegate = @delegate;if (maxShingleSize < 2){throw new ArgumentOutOfRangeException("Max shingle size must be >= 2");}this.maxShingleSize = maxShingleSize;if (minShingleSize < 2){throw new ArgumentOutOfRangeException("Min shingle size must be >= 2");}if (minShingleSize > maxShingleSize){throw new ArgumentOutOfRangeException("Min shingle size must be <= max shingle size");}this.minShingleSize = minShingleSize;this.tokenSeparator = (tokenSeparator == null ? "" : tokenSeparator);this.outputUnigrams = outputUnigrams;this.outputUnigramsIfNoShingles = outputUnigramsIfNoShingles;this.fillerToken = fillerToken;}
