# HG changeset patch
# User lbarthelemy
# Date 1215080176 0
# Node ID 96121bc067fb0dc68f35d8b1acfe8f33961e99bf
# Parent 514c9446639c1d8517eaaefc6daee27ef5271b50
Displays only results that have confidence <> 0.0
diff -r 514c9446639c -r 96121bc067fb widgets/SpeechFileHandler.cpp
--- a/widgets/SpeechFileHandler.cpp Fri Jun 27 13:40:55 2008 +0000
+++ b/widgets/SpeechFileHandler.cpp Thu Jul 03 10:16:16 2008 +0000
@@ -24,7 +24,12 @@
bool SpeechFileHandler::endElement (const QString &namespaceURI, const QString &localName, const QString &qName ){
_currentTag = "";
if(localName==_tag_vocal_query_result){
- _result+="
";
+ _resultAux+="
";
+ if(!_resultAux.contains("0.0")){
+ _result += _resultAux;
+ }
+ _resultAux = "";
+
}
return true;
}
@@ -39,12 +44,12 @@
for(int i = 0 ; i < attribs.length() ; i++){
QString aux = attribs.localName(i);
if(aux==_tag_word){
- _result+="";
- _result+=attribs.value(i);
- _result+="";
- }else if(aux == _tag_confidence){
- _result+=" ";
- _result+=attribs.value(i);
+ _resultAux+="";
+ _resultAux+=attribs.value(i);
+ _resultAux+="";
+ }else if(aux == _tag_confidence ){
+ _resultAux+=" ";
+ _resultAux+=attribs.value(i);
}
}
}