Klasse MascToken

java.lang.Object
opennlp.tools.util.Span
opennlp.tools.formats.masc.MascToken
Alle implementierten Schnittstellen:
Serializable, Comparable<Span>

public class MascToken extends Span
A specialized Span to express tokens in documents.
Siehe auch:
  • Konstruktordetails

    • MascToken

      public MascToken(int s, int e, int pennId, String pos, String base, MascWord[] quarks)
      Initializes a MascToken which may combine multiple quarks.
      Parameter:
      s - The start of the token in the corpus file. Must be equal to or greater than 0.
      e - The end of the token in the corpus file. Must be equal to or greater than 0 and be greater than s.
      pennId - The ID of the token as assigned by the Penn stand-off annotation.
      pos - The POS-tag.
      base - The base form.
      quarks - The array of Quarks contained in the token.
      Löst aus:
      IllegalArgumentException - Thrown if one of the parameters are invalid.
  • Methodendetails

    • getTokenId

      public int getTokenId()
      Gibt zurück:
      Retrieves the ID of the token.
    • getBase

      public String getBase()
      Gibt zurück:
      Retrieves the base form.
    • getPos

      public String getPos()
      Gibt zurück:
      Retrieves the POS tag.
    • getQuarks

      public MascWord[] getQuarks()
      Gibt zurück:
      Retrieves quarks of the token.