public static class PhraseSequenceGenerator.Builder extends Object
PhraseSequenceGenerator
s.
Alternative constructs a StringSequenceGenerator
with buildStringSequenceGenerator()
Constructor and Description |
---|
Builder() |
public PhraseSequenceGenerator.Builder featurePath(String featurePath)
featurePath
- set the feature path to use for creating token sequences.PhraseSequenceGenerator.Builder
public PhraseSequenceGenerator.Builder stopwordsFile(String stopwordsFile) throws MalformedURLException
MalformedURLException
public PhraseSequenceGenerator.Builder stopwordsFile(File stopwordsFile) throws MalformedURLException
MalformedURLException
public PhraseSequenceGenerator.Builder stopwordsURL(URL stopwordsURL)
stopwordsURL
- set the location of the stopwords filePhraseSequenceGenerator.Builder
public PhraseSequenceGenerator.Builder stopwordsReplacement(String stopwordsReplacement)
stopwordsReplacement
- stopwords are replaced by this string or removed if replacement string is emptyPhraseSequenceGenerator.Builder
public PhraseSequenceGenerator.Builder minTokenLength(int minTokenLength)
minTokenLength
- tokens shorter than the given length are filtered outPhraseSequenceGenerator.Builder
public PhraseSequenceGenerator.Builder filterRegex(String filterRegex)
filterRegex
- Tokens matching this regular expression are filtered out.PhraseSequenceGenerator.Builder
public PhraseSequenceGenerator.Builder filterRegexReplacement(String filterRegexReplacement)
filterRegexReplacement
- tokens matching the filterRegexes
are replaced by this string. If this is empty, these tokens are removed.PhraseSequenceGenerator.Builder
public PhraseSequenceGenerator.Builder lowercase(boolean lowercase)
lowercase
- If true, all tokens are lowercasedPhraseSequenceGenerator.Builder
public PhraseSequenceGenerator.Builder coveringType(String coveringType)
coveringType
- if set, a separate string sequence is generated for each sequence covered
by the covering type, e.g. one sequence for each sentence.PhraseSequenceGenerator.Builder
public PhraseSequenceGenerator.Builder characters(boolean characters)
characters
- a booleanPhraseSequenceGenerator.Builder
public PhraseSequenceGenerator build() throws IOException
PhraseSequenceGenerator
PhraseSequenceGenerator
instanceIOException
- if a stopwords file is specified but cannot be readpublic StringSequenceGenerator buildStringSequenceGenerator() throws IOException
StringSequenceGenerator
that directly returns Strings
instead of LexicalPhrase
s.StringSequenceGenerator
instanceIOException
- if a stopwords file is specified but cannot be readCopyright © 2007–2018 Ubiquitous Knowledge Processing (UKP) Lab, Technische Universität Darmstadt. All rights reserved.