Class IndexWord

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String _cachedToString  
      private java.lang.String _lemma
      The string representation of this IndexWord
      private POS _pos
      This word's part-of-speech
      private long[] _synsetOffsets
      senses are initially stored as offsets, and paged in on demand.
      private Synset[] _synsets
      This is null until getSenses has been called.
      private boolean _synsetsLoaded
      True when all synsets have been loaded
      (package private) static long serialVersionUID  
    • Constructor Summary

      Constructors 
      Constructor Description
      IndexWord​(java.lang.String lemma, POS pos, long[] synsetOffsets)  
    • Field Detail

      • _pos

        private POS _pos
        This word's part-of-speech
      • _lemma

        private java.lang.String _lemma
        The string representation of this IndexWord
      • _synsetOffsets

        private long[] _synsetOffsets
        senses are initially stored as offsets, and paged in on demand.
      • _synsets

        private transient Synset[] _synsets
        This is null until getSenses has been called.
      • _synsetsLoaded

        private transient boolean _synsetsLoaded
        True when all synsets have been loaded
      • _cachedToString

        private transient java.lang.String _cachedToString
    • Constructor Detail

      • IndexWord

        public IndexWord​(java.lang.String lemma,
                         POS pos,
                         long[] synsetOffsets)
    • Method Detail

      • equals

        public boolean equals​(java.lang.Object object)
        Returns true if the lemma and the part of speech both match.
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getPOS

        public POS getPOS()
        Get the word's part-of-speech.
      • getLemma

        public java.lang.String getLemma()
        Return the word's lemma. Its lemma is its orthographic representation, for example "dog" or "get up".
      • getSynsetOffsets

        public long[] getSynsetOffsets()
      • getKey

        public java.lang.Object getKey()
        Gets the lemma of this word.
        Specified by:
        getKey in interface DictionaryElement
        Returns:
        lemma
      • getSenseCount

        public int getSenseCount()
        Get the word's sense count.
      • readObject

        private void readObject​(java.io.ObjectInputStream in)
                         throws java.io.IOException,
                                java.lang.ClassNotFoundException
        Throws:
        java.io.IOException
        java.lang.ClassNotFoundException