/src/org/bitbucket/artbugorski/postmedclaimfinder/experiment/ExperimentSettings.java
Java | 157 lines | 115 code | 30 blank | 12 comment | 0 complexity | cbafbf908d91bbd52466d63e4b5b6c20 MD5 | raw file
- package org.bitbucket.artbugorski.postmedclaimfinder.experiment;
- import java.util.Collection;
- import java.util.Collections;
- import java.util.HashMap;
- import org.bitbucket.artbugorski.postmedclaimfinder.scorer.FeatureValueCalculatorMethod;
- import org.bitbucket.artbugorski.postmedclaimfinder.model.DocumentInformation;
- import java.util.Map;
- import org.bitbucket.artbugorski.postmedclaimfinder.AppUtil.*;
- import org.bitbucket.artbugorski.postmedclaimfinder.reporter.Reporter;
- import org.bitbucket.artbugorski.postmedclaimfinder.filter.WordFilter;
- import org.bitbucket.artbugorski.postmedclaimfinder.matcher.SectionMatcher;
- import org.bitbucket.artbugorski.util.nlp.NGramTree;
- /**
- * The purpose of this class is to abstract away general settings into an object,
- * instead of using global variables. This is to facilitate the running of multiple
- * tests independently.
- *
- * @author Art
- */
- public class ExperimentSettings implements Cloneable {
- /**
- * Which set of document to use. The random set has been haphazardly
- * accumulated by historical accident whereas the focused one has be selected
- * from biology themed journals.
- */
- private boolean useFigLess;
- private Collection< Class<? extends SectionMatcher> > matchingHeuristics = Collections.emptyList();
- private FeatureValueCalculatorMethod<Double> scoringMethod;
- private WordFilter filter;
- private Reporter reporter;
- private int biGramCutOff;
- private int coreCount;
- private int fixedExpressionRequirement;
- private FeatureSet calcMode;
- private boolean filterFixedExpressions;
- private Map<DocumentInformation, NGramTree> fixedExpressions = new HashMap<>();
- private Corpus corpus;
- public boolean isUseFigLess(){
- return useFigLess;
- }
- public void setUseFigLess( boolean useFigLess ){
- this.useFigLess = useFigLess;
- }
- public Collection< Class<? extends SectionMatcher> > getMatchingHeuristics(){
- return matchingHeuristics;
- }
- public void setMatchingHeuristics( Collection< Class<? extends SectionMatcher> > matchingHeuristics ){
- this.matchingHeuristics = matchingHeuristics;
- }
- public FeatureValueCalculatorMethod<Double> getScoringMethod(){
- return scoringMethod;
- }
- public void setScoringMethod( FeatureValueCalculatorMethod<Double> scoringMethod ){
- this.scoringMethod = scoringMethod;
- }
- public WordFilter getFilter(){
- return filter;
- }
- public void setFilter( WordFilter filter ){
- this.filter = filter;
- }
- public Reporter getReporter(){
- return reporter;
- }
- public void setReporter( Reporter reporter ){
- this.reporter = reporter;
- }
- public int getBiGramCutOff(){
- return biGramCutOff;
- }
- public void setBiGramCutOff( int biGramCutOff ){
- this.biGramCutOff = biGramCutOff;
- }
- public int getCoreCount(){
- return coreCount;
- }
- public void setCoreCount( int coreCount ){
- this.coreCount = coreCount;
- }
- public int getFixedExpressionRequirement(){
- return fixedExpressionRequirement;
- }
- public void setFixedExpressionRequirement( int fixedExpressionRequirement ){
- this.fixedExpressionRequirement = fixedExpressionRequirement;
- }
- public FeatureSet getFeatureSet(){
- return calcMode;
- }
- public void setFeatureSet( FeatureSet calcMode ){
- this.calcMode = calcMode;
- }
- public boolean isFilterFixedExpressions(){
- return filterFixedExpressions;
- }
- public void setFilterFixedExpressions( boolean filterFixedExpressions ){
- this.filterFixedExpressions = filterFixedExpressions;
- }
- public Map<DocumentInformation, NGramTree> getFixedExpressions(){
- return fixedExpressions;
- }
- public void setFixedExpressions( Map<DocumentInformation, NGramTree> fixedExpressions ){
- this.fixedExpressions = fixedExpressions;
- }
- public Corpus getCorpus(){
- return corpus;
- }
- public void setCorpus( Corpus corpus ){
- this.corpus = corpus;
- }
- @Override
- public String toString() {
- return "ExperimentSettings{"
- + "useFigLess=" + useFigLess
- + ", matchingHeuristics=" + matchingHeuristics
- + ", scoringMethod=" + scoringMethod
- + ", filter=" + filter
- + ", reporter=" + reporter
- + ", biGramCutOff=" + biGramCutOff
- + ", coreCount=" + coreCount
- + ", fixedExpressionRequirement=" + fixedExpressionRequirement
- + ", calcMode=" + calcMode
- + ", filterFixedExpressions=" + filterFixedExpressions
- + ", fixedExpressions=" + fixedExpressions
- + ", corpus=" + corpus
- + '}';
- }
- }