de.uni_tuebingen.sfb.lichtenstein.treebanks
Class Sentence

java.lang.Object
  extended by de.uni_tuebingen.sfb.lichtenstein.treebanks.Sentence

public class Sentence
extends Object

A sentence in a treebank. It has an id to find it in the treebank and of course a sentence string.

Author:
Hendrik Maryns

Constructor Summary
Sentence(String sentence, String id)
          Create a sentence with the given sentence as content and the given id.
 
Method Summary
 String getId()
          Get the id of the linguistic tree this binary tree derives from.
 String getSentence()
          Get the sentence this tree represents.
 String toString()
          A sentence shows its id and string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Sentence

public Sentence(String sentence,
                String id)
Create a sentence with the given sentence as content and the given id.

Parameters:
sentence - The sentence string.
id - The id.
Postconditions:
  • The given id is the id. | new.getId() == id
  • The given sentence is the sentence. | new.getSentence() == sentence
  • Method Detail

    getId

    public String getId()
    Get the id of the linguistic tree this binary tree derives from.

    Returns:
    The id.

    getSentence

    public String getSentence()
    Get the sentence this tree represents.

    Returns:
    The sentence.

    toString

    public String toString()
    A sentence shows its id and string.

    Overrides:
    toString in class Object
    Returns:
    The string "Tree ", the id, a colon and the string.


    © Copyright 2008 Hendrik Maryns   Creative Commons License