opennlp.grok.expression
Class GrokFeature

java.lang.Object
  |
  +--java.util.AbstractMap
        |
        +--java.util.HashMap
              |
              +--opennlp.grok.expression.GrokFeature
All Implemented Interfaces:
java.lang.Cloneable, opennlp.common.unify.Feature, java.util.Map, java.io.Serializable

public final class GrokFeature
extends java.util.HashMap
implements opennlp.common.unify.Feature

A feature bundle that contains mappings from keys to values. Values can either be a string or a set of strings which the value "could" be unified with. In addition, GrokFeatures can be indexed and individual features can be indexed. If a feature is indexed, it doesn't need to have a value.

This whole thing is a mess. Sorry about that.

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

Inner classes inherited from class java.util.Map
java.util.Map.Entry
 
Constructor Summary
GrokFeature()
           
GrokFeature(java.lang.Integer i1, java.lang.Integer i2, java.util.Stack s)
           
GrokFeature(java.util.Stack s)
           
GrokFeature(java.lang.String a, java.lang.String b)
           
 
Method Summary
 void addFeatIndices(opennlp.common.unify.CategorySubstitution S, opennlp.common.unify.Feature unified)
           
 void addIndex(int i)
           
 void addIndex(java.lang.Integer i)
           
 void addIndex(java.lang.Integer i, java.lang.String f)
           
 void addIndex(int i, java.lang.String f)
           
 void addIndices(java.util.Map m)
           
 void addNameIndex(int i)
           
 void addNameIndex(java.lang.Integer i)
           
 void checkFeatureIndices()
           
 opennlp.common.unify.Feature copy()
           
 boolean equals(opennlp.common.unify.Feature f)
           
 boolean featureHasValue(java.lang.String f, java.lang.String val)
           
 opennlp.common.unify.Feature filter(opennlp.common.unify.FilterFcn ff)
           
 java.util.HashMap getFeatureIndices()
           
 java.lang.Integer getIndex()
           
 java.lang.Integer getNameIndex()
           
 boolean hasIndex()
           
 boolean hasNameIndex()
           
 void init(java.util.Stack s)
           
 void init(java.lang.String a, java.lang.String b)
           
 boolean isEmpty()
           
 opennlp.common.unify.Feature override(opennlp.common.unify.Feature f)
           
 java.lang.Object put(java.lang.Integer index, java.lang.Object val)
           
 java.lang.Object put(java.lang.Object index, java.lang.Object val)
           
 java.lang.Object put(opennlp.common.util.Pair index, java.lang.Object val)
           
 java.lang.Object put(java.lang.String index, java.lang.Object val)
           
 void setEmpty(boolean b)
           
 boolean subset(opennlp.common.unify.Feature f)
           
 opennlp.common.unify.Feature subVars(opennlp.common.unify.CategorySubstitution S)
           
 java.lang.String toString()
           
 opennlp.common.unify.Feature unify(opennlp.common.unify.Feature f)
           
 opennlp.common.unify.CategorySubstitution unify(opennlp.common.unify.Feature f, opennlp.common.unify.CategorySubstitution S)
           
static java.lang.Object unifyFeatureValue(java.lang.Object _a, java.lang.Object _b)
           
 
Methods inherited from class java.util.HashMap
clear, clone, containsKey, containsValue, entrySet, get, keySet, putAll, remove, size, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface opennlp.common.unify.Feature
entrySet, get, size
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Constructor Detail

GrokFeature

public GrokFeature(java.lang.String a,
                   java.lang.String b)

GrokFeature

public GrokFeature(java.util.Stack s)

GrokFeature

public GrokFeature(java.lang.Integer i1,
                   java.lang.Integer i2,
                   java.util.Stack s)

GrokFeature

public GrokFeature()
Method Detail

addIndex

public void addIndex(int i)
Specified by:
addIndex in interface opennlp.common.unify.Feature

addIndex

public void addIndex(java.lang.Integer i)
Specified by:
addIndex in interface opennlp.common.unify.Feature

addIndex

public void addIndex(int i,
                     java.lang.String f)
Specified by:
addIndex in interface opennlp.common.unify.Feature

addIndex

public void addIndex(java.lang.Integer i,
                     java.lang.String f)
Specified by:
addIndex in interface opennlp.common.unify.Feature

addIndices

public void addIndices(java.util.Map m)
Specified by:
addIndices in interface opennlp.common.unify.Feature

getIndex

public java.lang.Integer getIndex()
Specified by:
getIndex in interface opennlp.common.unify.Feature

getFeatureIndices

public java.util.HashMap getFeatureIndices()
Specified by:
getFeatureIndices in interface opennlp.common.unify.Feature

addNameIndex

public void addNameIndex(int i)
Specified by:
addNameIndex in interface opennlp.common.unify.Feature

addNameIndex

public void addNameIndex(java.lang.Integer i)
Specified by:
addNameIndex in interface opennlp.common.unify.Feature

getNameIndex

public java.lang.Integer getNameIndex()
Specified by:
getNameIndex in interface opennlp.common.unify.Feature

init

public void init(java.util.Stack s)

init

public void init(java.lang.String a,
                 java.lang.String b)

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface opennlp.common.unify.Feature
Overrides:
isEmpty in class java.util.HashMap

setEmpty

public void setEmpty(boolean b)
Specified by:
setEmpty in interface opennlp.common.unify.Feature

checkFeatureIndices

public void checkFeatureIndices()

featureHasValue

public boolean featureHasValue(java.lang.String f,
                               java.lang.String val)
Specified by:
featureHasValue in interface opennlp.common.unify.Feature

copy

public opennlp.common.unify.Feature copy()
Specified by:
copy in interface opennlp.common.unify.Feature

filter

public opennlp.common.unify.Feature filter(opennlp.common.unify.FilterFcn ff)
Specified by:
filter in interface opennlp.common.unify.Feature

put

public java.lang.Object put(java.lang.Object index,
                            java.lang.Object val)
Specified by:
put in interface opennlp.common.unify.Feature
Overrides:
put in class java.util.HashMap

put

public java.lang.Object put(java.lang.String index,
                            java.lang.Object val)
Specified by:
put in interface opennlp.common.unify.Feature

put

public java.lang.Object put(opennlp.common.util.Pair index,
                            java.lang.Object val)
Specified by:
put in interface opennlp.common.unify.Feature

put

public java.lang.Object put(java.lang.Integer index,
                            java.lang.Object val)
Specified by:
put in interface opennlp.common.unify.Feature

subset

public boolean subset(opennlp.common.unify.Feature f)
Specified by:
subset in interface opennlp.common.unify.Feature

unifyFeatureValue

public static java.lang.Object unifyFeatureValue(java.lang.Object _a,
                                                 java.lang.Object _b)

unify

public opennlp.common.unify.Feature unify(opennlp.common.unify.Feature f)
Specified by:
unify in interface opennlp.common.unify.Feature

addFeatIndices

public void addFeatIndices(opennlp.common.unify.CategorySubstitution S,
                           opennlp.common.unify.Feature unified)
Specified by:
addFeatIndices in interface opennlp.common.unify.Feature

unify

public opennlp.common.unify.CategorySubstitution unify(opennlp.common.unify.Feature f,
                                                       opennlp.common.unify.CategorySubstitution S)
Specified by:
unify in interface opennlp.common.unify.Feature

subVars

public opennlp.common.unify.Feature subVars(opennlp.common.unify.CategorySubstitution S)
Specified by:
subVars in interface opennlp.common.unify.Feature

override

public opennlp.common.unify.Feature override(opennlp.common.unify.Feature f)
Specified by:
override in interface opennlp.common.unify.Feature

hasIndex

public boolean hasIndex()
Specified by:
hasIndex in interface opennlp.common.unify.Feature

hasNameIndex

public boolean hasNameIndex()
Specified by:
hasNameIndex in interface opennlp.common.unify.Feature

equals

public boolean equals(opennlp.common.unify.Feature f)
Specified by:
equals in interface opennlp.common.unify.Feature

toString

public java.lang.String toString()
Overrides:
toString in class java.util.AbstractMap


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