SOLR-1979: remove redundant toString()

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1183582 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Koji Sekiguchi 2011-10-15 05:30:06 +00:00
parent 5e9c68f650
commit f934d2420d
1 changed files with 1 additions and 1 deletions

View File

@ -303,7 +303,7 @@ public class LanguageIdentifierUpdateProcessor extends UpdateRequestProcessor im
protected List<DetectedLanguage> detectLanguage(String content) {
List<DetectedLanguage> languages = new ArrayList<DetectedLanguage>();
if(content.trim().length() != 0) {
LanguageIdentifier identifier = new LanguageIdentifier(content.toString());
LanguageIdentifier identifier = new LanguageIdentifier(content);
// FIXME: Hack - we get the distance from toString and calculate our own certainty score
Double distance = Double.parseDouble(tikaSimilarityPattern.matcher(identifier.toString()).replaceFirst("$1"));
// This formula gives: 0.02 => 0.8, 0.1 => 0.5 which is a better sweetspot than isReasonablyCertain()