Package opennlp.spellcheck.normalizer

# Class SpellCheckingCharSequenceNormalizer.Builder

java.lang.Object
opennlp.spellcheck.normalizer.SpellCheckingCharSequenceNormalizer.Builder

Enclosing class:
  `SpellCheckingCharSequenceNormalizer`

public static final class SpellCheckingCharSequenceNormalizer.Builder extends Object
A mutable builder for `SpellCheckingCharSequenceNormalizer`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `SpellCheckingCharSequenceNormalizer`
  `build()`
  `SpellCheckingCharSequenceNormalizer.Builder`
  `maxEditDistance(int value)`
  `SpellCheckingCharSequenceNormalizer.Builder`
  `minTokenLength(int value)`
  `SpellCheckingCharSequenceNormalizer.Builder`
  `mode(SpellCheckingCharSequenceNormalizer.Mode value)`
  `SpellCheckingCharSequenceNormalizer.Builder`
  `skipNumbers(boolean value)`
  `SpellCheckingCharSequenceNormalizer.Builder`
  `skipUrls(boolean value)`

  ### Methods inherited from class java.lang.Object

  `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### mode

    public SpellCheckingCharSequenceNormalizer.Builder mode(SpellCheckingCharSequenceNormalizer.Mode value)
    Parameters:
      `value` - the correction mode; must not be `null`
    Returns:
      this builder
    Throws:
      `IllegalArgumentException` - if `value` is `null`

  - ### minTokenLength

    public SpellCheckingCharSequenceNormalizer.Builder minTokenLength(int value)
    Parameters:
      `value` - tokens shorter than this are left untouched; must be `>= 1`
    Returns:
      this builder

  - ### maxEditDistance

    public SpellCheckingCharSequenceNormalizer.Builder maxEditDistance(int value)
    Parameters:
      `value` - the maximum edit distance considered per token; must be `>= 0`
    Returns:
      this builder

  - ### skipNumbers

    public SpellCheckingCharSequenceNormalizer.Builder skipNumbers(boolean value)
    Parameters:
      `value` - whether to skip purely numeric tokens (default `true`)
    Returns:
      this builder

  - ### skipUrls

    public SpellCheckingCharSequenceNormalizer.Builder skipUrls(boolean value)
    Parameters:
      `value` - whether to skip URL- and email-like tokens (default `true`)
    Returns:
      this builder

  - ### build

    public SpellCheckingCharSequenceNormalizer build()
    Returns:
      the configured normalizer.