private PhraseSequenceGenerator(Builder builder) throws IOException { this.lowercase = builder.lowercase; this.coveringTypeName = builder.coveringType; this.minTokenLength = builder.minTokenLength; this.featurePath = builder.featurePath; stopwords = builder.stopwordsFile.isPresent() ? TextUtils.readStopwordsURL(builder.stopwordsFile.get(), lowercase) : Collections.emptySet(); this.stopwordReplacement = builder.stopwordsReplacement; this.filterRegexes = builder.filterRegexes; this.filterRegexReplacement = builder.filterRegexReplacement; this.useCharacters = builder.characters; }
private PhraseSequenceGenerator(Builder builder) throws IOException { this.lowercase = builder.lowercase; this.coveringTypeName = builder.coveringType; this.minTokenLength = builder.minTokenLength; this.featurePath = builder.featurePath; stopwords = builder.stopwordsFile.isPresent() ? TextUtils.readStopwordsURL(builder.stopwordsFile.get(), lowercase) : Collections.emptySet(); this.stopwordReplacement = builder.stopwordsReplacement; this.filterRegexes = builder.filterRegexes; this.filterRegexReplacement = builder.filterRegexReplacement; this.useCharacters = builder.characters; }