Class MaxEntScorerPairExtractor
- java.lang.Object
-
- de.julielab.jules.ae.genemapping.scoring.MaxEntScorerPairExtractor
-
public class MaxEntScorerPairExtractor extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description MaxEntScorerPairExtractor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaddPair(java.lang.String first, java.lang.String second)simple pair add rule: terms must not be the same and must have at least one token in common.booleanaddPair(java.lang.String first, java.lang.String second, double overlapRatio, int maxSynLength)overlap must be at least overlapRatio in both terms and both terms must not be longer than a maximal synonym lengthbooleanaddPairSpecialRules(java.lang.String first, java.lang.String second, double overlapRatio, int maxSynLength)as addPair but pair is only allowed if - difference is not only a number or a single character - overlap is not only a number or a single characterjava.lang.String[][]compareStrings(java.lang.String S1, java.lang.String S2)TODO: comment!voidshowPairs(java.util.ArrayList<java.lang.String[]> pairs)voidstorePairs(java.util.ArrayList<java.lang.String[]> pairs, java.io.File filename)
-
-
-
Method Detail
-
showPairs
public void showPairs(java.util.ArrayList<java.lang.String[]> pairs)
-
storePairs
public void storePairs(java.util.ArrayList<java.lang.String[]> pairs, java.io.File filename) throws java.io.IOException- Throws:
java.io.IOException
-
addPair
public boolean addPair(java.lang.String first, java.lang.String second)simple pair add rule: terms must not be the same and must have at least one token in common. Works on normalized terms.- Parameters:
first- normalized termsecond- normalized term- Returns:
-
addPair
public boolean addPair(java.lang.String first, java.lang.String second, double overlapRatio, int maxSynLength)overlap must be at least overlapRatio in both terms and both terms must not be longer than a maximal synonym length- Parameters:
first- normalized termsecond- normalized termoverlapRatio- intersection-size / term-lengthmaxSynLenghth- length in tokens- Returns:
-
addPairSpecialRules
public boolean addPairSpecialRules(java.lang.String first, java.lang.String second, double overlapRatio, int maxSynLength)as addPair but pair is only allowed if - difference is not only a number or a single character - overlap is not only a number or a single character- Parameters:
first-second-overlapRatio-maxSynLength-- Returns:
-
compareStrings
public java.lang.String[][] compareStrings(java.lang.String S1, java.lang.String S2)TODO: comment!- Parameters:
S1-S2-- Returns:
-
-