Package org.apache.stanbol.enhancer.engines.entitylinking.impl

Examples of org.apache.stanbol.enhancer.engines.entitylinking.impl.Suggestion


                "for selection "+linkedEntity.getSelectedText() + "(Expected: " +
                expectedSuggestions +")", linkedEntity.getSuggestions().size(),
                expectedSuggestions.size());
            double score = linkedEntity.getScore();
            for(int i=0;i<expectedSuggestions.size();i++){
                Suggestion suggestion = linkedEntity.getSuggestions().get(i);
                assertEquals("Expecced Suggestion at Rank "+i+" expected: "+
                    expectedSuggestions.get(i)+" suggestion: "+
                    suggestion.getEntity().getId(),
                    expectedSuggestions.get(i),
                    suggestion.getEntity().getId());
                assertTrue("Score of suggestion "+i+"("+suggestion.getScore()+
                    " > as of the previous one ("+score+")",
                    score >= suggestion.getScore());
                score = suggestion.getScore();
            }
        }
        assertTrue("The expected Result(s) "+expectedResults+" wehre not found",
            expectedResults.isEmpty());
    }
View Full Code Here


                "for selection "+linkedEntity.getSelectedText(),
                linkedEntity.getSuggestions().size(),
                expectedSuggestions.size());
            double score = linkedEntity.getScore();
            for(int i=0;i<expectedSuggestions.size();i++){
                Suggestion suggestion = linkedEntity.getSuggestions().get(i);
                assertEquals("Expecced Suggestion at Rank "+i+" expected: "+
                    expectedSuggestions.get(i)+" suggestion: "+
                    suggestion.getEntity().getId(),
                    expectedSuggestions.get(i),
                    suggestion.getEntity().getId());
                assertTrue("Score of suggestion "+i+"("+suggestion.getScore()+
                    " > as of the previous one ("+score+")",
                    score >= suggestion.getScore());
                score = suggestion.getScore();
            }
        }
        assertTrue("The expected Result(s) "+expectedResults+" wehre not found",
            expectedResults.isEmpty());
    }
View Full Code Here

TOP

Related Classes of org.apache.stanbol.enhancer.engines.entitylinking.impl.Suggestion

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.