public SynonymFilter(TokenStream input, SynonymMap synonyms, boolean ignoreCase) {super(input);this.synonyms = synonyms;this.ignoreCase = ignoreCase;this.fst = synonyms.fst;if (fst == null) {throw new IllegalArgumentException("fst must be non-null");}this.fstReader = fst.getBytesReader();rollBufferSize = 1+synonyms.maxHorizontalContext;futureInputs = new PendingInput[rollBufferSize];futureOutputs = new PendingOutputs[rollBufferSize];for(int pos=0;pos<rollBufferSize;pos++) {futureInputs[pos] = new PendingInput();futureOutputs[pos] = new PendingOutputs();}scratchArc = new FST.Arc<>();}

public SynonymFilter(TokenStream input, SynonymMap synonyms, bool ignoreCase): base(input){termAtt = AddAttribute<ICharTermAttribute>();posIncrAtt = AddAttribute<IPositionIncrementAttribute>();posLenAtt = AddAttribute<IPositionLengthAttribute>();typeAtt = AddAttribute<ITypeAttribute>();offsetAtt = AddAttribute<IOffsetAttribute>();this.synonyms = synonyms;this.ignoreCase = ignoreCase;this.fst = synonyms.Fst;if (fst == null){throw new System.ArgumentException("fst must be non-null");}this.fstReader = fst.GetBytesReader();rollBufferSize = 1 + synonyms.MaxHorizontalContext;futureInputs = new PendingInput[rollBufferSize];futureOutputs = new PendingOutputs[rollBufferSize];for (int pos = 0; pos < rollBufferSize; pos++){futureInputs[pos] = new PendingInput();futureOutputs[pos] = new PendingOutputs();}scratchArc = new FST.Arc<BytesRef>();}
