Class Tags


  • public class Tags
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      java.lang.String type  
    • Constructor Summary

      Constructors 
      Constructor Description
      Tags​(java.lang.String filename)
      the constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean contains​(java.lang.String label)  
      cc.mallet.types.LabelAlphabet getAlphabet()
      gets you the LabelAlphabet representation of the tags.
      java.lang.String[] getTags()
      gets you the all the labels as a string array.
      int nrTags()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • type

        public java.lang.String type
    • Constructor Detail

      • Tags

        public Tags​(java.lang.String filename)
        the constructor.
        Parameters:
        filename - full path to file in which the tags are stored. One tag each line. Make sure, there is also an outside tag "O". Further you should check, that either there is always a begin tag "B-" or never, as this is not counterchecked by this module.
    • Method Detail

      • getAlphabet

        public cc.mallet.types.LabelAlphabet getAlphabet()
        gets you the LabelAlphabet representation of the tags.
      • getTags

        public java.lang.String[] getTags()
        gets you the all the labels as a string array.
      • nrTags

        public int nrTags()
      • contains

        public boolean contains​(java.lang.String label)