You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stanbol.apache.org by og...@apache.org on 2012/01/12 16:32:47 UTC

svn commit: r1230592 - /incubator/stanbol/trunk/enhancer/engines/topic/src/test/java/org/apache/stanbol/enhancer/engine/topic/TopicEngineTest.java

Author: ogrisel
Date: Thu Jan 12 15:32:47 2012
New Revision: 1230592

URL: http://svn.apache.org/viewvc?rev=1230592&view=rev
Log:
STANBOL-197: add a test for score information

Modified:
    incubator/stanbol/trunk/enhancer/engines/topic/src/test/java/org/apache/stanbol/enhancer/engine/topic/TopicEngineTest.java

Modified: incubator/stanbol/trunk/enhancer/engines/topic/src/test/java/org/apache/stanbol/enhancer/engine/topic/TopicEngineTest.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/enhancer/engines/topic/src/test/java/org/apache/stanbol/enhancer/engine/topic/TopicEngineTest.java?rev=1230592&r1=1230591&r2=1230592&view=diff
==============================================================================
--- incubator/stanbol/trunk/enhancer/engines/topic/src/test/java/org/apache/stanbol/enhancer/engine/topic/TopicEngineTest.java (original)
+++ incubator/stanbol/trunk/enhancer/engines/topic/src/test/java/org/apache/stanbol/enhancer/engine/topic/TopicEngineTest.java Thu Jan 12 15:32:47 2012
@@ -269,6 +269,10 @@ public class TopicEngineTest extends Bas
         assertEquals(music, suggestions.get(1).uri);
         assertEquals(football, suggestions.get(2).uri);
         assertEquals(sport, suggestions.get(3).uri);
+        // check that the scores are decreasing:
+        assertTrue(suggestions.get(0).score > suggestions.get(1).score);
+        assertTrue(suggestions.get(1).score > suggestions.get(2).score);
+        assertTrue(suggestions.get(2).score > suggestions.get(3).score);
 
         suggestions = classifier.suggestTopics("Apple is no longer a startup.");
         assertTrue(suggestions.size() >= 3);