src/test/java/eu/digitisation/output/ErrorMeasureTest.java
@Test
    public void testCer() throws Exception {
        System.out.println("cer");
        URL resourceUrl1 = getClass().getResource("/text1.txt");
        File file1 = new File(resourceUrl1.toURI());
        //String encoding1 = "utf8";
        URL resourceUrl2 = getClass().getResource("/text2.txt");
        File file2 = new File(resourceUrl2.toURI());
        //String encoding2 = "utf8";
        Text c1 = new Text(file1);
        Text c2 = new Text(file2);
        String s1 = StringNormalizer.reduceWS(c1.toString());
        String s2 = StringNormalizer.reduceWS(c2.toString());
        double expResult = 3.0 / 14;
        double result = ErrorMeasure.cer(s1, s2);
        assertEquals(expResult, result, 0.001);
    }
/**
     * Test of cer method, of class ErrorMeasure.
     *
     * @throws java.lang.Exception
     */
Test of cer method, of class ErrorMeasure.
Test of cer method of class ErrorMeasure .
@Test
    public void testCer() throws Exception {
        System.out.println("cer");
        URL resourceUrl1 = getClass().getResource("/text1.txt");
        File file1 = new File(resourceUrl1.toURI());
        URL resourceUrl2 = getClass().getResource("/text2.txt");
        File file2 = new File(resourceUrl2.toURI());
        Text c1 = new Text(file1);
        Text c2 = new Text(file2);
        String s1 = StringNormalizer.reduceWS(c1.toString());
        String s2 = StringNormalizer.reduceWS(c2.toString());
        double expResult = 3.0 / 14;
        double result = ErrorMeasure.cer(s1, s2);
        assertEquals(expResult, result, 0.001);
    }
@ Test public void testCer ( ) throws Exception { System . out . println ( "cer" ) ; URL resourceUrl1 = getClass ( ) . getResource ( "/text1.txt" ) ; File file1 = new File ( resourceUrl1 . toURI ( ) ) ; URL resourceUrl2 = getClass ( ) . getResource ( "/text2.txt" ) ; File file2 = new File ( resourceUrl2 . toURI ( ) ) ; Text c1 = new Text ( file1 ) ; Text c2 = new Text ( file2 ) ; String s1 = StringNormalizer . reduceWS ( c1 . toString ( ) ) ; String s2 = StringNormalizer . reduceWS ( c2 . toString ( ) ) ; double expResult = 3.0 / 14 ; double result = ErrorMeasure . cer ( s1 , s2 ) ; assertEquals ( expResult , result , 0.001 ) ; }
Test of cer method, of class ErrorMeasure.
Test of cer method of class ErrorMeasure .
//String encoding1 = "utf8"; //String encoding2 = "utf8";