opennlp.grok.expression
Class ComplexCat

java.lang.Object
  |
  +--opennlp.grok.expression.AbstractCat
        |
        +--opennlp.grok.expression.ComplexCat
All Implemented Interfaces:
opennlp.common.synsem.Category, opennlp.common.unify.Mutable, java.io.Serializable, gnu.trove.TLinkable, opennlp.common.unify.Unifiable

public final class ComplexCat
extends AbstractCat

A non-recursive representation of complex categories.

Version:
$Revision: 1.15 $, $Date: 2003/01/10 19:23:21 $
Author:
Jason Baldridge, Michael White
See Also:
Serialized Form

Field Summary
 
Fields inherited from class opennlp.grok.expression.AbstractCat
_featStruc, _lf, _next, _previous, SHOW_SEMANTICS
 
Constructor Summary
ComplexCat(org.jdom.Element el)
          Constructor which retrieves the complex category from the XML element.
ComplexCat(TargetCat target, Arg arg)
          Constructor with target and single arg.
ComplexCat(TargetCat target, ArgStack args)
          Constructor with target and arg stack.
ComplexCat(TargetCat target, ArgStack args, opennlp.common.synsem.LF lf)
          Constructor with target, arg stack and LF.
 
Method Summary
 void add(Arg a)
           
 void add(ArgStack as)
           
 void addBeforeEnd(ArgStack as)
           
 void addFront(ArgStack as)
           
 int arity()
           
 boolean containsDollarArg()
           
 boolean containsSetArg()
           
 opennlp.common.synsem.Category copy()
           
 void deepMap(opennlp.common.unify.ModFcn mf)
           
 boolean equals(java.lang.Object c)
           
 java.lang.Object fill(opennlp.common.unify.Substitution s)
           
 void forall(opennlp.common.synsem.CategoryFcn f)
           
 Arg getArg(int pos)
           
 ArgStack getArgStack()
           
 ArgStack getArgStack(int from)
           
 Arg getOuterArg()
           
 opennlp.common.synsem.Category getResult()
           
 opennlp.common.synsem.Category getSubResult(int upto)
           
 TargetCat getTarget()
           
 java.lang.String hashString(java.util.Map varMap)
          Returns a hash string using the given map from vars to int strings.
 void insertEnd(ArgStack as)
           
 void insertFront(ArgStack as)
           
 boolean occurs(opennlp.common.unify.Variable v)
           
 void set(int index, Arg c)
           
 void setOuterArgument(Arg c)
           
 opennlp.common.synsem.Category shallowCopy()
           
 java.lang.String toString()
           
 java.lang.Object unify(java.lang.Object u, opennlp.common.unify.Substitution sub)
          NB: The LF does not participate in unification.
 void unifyCheck(java.lang.Object u)
           
 
Methods inherited from class opennlp.grok.expression.AbstractCat
getFeatureStructure, getLF, getNext, getPrevious, hashString, prettyLength, prettyPrint, prettyPrint, setFeatureStructure, setLF, setNext, setPrevious, shallowEquals, showFeature, tooLong
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ComplexCat

public ComplexCat(TargetCat target,
                  Arg arg)
Constructor with target and single arg.


ComplexCat

public ComplexCat(TargetCat target,
                  ArgStack args)
Constructor with target and arg stack.


ComplexCat

public ComplexCat(TargetCat target,
                  ArgStack args,
                  opennlp.common.synsem.LF lf)
Constructor with target, arg stack and LF.


ComplexCat

public ComplexCat(org.jdom.Element el)
Constructor which retrieves the complex category from the XML element.

Method Detail

getTarget

public TargetCat getTarget()

getArg

public Arg getArg(int pos)

getOuterArg

public Arg getOuterArg()

getResult

public opennlp.common.synsem.Category getResult()

getSubResult

public opennlp.common.synsem.Category getSubResult(int upto)

getArgStack

public ArgStack getArgStack()

getArgStack

public ArgStack getArgStack(int from)

containsDollarArg

public boolean containsDollarArg()

containsSetArg

public boolean containsSetArg()

add

public void add(Arg a)

add

public void add(ArgStack as)

addBeforeEnd

public void addBeforeEnd(ArgStack as)

addFront

public void addFront(ArgStack as)

insertFront

public void insertFront(ArgStack as)

insertEnd

public void insertEnd(ArgStack as)

set

public void set(int index,
                Arg c)

setOuterArgument

public void setOuterArgument(Arg c)

arity

public int arity()

copy

public opennlp.common.synsem.Category copy()
Specified by:
copy in interface opennlp.common.synsem.Category
Specified by:
copy in class AbstractCat

shallowCopy

public opennlp.common.synsem.Category shallowCopy()

deepMap

public void deepMap(opennlp.common.unify.ModFcn mf)
Specified by:
deepMap in interface opennlp.common.unify.Mutable
Overrides:
deepMap in class AbstractCat

forall

public void forall(opennlp.common.synsem.CategoryFcn f)
Specified by:
forall in interface opennlp.common.synsem.Category
Overrides:
forall in class AbstractCat

unifyCheck

public void unifyCheck(java.lang.Object u)
                throws opennlp.common.unify.UnifyFailure
Specified by:
unifyCheck in interface opennlp.common.unify.Unifiable
Specified by:
unifyCheck in class AbstractCat
opennlp.common.unify.UnifyFailure

unify

public java.lang.Object unify(java.lang.Object u,
                              opennlp.common.unify.Substitution sub)
                       throws opennlp.common.unify.UnifyFailure
NB: The LF does not participate in unification.

Specified by:
unify in interface opennlp.common.unify.Unifiable
Specified by:
unify in class AbstractCat
opennlp.common.unify.UnifyFailure

occurs

public boolean occurs(opennlp.common.unify.Variable v)
Specified by:
occurs in interface opennlp.common.unify.Unifiable
Overrides:
occurs in class AbstractCat

fill

public java.lang.Object fill(opennlp.common.unify.Substitution s)
                      throws opennlp.common.unify.UnifyFailure
Specified by:
fill in interface opennlp.common.unify.Unifiable
Specified by:
fill in class AbstractCat
opennlp.common.unify.UnifyFailure

equals

public boolean equals(java.lang.Object c)
Specified by:
equals in interface opennlp.common.unify.Unifiable
Specified by:
equals in class AbstractCat

toString

public java.lang.String toString()
Specified by:
toString in class AbstractCat

hashString

public java.lang.String hashString(java.util.Map varMap)
Returns a hash string using the given map from vars to int strings.

Specified by:
hashString in interface opennlp.common.synsem.Category
Specified by:
hashString in class AbstractCat


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