Class Document


  • public class Document
    extends Annotated
    A collection of tokens, organized in sentences
    Since:
    5.2
    Version:
    5.2
    Author:
    Pedro Oliveira
    • Constructor Summary

      Constructors 
      Constructor Description
      Document​(int theSize)
      Create document with the given number of sentences
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Token[] sentence​(int theIndex)
      Get tokens at given sentence
      Token[][] sentences()
      Get all tokens in this document
      void set​(int theIndex, Token[] theSentence)
      Set tokens for given sentence
      int size()
      Get number of sentences
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Document

        public Document​(int theSize)
        Create document with the given number of sentences
    • Method Detail

      • set

        public void set​(int theIndex,
                        Token[] theSentence)
        Set tokens for given sentence
      • sentence

        public Token[] sentence​(int theIndex)
        Get tokens at given sentence
      • sentences

        public Token[][] sentences()
        Get all tokens in this document
      • size

        public int size()
        Get number of sentences