public interface LexicalWeighting
Modifier and Type | Field and Description |
---|---|
static double |
UNKNOWN_ALIGN
The lexical weight that corresponds to an unknown alignment.
|
Modifier and Type | Method and Description |
---|---|
double |
getWeight(Token src,
Token trg)
Return the lexical weight for the given tokens, that is, a numerical
value that reflects how strongly aligned they are.
|
void |
writeEntityDictionary(LexicalWeighting reverseLexicalWeighting,
double threshold,
java.io.Writer out)
Writes a text dictionary that contains all the entity pairs with a
lexical weight equal or higher than the given threshold except those
whose both elements are equal.
|
static final double UNKNOWN_ALIGN
double getWeight(Token src, Token trg)
src
- the token in the source language.trg
- the token in the target language.void writeEntityDictionary(LexicalWeighting reverseLexicalWeighting, double threshold, java.io.Writer out) throws java.io.IOException
TextDictionary
.reverseLexicalWeighting
- the reverse lexical weighting so that if this instance goes from source to target, the reverse one should go from target to source.threshold
- the minimum lexical weight for an entity pair to appear in the resulting dictionary.out
- the Writer
which with to write the dictionary.java.io.IOException
- if an I/O error occurs.java.lang.IllegalArgumentException
- if this lexical weighting and the reverse one don't have the same type.