package com.grayben.riskExtractor.htmlScorer.partScorers.tagScorers;

import org.jsoup.parser.Tag;

import java.util.HashMap;
import java.util.Map;

public class TagEmphasisScorer
		extends MapScorer<Tag> {

    public static final String SCORE_LABEL = "tag-emphasis";

	public TagEmphasisScorer(Map<Tag, Integer> tagScores) {
		super(SCORE_LABEL, tagScores);
	}

	public static final Map<Tag, Integer> defaultMap() {
		
		//Map<Tag, Integer> tagScores = this.getTagScores();
		Map<Tag, Integer> tagScoreMap = new HashMap<>();
		tagScoreMap.put(Tag.valueOf("b"), 1);
		tagScoreMap.put(Tag.valueOf("strong"), 1);
		tagScoreMap.put(Tag.valueOf("h1"), 1);
		tagScoreMap.put(Tag.valueOf("h2"), 1);
		tagScoreMap.put(Tag.valueOf("h3"), 1);
		tagScoreMap.put(Tag.valueOf("h4"), 1);
		tagScoreMap.put(Tag.valueOf("h5"), 1);
		tagScoreMap.put(Tag.valueOf("u"), 1);
		
		return tagScoreMap;
		
	}

	@Override
	public int score(Tag input) {
		validateTagInput(input);
        return super.score(input);
	}

    public static void validateTagInput(Tag input){
        if(input.getName().isEmpty()){
            throw new IllegalArgumentException(
                    "Input Tag must have a non-empty name"
            );
        }
    }


}

@@ -63,16 +63,80 @@
 orers;%0A%0A
+import com.grayben.riskExtractor.htmlScorer.partScorers.Scorer;%0A
 import o
@@ -210,128 +210,523 @@
 p;%0A%0A
-public class TagEmphasisScorer%0A%09%09extends MapScorer%3CTag%3E %7B%0A%0A    public static final String SCORE_LABEL = %22tag-emphasis%22;%0A
+/**%0A * Scores the emphasis of %7B@link Tag%7Ds passed in to %7B@link #score(Tag)%7D.%0A * %3Cp%3E%0A * Created by Ben Gray, 2015.%0A */%0Apublic class TagEmphasisScorer%0A%09%09extends MapScorer%3CTag%3E %7B%0A%0A    /**%0A     * The string (uniquely) labelling this class.%0A     * %3Cp%3E%0A     * Used to identify this class in a collection of %7B@link Scorer%7Ds.%0A     */%0A    public static final String SCORE_LABEL = %22tag-emphasis%22;%0A%0A    /**%0A     * Construct with the specified map.%0A     * @param tagScores the map with which to construct this instance.%0A     */
 %0A%09pu
@@ -816,16 +816,84 @@
 s);%0A%09%7D%0A%0A
+    /**%0A     * @return the default score map for this class%0A     */%0A
 %09public 
@@ -1409,16 +1409,170 @@
 %0A%09%09%0A%09%7D%0A%0A
+    /**%0A     * Use the underlying %7B@link MapScorer%7D to score the specified input.%0A     * @param input the input to score%0A     * @return the score%0A     */%0A
 %09@Overri
@@ -1667,24 +1667,82 @@
 input);%0A%09%7D%0A%0A
+    /**%0A     * @param input the input to validate%0A     */%0A
     public s

Document TagEmphasisScorer