All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class COM.Lexical.Metaphrase.SemanticTypeClassifier

java.lang.Object
    |
    +----COM.Lexical.Metaphrase.SemanticClassifier
            |
            +----COM.Lexical.Metaphrase.SemanticTypeClassifier

public class SemanticTypeClassifier
extends SemanticClassifier
Metaphrase SemanticTypeClassifier class. A SemanticClassifier which classifies based on Semantic Types.

User specifies a ordered list (array) of SemanticTypes (the "keys") and a parallel list of SemanticClasses (the "values"), plus a "default" SemanticClass.

classify(Concept concept) runs through the list of SemanticTypes, and returns the first SemanticClass for which the concept has either the corresponding SemanticType or any subtype of that SemanticType (as determined by SemanticType.STN(), or returns the default SemanticClass if no "match" is found.

Version:
Authority1.1, 11 Apr 2000

Constructor Index

 o SemanticTypeClassifier(SemanticType[], SemanticClass[], SemanticClass)
Create a SemanticTypeClassifier.
 o SemanticTypeClassifier(String[], SemanticClass[], SemanticClass)
Create a SemanticTypeClassifier.

Method Index

 o classify(Concept)
Returns SemanticClass of Concept.
 o classify(SemanticType[])
Returns SemanticClass given SemanticType's.

Constructor Detail

 o SemanticTypeClassifier
public SemanticTypeClassifier(SemanticType keys[],
                              SemanticClass values[],
                              SemanticClass defaultClass)
          Create a SemanticTypeClassifier. The keys should be STN's.
Throws:
ArrayIndexOutOfBoundsException - thrown if patterns.length != semanticClasses.length.
 o SemanticTypeClassifier
public SemanticTypeClassifier(java.lang.String keys[],
                              SemanticClass values[],
                              SemanticClass defaultClass)
          Create a SemanticTypeClassifier. The keys should be STN's.
Throws:
ArrayIndexOutOfBoundsException - thrown if patterns.length != semanticClasses.length.

Method Detail

 o classify
public SemanticClass classify(Concept concept)
          Returns SemanticClass of Concept.
Parameters:
concept - a Metaphrase Concept.
Overrides:
classify in class SemanticClassifier
 o classify
public SemanticClass classify(SemanticType semanticTypes[])
          Returns SemanticClass given SemanticType's.
Parameters:
semanticTypes - SemanticType[]
origin - the origin (a String)

All Packages  Class Hierarchy  This Package  Previous  Next  Index