opennlp.grok.knowledge
Class FCAdapter

java.lang.Object
  |
  +--opennlp.grok.expression.CategoryAdapter
        |
        +--opennlp.grok.expression.AltSet
              |
              +--opennlp.grok.knowledge.FCAdapter
All Implemented Interfaces:
opennlp.common.structure.Category, opennlp.common.synsem.Denoter, opennlp.common.discourse.FC, opennlp.common.discourse.Referable, java.io.Serializable, opennlp.common.unify.Unifiable
Direct Known Subclasses:
Entity, Event

public abstract class FCAdapter
extends AltSet
implements opennlp.common.discourse.FC

An FC is the collection of information which defines an entity, proposition, or a group of entities or propositions.

Version:
$Revision: 1.1.1.1 $, $Date: 2001/10/23 15:17:51 $
Author:
Jason Baldridge
See Also:
Serialized Form

Field Summary
protected  int id
          The id number which this FC holds uniquely in its DM.
protected static int stamp
          Used for assigning a unique id to each new FC
 
Fields inherited from class opennlp.grok.expression.AltSet
AND, description, gs, INTERSECT, MINUS, OR, UNION
 
Fields inherited from class opennlp.grok.expression.CategoryAdapter
F
 
Constructor Summary
  FCAdapter(opennlp.common.synsem.Denoter c)
          class constructor: creates an FC
protected FCAdapter(opennlp.common.discourse.FC fc)
          class constructor: for creating a copy of an existing FC.
 
Method Summary
 void addKind(opennlp.common.discourse.Kind n)
          Adds Kind n to the list of nodes this FC is a member of.
 java.lang.String desc()
          Returns the id as a unique descriptor for this FC.
 boolean equals(int i)
          Equals method with another FC's id.
 boolean equals(java.lang.Object fc)
          Equals method with another FC.
 java.util.Set getCorefs()
          Get the corefs
 opennlp.common.synsem.Denoter getCreatedContext()
          Return the context in which this fc was created
 java.util.Collection getKinds()
          Return the list of Kinds which this FC is a member of.
 opennlp.common.synsem.Denoter getRefexp()
          return refexp
static int getStamp()
           
 java.util.Collection group()
          Will return a collection containing the FCs in this group (if it is a group)
 int id()
          Returns this FC's id.
 void informDominance(opennlp.common.synsem.Denoter d)
           
 void makeCoref(opennlp.common.discourse.FC b)
          Make two fc's corefer.
 boolean matches(opennlp.common.synsem.Denoter c)
          Tests if the Denoter c is compatible with this FC.
 java.util.Set memberOf()
          Returns the Set which contains the FC's which this FC is a member of.
 void memberOf(opennlp.common.discourse.FC fc)
          Adds fc to the list of FC's which this FC is a member of.
 boolean mostRecent()
          Was this the last FC created?
 void setCorefs(java.util.Set s)
          Set the corefs
 void setCreatedContext(opennlp.common.synsem.Denoter c)
          sets the context in which this fc was created
 boolean setEquals(java.util.Set fcSet)
          Tests if this FC's GrokSet equals fcSet.
static void setStamp(int i)
          set the stamp to whatever you want.
 java.lang.String toString()
          Prints out the name, GrokSet and Features.
 
Methods inherited from class opennlp.grok.expression.AltSet
add, addAll, addAll, contains, copy, deepMap, eval, getDescriptionSet, getDominanceHandler, getFirst, getSet, intersect, iterator, minus, name, occurs, plural, printContents, remove, setDifference, setDominanceHandler, size, toArray, union
 
Methods inherited from class opennlp.grok.expression.CategoryAdapter
copy, forall, getFeature, getSpan, getSpanEnd, getSpanStart, hashString, makeString, prettyLength, prettyPrint, prettyPrint, setFeature, setSpan, shallowEquals, showFeature, tooLong
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface opennlp.common.discourse.FC
size
 
Methods inherited from interface opennlp.common.synsem.Denoter
eval, getDominanceHandler, setDominanceHandler
 
Methods inherited from interface opennlp.common.structure.Category
copy, deepMap, forall, getFeature, getSpan, getSpanEnd, getSpanStart, hashString, prettyPrint, setFeature, setSpan, shallowEquals
 
