Hyphenator constructor
Hyphenator({
- required ResourceLoader resource,
- String hyphenateSymbol = '\u{00AD}',
- int minWordLength = 5,
- int minLetterCount = 3,
Implementation
Hyphenator({
required ResourceLoader resource,
this.hyphenateSymbol = '\u{00AD}',
this.minWordLength = 5,
this.minLetterCount = 3,
}) : assert(minWordLength > 0),
_patterns = resource.patternsStrings
.map(
(pattern) => Pattern.from(pattern),
)
.toList()
..sort() {
_exceptions.addEntries(
resource.exceptionsStrings.map(
(exception) => MapEntry(
exception.replaceAll(_exceptionDelimiter, ''),
_createExceptionMask(exception),
),
),
);
}