public class IdentityMatcher extends SemanticProcessor implements com.exalead.util.Checkable, java.io.Serializable
SemanticProcessor.Transformer<T>, SemanticProcessor.Visitor
Modifier and Type | Field and Description |
---|---|
boolean |
computeAndAtom |
boolean |
computeDistance |
boolean |
computeOptAtom |
double |
costDeletion |
double |
costInsertion |
double |
costSubstitution |
double |
costTransposition |
static boolean |
DEFAULT_COMPUTE_AND_ATOM |
static boolean |
DEFAULT_COMPUTE_DISTANCE |
static boolean |
DEFAULT_COMPUTE_OPT_ATOM |
static double |
DEFAULT_COST_DELETION |
static double |
DEFAULT_COST_INSERTION |
static double |
DEFAULT_COST_SUBSTITUTION |
static double |
DEFAULT_COST_TRANSPOSITION |
static boolean |
DEFAULT_KEEP_LONGEST_MATCH_ONLY |
static boolean |
DEFAULT_NO_OVERLAP_IN_AND_ATOMS |
static boolean |
DEFAULT_NO_OVERLAP_IN_OPT_ATOMS |
static boolean |
DEFAULT_ONE_MATCH_PER_ATOM_ONLY_ON_AND |
static boolean |
DEFAULT_ONE_MATCH_PER_ATOM_ONLY_ON_OPT |
boolean |
keepLongestMatchOnly |
java.lang.String |
linkWordTag |
boolean |
noOverlapInAndAtoms |
boolean |
noOverlapInOptAtoms |
boolean |
oneMatchPerAtomOnlyOnAnd |
boolean |
oneMatchPerAtomOnlyOnOpt |
java.lang.String |
resourceDir |
contexts, name, src
Constructor and Description |
---|
IdentityMatcher() |
IdentityMatcher(IdentityMatcher o)
Copy constructor
|
Modifier and Type | Method and Description |
---|---|
<T> T |
accept(SemanticProcessor.Transformer<T> transformer,
T[] t) |
void |
accept(SemanticProcessor.Visitor visitor) |
void |
check(boolean deep,
java.lang.String errorContext)
Checks this IdentityMatcher.
|
static IdentityMatcher |
fromString(java.lang.String s)
String representation of this IdentityMatcher.
|
double |
getCostDeletion()
Cost of a token deletion.
|
double |
getCostInsertion()
Cost of a token insertion.
|
double |
getCostSubstitution()
Cost of a token substitution.
|
double |
getCostTransposition()
Cost of a token transposition.
|
java.lang.String |
getLinkWordTag()
Name of the link word annotation (relatedtermspreprocessor's linkword by default).
|
java.lang.String |
getResourceDir()
URL for the resource (data://, file;// or resource://)
|
boolean |
isComputeAndAtom()
Computes mandatory atoms.
|
boolean |
isComputeDistance()
Determine whether the distance should be computed.
|
boolean |
isComputeOptAtom()
Computes optional atoms.
|
boolean |
isKeepLongestMatchOnly()
Only the longest match should be kept.
|
boolean |
isNoOverlapInAndAtoms()
Overlap is forbidden in the mandatory part.
|
boolean |
isNoOverlapInOptAtoms()
Overlap is forbidden in the optional part.
|
boolean |
isOneMatchPerAtomOnlyOnAnd()
Atoms can be only consumed once in the mandatory part.
|
boolean |
isOneMatchPerAtomOnlyOnOpt()
Atoms can be only consumed once in the optional part.
|
IdentityMatcher |
makeCopy()
Creates and returns a deep copy of this IdentityMatcher.
|
static IdentityMatcher |
readFrom(java.io.InputStream is)
Read this IdentityMatcher from an XML fragment.
|
void |
setComputeAndAtom(boolean computeAndAtom)
Computes mandatory atoms.
|
void |
setComputeDistance(boolean computeDistance)
Determine whether the distance should be computed.
|
void |
setComputeOptAtom(boolean computeOptAtom)
Computes optional atoms.
|
void |
setCostDeletion(double costDeletion)
Cost of a token deletion.
|
void |
setCostInsertion(double costInsertion)
Cost of a token insertion.
|
void |
setCostSubstitution(double costSubstitution)
Cost of a token substitution.
|
void |
setCostTransposition(double costTransposition)
Cost of a token transposition.
|
void |
setKeepLongestMatchOnly(boolean keepLongestMatchOnly)
Only the longest match should be kept.
|
void |
setLinkWordTag(java.lang.String linkWordTag)
Name of the link word annotation (relatedtermspreprocessor's linkword by default).
|
void |
setNoOverlapInAndAtoms(boolean noOverlapInAndAtoms)
Overlap is forbidden in the mandatory part.
|
void |
setNoOverlapInOptAtoms(boolean noOverlapInOptAtoms)
Overlap is forbidden in the optional part.
|
void |
setOneMatchPerAtomOnlyOnAnd(boolean oneMatchPerAtomOnlyOnAnd)
Atoms can be only consumed once in the mandatory part.
|
void |
setOneMatchPerAtomOnlyOnOpt(boolean oneMatchPerAtomOnlyOnOpt)
Atoms can be only consumed once in the optional part.
|
void |
setResourceDir(java.lang.String resourceDir)
URL for the resource (data://, file;// or resource://)
|
java.lang.String |
toString()
String representation of this IdentityMatcher.
|
IdentityMatcher |
withComputeAndAtom(boolean computeAndAtom) |
IdentityMatcher |
withComputeAndAtom(java.lang.Boolean computeAndAtom) |
IdentityMatcher |
withComputeDistance(boolean computeDistance) |
IdentityMatcher |
withComputeDistance(java.lang.Boolean computeDistance) |
IdentityMatcher |
withComputeOptAtom(boolean computeOptAtom) |
IdentityMatcher |
withComputeOptAtom(java.lang.Boolean computeOptAtom) |
IdentityMatcher |
withContexts(java.lang.String contexts) |
IdentityMatcher |
withCostDeletion(double costDeletion) |
IdentityMatcher |
withCostInsertion(double costInsertion) |
IdentityMatcher |
withCostSubstitution(double costSubstitution) |
IdentityMatcher |
withCostTransposition(double costTransposition) |
IdentityMatcher |
withKeepLongestMatchOnly(boolean keepLongestMatchOnly) |
IdentityMatcher |
withKeepLongestMatchOnly(java.lang.Boolean keepLongestMatchOnly) |
IdentityMatcher |
withLinkWordTag(java.lang.String linkWordTag) |
IdentityMatcher |
withName(java.lang.String name) |
IdentityMatcher |
withNoOverlapInAndAtoms(boolean noOverlapInAndAtoms) |
IdentityMatcher |
withNoOverlapInAndAtoms(java.lang.Boolean noOverlapInAndAtoms) |
IdentityMatcher |
withNoOverlapInOptAtoms(boolean noOverlapInOptAtoms) |
IdentityMatcher |
withNoOverlapInOptAtoms(java.lang.Boolean noOverlapInOptAtoms) |
IdentityMatcher |
withOneMatchPerAtomOnlyOnAnd(boolean oneMatchPerAtomOnlyOnAnd) |
IdentityMatcher |
withOneMatchPerAtomOnlyOnAnd(java.lang.Boolean oneMatchPerAtomOnlyOnAnd) |
IdentityMatcher |
withOneMatchPerAtomOnlyOnOpt(boolean oneMatchPerAtomOnlyOnOpt) |
IdentityMatcher |
withOneMatchPerAtomOnlyOnOpt(java.lang.Boolean oneMatchPerAtomOnlyOnOpt) |
IdentityMatcher |
withResourceDir(java.lang.String resourceDir) |
IdentityMatcher |
withSrc(java.lang.String src)
Deprecated.
|
void |
writeTo(java.io.OutputStream os)
Write this IdentityMatcher as an XML fragment
|
getContexts, getName, getSrc, setContexts, setName, setSrc
public java.lang.String resourceDir
public boolean computeDistance
public static final boolean DEFAULT_COMPUTE_DISTANCE
public boolean computeAndAtom
public static final boolean DEFAULT_COMPUTE_AND_ATOM
public boolean computeOptAtom
public static final boolean DEFAULT_COMPUTE_OPT_ATOM
public double costInsertion
public static final double DEFAULT_COST_INSERTION
public double costDeletion
public static final double DEFAULT_COST_DELETION
public double costSubstitution
public static final double DEFAULT_COST_SUBSTITUTION
public double costTransposition
public static final double DEFAULT_COST_TRANSPOSITION
public java.lang.String linkWordTag
public boolean oneMatchPerAtomOnlyOnAnd
public static final boolean DEFAULT_ONE_MATCH_PER_ATOM_ONLY_ON_AND
public boolean oneMatchPerAtomOnlyOnOpt
public static final boolean DEFAULT_ONE_MATCH_PER_ATOM_ONLY_ON_OPT
public boolean noOverlapInAndAtoms
public static final boolean DEFAULT_NO_OVERLAP_IN_AND_ATOMS
public boolean noOverlapInOptAtoms
public static final boolean DEFAULT_NO_OVERLAP_IN_OPT_ATOMS
public boolean keepLongestMatchOnly
public static final boolean DEFAULT_KEEP_LONGEST_MATCH_ONLY
public IdentityMatcher()
public IdentityMatcher(IdentityMatcher o)
public IdentityMatcher withName(java.lang.String name)
withName
in class SemanticProcessor
public IdentityMatcher withContexts(java.lang.String contexts)
withContexts
in class SemanticProcessor
@Deprecated public IdentityMatcher withSrc(java.lang.String src)
withSrc
in class SemanticProcessor
public void setResourceDir(java.lang.String resourceDir)
public java.lang.String getResourceDir()
public IdentityMatcher withResourceDir(java.lang.String resourceDir)
public void setComputeDistance(boolean computeDistance)
public boolean isComputeDistance()
public IdentityMatcher withComputeDistance(boolean computeDistance)
public IdentityMatcher withComputeDistance(java.lang.Boolean computeDistance)
public void setComputeAndAtom(boolean computeAndAtom)
public boolean isComputeAndAtom()
public IdentityMatcher withComputeAndAtom(boolean computeAndAtom)
public IdentityMatcher withComputeAndAtom(java.lang.Boolean computeAndAtom)
public void setComputeOptAtom(boolean computeOptAtom)
public boolean isComputeOptAtom()
public IdentityMatcher withComputeOptAtom(boolean computeOptAtom)
public IdentityMatcher withComputeOptAtom(java.lang.Boolean computeOptAtom)
public void setCostInsertion(double costInsertion)
public double getCostInsertion()
public IdentityMatcher withCostInsertion(double costInsertion)
public void setCostDeletion(double costDeletion)
public double getCostDeletion()
public IdentityMatcher withCostDeletion(double costDeletion)
public void setCostSubstitution(double costSubstitution)
public double getCostSubstitution()
public IdentityMatcher withCostSubstitution(double costSubstitution)
public void setCostTransposition(double costTransposition)
public double getCostTransposition()
public IdentityMatcher withCostTransposition(double costTransposition)
public void setLinkWordTag(java.lang.String linkWordTag)
public java.lang.String getLinkWordTag()
public IdentityMatcher withLinkWordTag(java.lang.String linkWordTag)
public void setOneMatchPerAtomOnlyOnAnd(boolean oneMatchPerAtomOnlyOnAnd)
public boolean isOneMatchPerAtomOnlyOnAnd()
public IdentityMatcher withOneMatchPerAtomOnlyOnAnd(boolean oneMatchPerAtomOnlyOnAnd)
public IdentityMatcher withOneMatchPerAtomOnlyOnAnd(java.lang.Boolean oneMatchPerAtomOnlyOnAnd)
public void setOneMatchPerAtomOnlyOnOpt(boolean oneMatchPerAtomOnlyOnOpt)
public boolean isOneMatchPerAtomOnlyOnOpt()
public IdentityMatcher withOneMatchPerAtomOnlyOnOpt(boolean oneMatchPerAtomOnlyOnOpt)
public IdentityMatcher withOneMatchPerAtomOnlyOnOpt(java.lang.Boolean oneMatchPerAtomOnlyOnOpt)
public void setNoOverlapInAndAtoms(boolean noOverlapInAndAtoms)
public boolean isNoOverlapInAndAtoms()
public IdentityMatcher withNoOverlapInAndAtoms(boolean noOverlapInAndAtoms)
public IdentityMatcher withNoOverlapInAndAtoms(java.lang.Boolean noOverlapInAndAtoms)
public void setNoOverlapInOptAtoms(boolean noOverlapInOptAtoms)
public boolean isNoOverlapInOptAtoms()
public IdentityMatcher withNoOverlapInOptAtoms(boolean noOverlapInOptAtoms)
public IdentityMatcher withNoOverlapInOptAtoms(java.lang.Boolean noOverlapInOptAtoms)
public void setKeepLongestMatchOnly(boolean keepLongestMatchOnly)
public boolean isKeepLongestMatchOnly()
public IdentityMatcher withKeepLongestMatchOnly(boolean keepLongestMatchOnly)
public IdentityMatcher withKeepLongestMatchOnly(java.lang.Boolean keepLongestMatchOnly)
public IdentityMatcher makeCopy()
makeCopy
in class SemanticProcessor
public static IdentityMatcher readFrom(java.io.InputStream is) throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBException
public void writeTo(java.io.OutputStream os) throws javax.xml.bind.JAXBException, java.io.IOException
writeTo
in class SemanticProcessor
javax.xml.bind.JAXBException
java.io.IOException
public static IdentityMatcher fromString(java.lang.String s) throws javax.xml.bind.JAXBException, java.io.UnsupportedEncodingException
javax.xml.bind.JAXBException
java.io.UnsupportedEncodingException
public java.lang.String toString()
toString
in class SemanticProcessor
public void check(boolean deep, java.lang.String errorContext) throws com.exalead.util.TypedException
check
in interface com.exalead.util.Checkable
check
in class SemanticProcessor
com.exalead.util.TypedException
public void accept(SemanticProcessor.Visitor visitor) throws com.exalead.util.TypedException
accept
in class SemanticProcessor
com.exalead.util.TypedException
public <T> T accept(SemanticProcessor.Transformer<T> transformer, T[] t) throws com.exalead.util.TypedException
accept
in class SemanticProcessor
com.exalead.util.TypedException
Copyright © 2013 Dassault Systèmes, All Rights Reserved.