Class Exc

  • All Implemented Interfaces:
    Serializable, DictionaryElement

    public final class Exc
    extends Object
    implements DictionaryElement
    Represents an entry in an exception file. Contains all of the exceptions for the given lemma. Exception lists are alphabetized lists of inflected forms of words and their base forms. The first field of each line is an inflected form, followed by a space separated list of one or more base forms of the word. There is one exception list file for each syntactic category. From wndb.5WN in WordNet base documentation.
    See Also:
    Serialized Form
    • Constructor Detail

      • Exc

        public Exc​(POS pos,
                   String lemma,
                   List exceptions)
        Creates a new exception entry.
        Parameters:
        pos - - the part of speech
        lemma - - the word's lemma form
        exceptions - - the given exceptions
    • Method Detail

      • getPOS

        public POS getPOS()
        Gets the part of speech.
        Returns:
      • getLemma

        public String getLemma()
        Gets the lemma of the exception word.
        Returns:
        lemma
      • getException

        public String getException​(int index)
        Get the exception at index index.
      • getExceptionsSize

        public int getExceptionsSize()
        Gets the number of exceptions.
        Returns:
        int
      • getExceptionArray

        public String[] getExceptionArray()
        Get the collection of Exc objects in array form.
      • getExceptions

        public List getExceptions()
        Get the List of exceptions.
      • equals

        public boolean equals​(Object obj)
        Returns true if lemma and exceptions are equal.
        Overrides:
        equals in class Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object