software/test/performance/src/org/LexGrid/LexBIG/example/ScoreTerm.java
/**
	 * Returns a score providing a relative comparison of the first set
	 * of words against the second.
	 * <p>
	 * Currently the score is evaluated as a simple percentage
	 * based on number of words in the first set that are also in the
	 * second (order independent).  This could be enhanced to take
	 * order into account, etc.
	 * 
	 * @param wordsToCompare
	 * @param wordsToCompareAgainst
	 * @return The score (a percentage); a higher value indicates a
	 * stronger match.
	 */
Returns a score providing a relative comparison of the first set
of words against the second.

Currently the score is evaluated as a simple percentage
based on number of words in the first set that are also in the
second (order independent).  This could be enhanced to take
order into account, etc.

@param wordsToCompare
@param wordsToCompareAgainst
@return The score (a percentage); a higher value indicates a
stronger match.
Returns a score providing a relative comparison of the first set of words against the second . Currently the score is evaluated as a simple percentage based on number of words in the first set that are also in the second ( order independent ) . This could be enhanced to take order into account etc . @param wordsToCompare @param wordsToCompareAgainst @return The score ( a percentage ) ; a higher value indicates a stronger match .
protected float score(SortedSet<String> wordsToCompare, SortedSet<String> wordsToCompareAgainst) {
		int totalWords = wordsToCompare.size();
		int matchWords = 0;
		for (Iterator<String> words = wordsToCompare.iterator(); words.hasNext(); ) {
			String word = words.next().toString();
			if (wordsToCompareAgainst.contains(word))
				matchWords++;
		}
		return ((float) matchWords / (float) totalWords) * 100;
	}
protected float score ( SortedSet < String > wordsToCompare , SortedSet < String > wordsToCompareAgainst ) { int totalWords = wordsToCompare . size ( ) ; int matchWords = 0 ; for ( Iterator < String > words = wordsToCompare . iterator ( ) ; words . hasNext ( ) ; ) { String word = words . next ( ) . toString ( ) ; if ( wordsToCompareAgainst . contains ( word ) ) matchWords ++ ; } return ( ( float ) matchWords / ( float ) totalWords ) * 100 ; }
Returns a score providing a relative comparison of the first set
 of words against the second.
Returns a score providing a relative comparison of the first set of words against the second .