gov.nist.nlpir.irf.matcher
Class Matcherbp

java.lang.Object
  |
  +--gov.nist.nlpir.irf.matcher.Matcherbp
Direct Known Subclasses:
NullMatcherbp

public class Matcherbp
extends java.lang.Object

The Matcherbp class is responsible for matching one set of indexing features against another (e.g. a set from a document used as a query against a set derived from a document and kept in an index). Different kinds of matching can be defined since features are complex objects containing other objects.

Note: All these functions return a double result which can only be 1.0 or 0.0 and not a boolean. This is because another type of Matcher could be defined, returning more precise results.

Version:
$Revision: 1.1 $
Author:
This software was produced by NIST, an agency of the U.S. government, and by statute is not subject to copyright in the United States. Recipients of this software assume all responsibilities associated with its operation, modification and maintenance.
See Also:
IndexingFeature

Constructor Summary
Matcherbp()
           
 
Method Summary
 boolean exactMatch(DataElem de1, DataElem de2)
          Determines if two data elements match exactly
 boolean exactMatch(IndexingFeature if1, IndexingFeature if2)
          Determines if two indexing features match exactly
 boolean extendedExactMatch(IndexingFeature if1, IndexingFeature if2)
          Determines if two indexing features have the same attribute name and match
 double match(DataElem de1, DataElem de2)
          Determines if two data elements match
 double match(IndexingFeature if1, IndexingFeature if2)
          Determines whether two indexing features match
 boolean sameAddress(IndexingFeature if1, IndexingFeature if2)
          Determines if two indexing features have the same attribute name and match
 boolean sameAttributeName(IndexingFeature if1, IndexingFeature if2)
          Determine if two indexing features have the same attribute name
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Constructor Detail

Matcherbp

public Matcherbp()
Method Detail

match

public double match(IndexingFeature if1,
                    IndexingFeature if2)
Determines whether two indexing features match
Parameters:
if1 - First indexing feature
if2 - Second indexing feature
Returns:
1.0 if they match, 0.0 otherwise.

match

public double match(DataElem de1,
                    DataElem de2)
Determines if two data elements match
Parameters:
de1 - First data element
de2 - Second data element
Returns:
1.0 if they match, 0.0 otherwise.

exactMatch

public boolean exactMatch(DataElem de1,
                          DataElem de2)
Determines if two data elements match exactly
Parameters:
de1 - First data element
de2 - Second data element
Returns:
true if they match exactly, ie are similar, false otherwise.

exactMatch

public boolean exactMatch(IndexingFeature if1,
                          IndexingFeature if2)
Determines if two indexing features match exactly
Parameters:
if1 - First indexing feature
if2 - Second indexing feature
Returns:
true if they match, false otherwise.

extendedExactMatch

public boolean extendedExactMatch(IndexingFeature if1,
                                  IndexingFeature if2)
Determines if two indexing features have the same attribute name and match
Parameters:
if1 - First indexing feature
if2 - Second indexing feature
Returns:
true if they match, false otherwise.

sameAddress

public boolean sameAddress(IndexingFeature if1,
                           IndexingFeature if2)
Determines if two indexing features have the same attribute name and match
Parameters:
if1 - First indexing feature
if2 - Second indexing feature
Returns:
true if they do, false otherwise.

sameAttributeName

public boolean sameAttributeName(IndexingFeature if1,
                                 IndexingFeature if2)
Determine if two indexing features have the same attribute name
Parameters:
if1 - First indexing feature.
if2 - Second indexing feature.
Returns:
true if they do or if one or both of them is null, false otherwise.