Class MalletAlphabetWrapper

java.lang.Object
cc.mallet.types.Alphabet
cc.mallet.types.MalletAlphabetWrapper
All Implemented Interfaces:
Serializable, Iterable<String>, org.dice_research.topicmodeling.utils.vocabulary.Vocabulary

public class MalletAlphabetWrapper extends cc.mallet.types.Alphabet implements org.dice_research.topicmodeling.utils.vocabulary.Vocabulary
See Also:
Serialized Form
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private static long
     

    Fields inherited from class cc.mallet.types.Alphabet

    entries, entryClass, growthStopped, instanceId, map

    Fields inherited from interface org.dice_research.topicmodeling.utils.vocabulary.Vocabulary

    WORD_NOT_FOUND
  • Constructor Summary

    Constructors
    Constructor
    Description
    MalletAlphabetWrapper​(cc.mallet.types.Alphabet alphabet)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    add​(String word)
     
    createFromVocabulary​(org.dice_research.topicmodeling.utils.vocabulary.Vocabulary vocabulary)
     
    cc.mallet.types.Alphabet
     
    getId​(String word)
     
    getWord​(int wordId)
     
    void
    setWord​(String word, String newWord)
     

    Methods inherited from class cc.mallet.types.Alphabet

    alphabetsMatch, clone, contains, dump, dump, dump, entryClass, getInstanceId, growthStopped, iterator, lookupIndex, lookupIndex, lookupIndices, lookupObject, lookupObjects, lookupObjects, readResolve, setInstanceId, size, startGrowth, stopGrowth, toArray, toArray, toString

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface java.lang.Iterable

    forEach, spliterator

    Methods inherited from interface org.dice_research.topicmodeling.utils.vocabulary.Vocabulary

    iterator, size
  • Field Details

  • Constructor Details

    • MalletAlphabetWrapper

      public MalletAlphabetWrapper(cc.mallet.types.Alphabet alphabet)
  • Method Details

    • add

      public void add(String word)
      Specified by:
      add in interface org.dice_research.topicmodeling.utils.vocabulary.Vocabulary
    • getId

      public Integer getId(String word)
      Specified by:
      getId in interface org.dice_research.topicmodeling.utils.vocabulary.Vocabulary
    • getAlphabet

      public cc.mallet.types.Alphabet getAlphabet()
    • getWord

      public String getWord(int wordId)
      Specified by:
      getWord in interface org.dice_research.topicmodeling.utils.vocabulary.Vocabulary
    • createFromVocabulary

      public static MalletAlphabetWrapper createFromVocabulary(org.dice_research.topicmodeling.utils.vocabulary.Vocabulary vocabulary)
    • setWord

      public void setWord(String word, String newWord)
      Specified by:
      setWord in interface org.dice_research.topicmodeling.utils.vocabulary.Vocabulary