uk.ac.essex.malexa.nlp.dp.GuiTAR
Class DiscourseEntity

java.lang.Object
  extended byuk.ac.essex.malexa.nlp.dp.GuiTAR.DiscourseEntity

public class DiscourseEntity
extends Object

A class that encapsulates the general functionality of a Discourse Entity.

Version:
1.1
Author:
Mijail A. Kabadjov

Field Summary
private  Set attributes
           
private  DiscourseModel dModel
           
private  Vector equivalenceClass
           
private  Integer id
           
private  Set relations
           
private  Set types
           
private  Vector validAttrs
           
 
Constructor Summary
DiscourseEntity(Integer identifier, Cf cf, DiscourseModel dm)
          Discourse Entity constructor.
 
Method Summary
private  void addAttributes(Set attrs)
          Adds (if new) attribute(s) to this Discourse Entity.
private  void addCf(Cf cf)
          A method that updates the state of a Discourse Entity.
private  void addHead(Property head)
          Adds a new (if new) head to this Discourse Entity.
private  void addRelations(Set rels)
          Adds (if new) relation(s) to this Discourse Entity.
 Set getAttributes()
          Gets the attributes of this Discourse Entity.
private  Set getAttributes(NominalGroup np)
          Reads the premodifiers from a given NP and creates Property objects as attributes for every premodifier not part of an embedded NE.
 Vector getEquivalenceClass()
          Gets the co-reference chain (list of Cfs) of this Discourse Entity.
private  Property getHead(NominalGroup np)
          Reads the necessary information from a given NP and creates a Property object for its head.
 Integer getId()
          Gets the id of this Discourse Entity.
 Set getRelations()
          Gets the relations of this Discourse Entity with other Discourse Entities.
 Set getTypes()
          Gets the heads used to refer to this Discourse Entity.
 void merge(DiscourseEntity de, Cf cf)
          Merges a given Discourse Entity with this one.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

id

private Integer id

types

private Set types

attributes

private Set attributes

relations

private Set relations

equivalenceClass

private Vector equivalenceClass

dModel

private DiscourseModel dModel

validAttrs

private Vector validAttrs
Constructor Detail

DiscourseEntity

public DiscourseEntity(Integer identifier,
                       Cf cf,
                       DiscourseModel dm)
Discourse Entity constructor. Evokes a new entity in a Discourse Model.

Parameters:
identifier - The identifier of this entity
cf - The Cf evoking this entity
dm - The pointer to the parent Discourse Model
Method Detail

getId

public Integer getId()
Gets the id of this Discourse Entity.

Returns:
Integer The id

getTypes

public Set getTypes()
Gets the heads used to refer to this Discourse Entity. Returns a Set of objects of class Property.

Returns:
Set The Set of heads

getAttributes

public Set getAttributes()
Gets the attributes of this Discourse Entity. Returns a Set of objects of class Property.

Returns:
Set The Set of attributes

getRelations

public Set getRelations()
Gets the relations of this Discourse Entity with other Discourse Entities. Returns a Set of objects of class Property.

Returns:
Set The Set of relations

getEquivalenceClass

public Vector getEquivalenceClass()
Gets the co-reference chain (list of Cfs) of this Discourse Entity. Returns a Set of objects of class Cf.

Returns:
Set The Set of Cfs

addCf

private void addCf(Cf cf)
A method that updates the state of a Discourse Entity. It stands for an "access" of the DE, and hence it is called after anaphora resolution has taken place. It expects a Cf object as a parameter and then updates the coreference chain of this DE, and reads head and modifiers of this Cf to update this information of the DE.

Parameters:
cf - The new Cf (realisation of this entity)

merge

public void merge(DiscourseEntity de,
                  Cf cf)
Merges a given Discourse Entity with this one. Adds the types, attributes, and relations of the former to the latter, and updates the Discourse Model by deleting the former and updating the necessary data structures.

Parameters:
de - The Discourse Entity to be merged into this one

addHead

private void addHead(Property head)
Adds a new (if new) head to this Discourse Entity.

Parameters:
head - The head of a Cf

addAttributes

private void addAttributes(Set attrs)
Adds (if new) attribute(s) to this Discourse Entity.

Parameters:
attrs - The Set of attributes to be added

addRelations

private void addRelations(Set rels)
Adds (if new) relation(s) to this Discourse Entity.

Parameters:
rels - The Set of relations to be added

getHead

private Property getHead(NominalGroup np)
Reads the necessary information from a given NP and creates a Property object for its head.

Parameters:
np - The NP to be processed
Returns:
Property An object holding the head of the NP

getAttributes

private Set getAttributes(NominalGroup np)
Reads the premodifiers from a given NP and creates Property objects as attributes for every premodifier not part of an embedded NE. Embedded NEs are to be treated as relations to other Discourse Entities.

Parameters:
np - The NP to be processed
Returns:
Set A Set of Property Objects; one for every premodifier (attribute)