Class MaxEntScorerPairExtractor
- java.lang.Object
-
- de.julielab.gene.candidateretrieval.scoring.MaxEntScorerPairExtractor
-
public class MaxEntScorerPairExtractor extends Object
-
-
Constructor Summary
Constructors Constructor Description MaxEntScorerPairExtractor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaddPair(String first, String second)simple pair add rule: terms must not be the same and must have at least one token in common.booleanaddPair(String first, 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(String first, 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 characterString[][]compareStrings(String S1, String S2)TODO: comment!ArrayList<String[]>getPairs(File trueList, File completeList, int amountTrue, float ratioFalse)TODO: comment!voidshowPairs(ArrayList<String[]> pairs)voidstorePairs(ArrayList<String[]> pairs, File filename)
-
-
-
Method Detail
-
getPairs
public ArrayList<String[]> getPairs(File trueList, File completeList, int amountTrue, float ratioFalse)
TODO: comment!- Parameters:
trueList-completeList-amountTrue-ratioFalse-- Returns:
-
storePairs
public void storePairs(ArrayList<String[]> pairs, File filename) throws IOException
- Throws:
IOException
-
addPair
public boolean addPair(String first, 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(String first, 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-lengthmaxSynLength- length in tokens- Returns:
-
addPairSpecialRules
public boolean addPairSpecialRules(String first, 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:
-
-