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
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:
-
Constructor Summary
ConstructorsConstructorDescriptionMalformedDictionaryLineException(long lineNumber, String line, String reason) Creates a new exception. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
MalformedDictionaryLineException
Creates a new exception.- Parameters:
lineNumber- the 1-based number of the offending lineline- the raw text of the offending linereason- a human-readable description of what was expected
-
-
Method Details
-
getLineNumber
public long getLineNumber()- Returns:
- the 1-based number of the offending line.
-