public class NominalDistanceFunction extends Object implements IDistanceFunction
IDistanceFunction
interface for scoring the
distance between nominal-scaled categories. That is to say, categories
are either equal (distance 0) or unequal (distance 1). A typical example
for nominal-scaled categories are the part of speech tags NOUN, VERB, and
ADJECTIVE. Mathematically, the nominal scale only allows for the equality
operation, but prohibits comparison, addition, and multiplication. The
distance function makes no assumption regarding the data type and thus
allows for strings, enums, integers, etc.IDistanceFunction
Constructor and Description |
---|
NominalDistanceFunction() |
Modifier and Type | Method and Description |
---|---|
double |
measureDistance(IAnnotationStudy study,
Object category1,
Object category2)
Returns a distance value for the given pair of categories used within
the given annotation study.
|
public double measureDistance(IAnnotationStudy study, Object category1, Object category2)
IDistanceFunction
measureDistance
in interface IDistanceFunction
Copyright © 2011–2015 Ubiquitous Knowledge Processing (UKP) Lab. All rights reserved.