Class MaxEntScorerPairExtractor


  • public class MaxEntScorerPairExtractor
    extends Object
    • Constructor Detail

      • MaxEntScorerPairExtractor

        public MaxEntScorerPairExtractor()
    • Method Detail

      • getPairs

        public ArrayList<String[]> getPairs​(File trueList,
                                            File completeList,
                                            int amountTrue,
                                            float ratioFalse)
        TODO: comment!
        Parameters:
        trueList -
        completeList -
        amountTrue -
        ratioFalse -
        Returns:
      • 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 term
        second - 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 term
        second - normalized term
        overlapRatio - intersection-size / term-length
        maxSynLength - 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:
      • compareStrings

        public String[][] compareStrings​(String S1,
                                         String S2)
        TODO: comment!
        Parameters:
        S1 -
        S2 -
        Returns: