public double score(StringWrapper s,StringWrapper t) 
	{
		computeTokenDistances();

		BagOfTokens sBag = (BagOfTokens)s;
		BagOfTokens tBag = (BagOfTokens)t;
		double sim = 0.0;
		for (Iterator i = sBag.tokenIterator(); i.hasNext(); ) {
	    Token tok = (Token)i.next();
			double	df = getDocumentFrequency(tok);
			if (tBag.contains(tok)) {
				double w = -Math.log( df/collectionSize );
				sim += w;
			} else {
				Token matchTok = null;
				double matchScore = tokenMatchThreshold;
				for (Iterator j=tBag.tokenIterator(); j.hasNext(); ) {
					Token tokJ = (Token)j.next();
					double distItoJ = tokenDistance.score( tok.getValue(), tokJ.getValue() );
					if (distItoJ>=matchScore) {
						matchTok = tokJ;
						matchScore = distItoJ;
					}
				}
				if (matchTok!=null) {
					df = neighborhoodDocumentFrequency(tok,  matchScore);
					double w = -Math.log( df/collectionSize );
					sim += w;
				} else {
					double w = -Math.log( df/collectionSize );					
					sim -= w * mismatchFactor;
				}
			}
		}
		return sim;
	}