org.cogroo.entities
Class Chunk

java.lang.Object
  extended by org.cogroo.entities.Chunk
All Implemented Interfaces:
Serializable, TokenGroup
Direct Known Subclasses:
ChunkCogroo

public abstract class Chunk
extends Object
implements Serializable, TokenGroup

A Chunk is an annotated group of Tokens. The annotation could be SN, SN or Other.

See Also:
Serialized Form

Constructor Summary
Chunk()
           
 
Method Summary
 boolean equals(Object obj)
           
 int getFirstToken()
           
 Token getMainToken()
           
 MorphologicalTag getMorphologicalTag()
           
 int getRelativeHeadIndex()
           
 SyntacticTag getSyntacticTag()
           
 List<Token> getTokens()
          Gets the Tokens of this sentence
 String getType()
           
 int hashCode()
           
 void setFirstToken(int firstToken)
           
 void setMorphologicalTag(MorphologicalTag morphologicalTag)
           
 void setType(String type)
           
abstract  String toPlainText()
          Gets the representation of the sentence as a plain text.
 String toString()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Chunk

public Chunk()
Method Detail

toPlainText

public abstract String toPlainText()
Gets the representation of the sentence as a plain text.

Returns:
The sentence as a string.

getTokens

public List<Token> getTokens()
Gets the Tokens of this sentence

Specified by:
getTokens in interface TokenGroup
Returns:
Array of Tokens

getFirstToken

public int getFirstToken()

setFirstToken

public void setFirstToken(int firstToken)

getMorphologicalTag

public MorphologicalTag getMorphologicalTag()
Returns:
the morphologicalTag

setMorphologicalTag

public void setMorphologicalTag(MorphologicalTag morphologicalTag)
Parameters:
morphologicalTag - the morphologicalTag to set

getSyntacticTag

public SyntacticTag getSyntacticTag()

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object

getRelativeHeadIndex

public int getRelativeHeadIndex()

getMainToken

public Token getMainToken()

getType

public String getType()

setType

public void setType(String type)


Copyright © 2012-2013 CoGrOO. All Rights Reserved.