// Path: src/main/java/com/davidehrmann/classifier4J/IClassifier.java
// public interface IClassifier<I> {
//     /**
//      * Default value to use if the implementation cannot work out how
//      * well a string matches.
//      */
//     public static double NEUTRAL_PROBABILITY = 0.5d;
// 
//     /**
//      * The minimum likelihood that a string matches
//      */
//     public static double LOWER_BOUND = 0.01d;
// 
//     /**
//      * The maximum likelihood that a string matches
//      */
//     public static double UPPER_BOUND = 0.99d;
// 
//     /**
//      * Default cutoff value used by default implementation of 
//      * isMatch. Any match probability greater than or equal to this
//      * value will be classified as a match. 
//      * 
//      * The value is 0.9d
//      * 
//      */
//     public static double DEFAULT_CUTOFF = 0.9d;
// 
//     /**
//      * 
//      * Sets the cutoff below which the input is not considered a match
//      * 
//      * @param cutoff the level below which isMatch will return false. Should be between 0 and 1.
//      */
//     public void setMatchCutoff(double cutoff);
// 
//     /**
//      *
//      * Function to determine the probability string matches a criteria.
//      *   
//      * @param input the string to classify
//      * @return the likelihood that this string is a match for this net.sf.classifier4j. 1 means 100% likely.
//          *
//          * @throws ClassifierException If a non-recoverable problem occurs
//      */
//     public double classify(I input) throws ClassifierException;
// 
//     /**
//      * 
//      * Function to determine if a string matches a criteria.
//      * 
//      * @param input the string to classify
//      * @return true if the input string has a probability >= the cutoff probability of 
//      * matching
//          *
//          * @throws ClassifierException If a non-recoverable problem occurs
//      */
//     public boolean isMatch(I input) throws ClassifierException;
// 
//     /**
//      * Convenience method which takes a match probability
//      * (calculated by {@link IClassifier#classify(java.lang.String)})
//      * and checks if it would be classified as a match or not
//      * 
//      * @param matchProbability 
//      * @return true if match, false otherwise
//      */
//     public boolean isMatch(double matchProbability);
// }


import junit.textui.TestRunner;
import com.davidehrmann.classifier4j.IClassifier;
import junit.framework.TestCase;

		assertEquals(0.96d, wp.getProbability(), 0);

		wp = new WordProbability("aWord", 10, 30);
		assertEquals("aWord", wp.getWord());
		assertEquals(10, wp.getMatchingCount());
		assertEquals(30, wp.getNonMatchingCount());
		assertEquals(0.25d, wp.getProbability(), 0d);
                
                try {
                    wp.setMatchingCount(-10);
                    fail("Shouldn't be able to set -ve matchingCount");
                }
                catch(IllegalArgumentException e) {
                    assertTrue(true);
                }
                
                try {
                    wp.setNonMatchingCount(-10);
                    fail("Shouldn't be able to set -ve nonMatchingCount");
                }
                catch(IllegalArgumentException e) {
                    assertTrue(true);
                }
	}

	public void testCalculateProbability() {

		WordProbability wp = null;

		wp = new WordProbability("", 10, 10);

// Path: src/main/java/com/davidehrmann/classifier4J/IClassifier.java
// public interface IClassifier<I> {
//     /**
//      * Default value to use if the implementation cannot work out how
//      * well a string matches.
//      */
//     public static double NEUTRAL_PROBABILITY = 0.5d;
// 
//     /**
//      * The minimum likelihood that a string matches
//      */
//     public static double LOWER_BOUND = 0.01d;
// 
//     /**
//      * The maximum likelihood that a string matches
//      */
//     public static double UPPER_BOUND = 0.99d;
// 
//     /**
//      * Default cutoff value used by default implementation of 
//      * isMatch. Any match probability greater than or equal to this
//      * value will be classified as a match. 
//      * 
//      * The value is 0.9d
//      * 
//      */
//     public static double DEFAULT_CUTOFF = 0.9d;
// 
//     /**
//      * 
//      * Sets the cutoff below which the input is not considered a match
//      * 
//      * @param cutoff the level below which isMatch will return false. Should be between 0 and 1.
//      */
//     public void setMatchCutoff(double cutoff);
// 
//     /**
//      *
//      * Function to determine the probability string matches a criteria.
//      *   
//      * @param input the string to classify
//      * @return the likelihood that this string is a match for this net.sf.classifier4j. 1 means 100% likely.
//          *
//          * @throws ClassifierException If a non-recoverable problem occurs
//      */
//     public double classify(I input) throws ClassifierException;
// 
//     /**
//      * 
//      * Function to determine if a string matches a criteria.
//      * 
//      * @param input the string to classify
//      * @return true if the input string has a probability >= the cutoff probability of 
//      * matching
//          *
//          * @throws ClassifierException If a non-recoverable problem occurs
//      */
//     public boolean isMatch(I input) throws ClassifierException;
// 
//     /**
//      * Convenience method which takes a match probability
//      * (calculated by {@link IClassifier#classify(java.lang.String)})
//      * and checks if it would be classified as a match or not
//      * 
//      * @param matchProbability 
//      * @return true if match, false otherwise
//      */
//     public boolean isMatch(double matchProbability);
// }


// Path: src/test/java/com/davidehrmann/classifier4J/bayesian/WordProbabilityTest.java
import junit.textui.TestRunner;
import com.davidehrmann.classifier4j.IClassifier;
import junit.framework.TestCase;

		assertEquals(0.96d, wp.getProbability(), 0);

		wp = new WordProbability("aWord", 10, 30);
		assertEquals("aWord", wp.getWord());
		assertEquals(10, wp.getMatchingCount());
		assertEquals(30, wp.getNonMatchingCount());
		assertEquals(0.25d, wp.getProbability(), 0d);
                
                try {
                    wp.setMatchingCount(-10);
                    fail("Shouldn't be able to set -ve matchingCount");
                }
                catch(IllegalArgumentException e) {
                    assertTrue(true);
                }
                
                try {
                    wp.setNonMatchingCount(-10);
                    fail("Shouldn't be able to set -ve nonMatchingCount");
                }
                catch(IllegalArgumentException e) {
                    assertTrue(true);
                }
	}

	public void testCalculateProbability() {

		WordProbability wp = null;

		wp = new WordProbability("", 10, 10);

		assertEquals(IClassifier.NEUTRAL_PROBABILITY, wp.getProbability(), 0);
