MalformedDictionaryLineException (Apache OpenNLP :: Ext :: SpellChecker 3.0.0-M4 API)
Description: declaration: package: opennlp.spellcheck.dictionary, class: MalformedDictionaryLineException

Package opennlp.spellcheck.dictionary

# Class MalformedDictionaryLineException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.io.IOException
opennlp.spellcheck.dictionary.MalformedDictionaryLineException

All Implemented Interfaces:
  `Serializable`

public class MalformedDictionaryLineException extends IOException
Signals that a line in a plain-text frequency dictionary did not match the expected `word<TAB>count` (or `w1 w2<TAB>count`) shape and could not be parsed.

The (1-based) line number and a truncated copy of the offending line are recorded to make the failure easy to locate in large dictionaries.

See Also:
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `MalformedDictionaryLineException(long lineNumber, String line, String reason)`
  Creates a new exception.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `long`
  `getLineNumber()`

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

  `addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

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

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

- ## Constructor Details

  - ### MalformedDictionaryLineException

    public MalformedDictionaryLineException(long lineNumber, String line, String reason)
    Creates a new exception.
    Parameters:
      `lineNumber` - the 1-based number of the offending line
      `line` - the raw text of the offending line
      `reason` - a human-readable description of what was expected

- ## Method Details

  - ### getLineNumber

    public long getLineNumber()
    Returns:
      the 1-based number of the offending line.