Methods inherited from interface opennlp.common.unify.Unifiable
occurs
 

Field Detail

stamp

protected static int stamp
Used for assigning a unique id to each new FC

id

protected final int id
The id number which this FC holds uniquely in its DM.
Constructor Detail

FCAdapter

public FCAdapter(opennlp.common.synsem.Denoter c)
class constructor: creates an FC
Parameters:
n - The name of the FC.

FCAdapter

protected FCAdapter(opennlp.common.discourse.FC fc)
class constructor: for creating a copy of an existing FC.
Parameters:
fc - The FC being copied.
Method Detail

setStamp

public static void setStamp(int i)
set the stamp to whatever you want. This is dangerous-- use at own risk.

getStamp

public static int getStamp()

group

public java.util.Collection group()
Will return a collection containing the FCs in this group (if it is a group)
Specified by:
group in interface opennlp.common.discourse.FC

getRefexp

public opennlp.common.synsem.Denoter getRefexp()
return refexp
Specified by:
getRefexp in interface opennlp.common.discourse.FC

makeCoref

public void makeCoref(opennlp.common.discourse.FC b)
Make two fc's corefer.
Specified by:
makeCoref in interface opennlp.common.discourse.FC

getCorefs

public java.util.Set getCorefs()
Get the corefs
Specified by:
getCorefs in interface opennlp.common.discourse.FC

setCorefs

public void setCorefs(java.util.Set s)
Set the corefs
Specified by:
setCorefs in interface opennlp.common.discourse.FC

mostRecent

public boolean mostRecent()
Was this the last FC created?
Specified by:
mostRecent in interface opennlp.common.discourse.FC

addKind

public void addKind(opennlp.common.discourse.Kind n)
Adds Kind n to the list of nodes this FC is a member of.
Specified by:
addKind in interface opennlp.common.discourse.FC

getKinds

public java.util.Collection getKinds()
Return the list of Kinds which this FC is a member of.
Specified by:
getKinds in interface opennlp.common.discourse.FC

setCreatedContext

public void setCreatedContext(opennlp.common.synsem.Denoter c)
sets the context in which this fc was created
Specified by:
setCreatedContext in interface opennlp.common.discourse.FC

getCreatedContext

public opennlp.common.synsem.Denoter getCreatedContext()
Return the context in which this fc was created
Specified by:
getCreatedContext in interface opennlp.common.discourse.FC

id

public int id()
Returns this FC's id.
Specified by:
id in interface opennlp.common.discourse.FC

setEquals

public boolean setEquals(java.util.Set fcSet)
Tests if this FC's GrokSet equals fcSet.
Specified by:
setEquals in interface opennlp.common.discourse.FC

memberOf

public java.util.Set memberOf()
Returns the Set which contains the FC's which this FC is a member of.
Specified by:
memberOf in interface opennlp.common.discourse.FC

memberOf

public void memberOf(opennlp.common.discourse.FC fc)
Adds fc to the list of FC's which this FC is a member of.
Specified by:
memberOf in interface opennlp.common.discourse.FC

equals

public boolean equals(int i)
Equals method with another FC's id.
Specified by:
equals in interface opennlp.common.discourse.FC

equals

public boolean equals(java.lang.Object fc)
Equals method with another FC.
Specified by:
equals in interface opennlp.common.discourse.FC
Overrides:
equals in class AltSet

matches

public boolean matches(opennlp.common.synsem.Denoter c)
Tests if the Denoter c is compatible with this FC.
Specified by:
matches in interface opennlp.common.discourse.FC

desc

public java.lang.String desc()
Returns the id as a unique descriptor for this FC.
Specified by:
desc in interface opennlp.common.synsem.Denoter
Overrides:
desc in class AltSet

informDominance

public void informDominance(opennlp.common.synsem.Denoter d)
Specified by:
informDominance in interface opennlp.common.discourse.FC

toString

public java.lang.String toString()
Prints out the name, GrokSet and Features.
Specified by:
toString in interface opennlp.common.structure.Category
Overrides:
toString in class AltSet


Copyright © 2001 Jason Baldridge and Gann Bierner. All Rights Reserved.