opennlp.tools.coref
Class DiscourseModel

java.lang.Object
  extended by opennlp.tools.coref.DiscourseModel

public class DiscourseModel
extends Object

Represents the elements which are part of a discourse.


Constructor Summary
DiscourseModel()
          Creates a new discourse model.
 
Method Summary
 void addEntity(DiscourseEntity e)
          Adds the specified entity to this discourse model.
 void clear()
          Removes all elements from this discourse model.
 DiscourseEntity[] getEntities()
          Returns the entities in the discourse model.
 DiscourseEntity getEntity(int i)
          Returns the entity at the specified index.
 int getNumEntities()
          Returns the number of entities in this discourse model.
 void mentionEntity(DiscourseEntity e)
          Indicates that the specified entity has been mentioned.
 void mergeEntities(DiscourseEntity e1, DiscourseEntity e2, float confidence)
          Merges the specified entities into a single entity with the specified confidence.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DiscourseModel

public DiscourseModel()
Creates a new discourse model.

Method Detail

mentionEntity

public void mentionEntity(DiscourseEntity e)
Indicates that the specified entity has been mentioned.

Parameters:
e - The entity which has been mentioned.

getNumEntities

public int getNumEntities()
Returns the number of entities in this discourse model.

Returns:
the number of entities in this discourse model.

getEntity

public DiscourseEntity getEntity(int i)
Returns the entity at the specified index.

Parameters:
i - The index of the entity to be returned.
Returns:
the entity at the specified index.

addEntity

public void addEntity(DiscourseEntity e)
Adds the specified entity to this discourse model.

Parameters:
e - the entity to be added to the model.

mergeEntities

public void mergeEntities(DiscourseEntity e1,
                          DiscourseEntity e2,
                          float confidence)
Merges the specified entities into a single entity with the specified confidence.

Parameters:
e1 - The first entity.
e2 - The second entity.
confidence - The confidence.

getEntities

public DiscourseEntity[] getEntities()
Returns the entities in the discourse model.

Returns:
the entities in the discourse model.

clear

public void clear()
Removes all elements from this discourse model.



Copyright © 2010. All Rights Reserved.