Mercurial > hg > easaier-soundaccess
changeset 274:96121bc067fb
Displays only results that have confidence <> 0.0
author | lbarthelemy |
---|---|
date | Thu, 03 Jul 2008 10:16:16 +0000 |
parents | 514c9446639c |
children | acfbbd2fea47 |
files | widgets/SpeechFileHandler.cpp |
diffstat | 1 files changed, 12 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- 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+="<br>"; + _resultAux+="<br>"; + 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+="<b>"; - _result+=attribs.value(i); - _result+="</b>"; - }else if(aux == _tag_confidence){ - _result+=" "; - _result+=attribs.value(i); + _resultAux+="<b>"; + _resultAux+=attribs.value(i); + _resultAux+="</b>"; + }else if(aux == _tag_confidence ){ + _resultAux+=" "; + _resultAux+=attribs.value(i); } } }