Definition at line 871 of file mainTrecSearch.cpp. References Impala::CmdOptions::GetInstance(), Impala::CmdOptions::GetInt(), Impala::Core::Table::SimilarityTableSet::GetName(), mConceptRanking, Impala::Core::Table::SimilarityTableSet::NrTables(), and Impala::Core::Table::SimilarityTableSet::Rename(). 00872 { 00873 CmdOptions& options = CmdOptions::GetInstance(); 00874 int stripToDot = options.GetInt("conceptStripToDot"); 00875 for (int i=0 ; i<mConceptRanking->NrTables() ; i++) 00876 { 00877 Util::StringParser p(mConceptRanking->GetName(i)); 00878 char upToChar = '.'; 00879 p.Advance(upToChar, stripToDot); 00880 String res = p.GetString('.', false); 00881 mConceptRanking->Rename(i, res); 00882 } 00883 if (options.GetInt("conceptStripExtension")) 00884 { 00885 for (int i=0 ; i<mConceptRanking->NrTables() ; i++) 00886 { 00887 String name = mConceptRanking->GetName(i); 00888 int pos = name.find("-",0); 00889 if (pos == String::npos) 00890 continue; 00891 String result = name.substr(0, pos); 00892 // pos = result.find("_",0); 00893 // assumption: if extension then first part is nummeral 00894 // result = "*" + result.substr(pos+1); 00895 mConceptRanking->Rename(i, result); 00896 } 00897 } 00898 }
Here is the call graph for this function:
|