本文整理汇总了C++中lem::UCString::empty方法的典型用法代码示例。如果您正苦于以下问题:C++ UCString::empty方法的具体用法?C++ UCString::empty怎么用?C++ UCString::empty使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类lem::UCString
的用法示例。
在下文中一共展示了UCString::empty方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: AddVariable
void TreeScorerBoundVariables::AddVariable( const lem::UCString & upper_name, const Solarix::Word_Form * wordform )
{
LEM_CHECKIT_Z( !upper_name.empty() );
LEM_CHECKIT_Z( wordform!=NULL );
bound_variables[ upper_name ] = wordform;
return;
}
示例2: CString
const lem::CString lem::to_ascii( const lem::UCString &str, const CodeConverter *cp )
{
if( str.empty() )
return CString();
lem::CString ascii;
lem_unicode_to_ascii( ascii.ptr(), str.c_str(), cp ? cp : &lem::UI::get_UI().GetSessionCp() );
ascii.ptr()[str.length()] = 0;
ascii.calc_hash();
return ascii;
}
示例3: MatchSuffix
int Lemmatizator::MatchSuffix( const lem::UCString & suffix ) const
{
LEM_CHECKIT_Z( !suffix.empty() );
int id = -1;
std::map<lem::UCString,int>::const_iterator it = suffix2id.find(suffix);
if( it!=suffix2id.end() )
id = it->second;
return id;
}
示例4: GetSuffix
lem::UCString Lemmatizator::GetSuffix( const lem::UCString & word ) const
{
LEM_CHECKIT_Z( !word.empty() );
lem::UCString uword(word);
uword.to_lower();
if( word.length()==7 && uword==L"~~end~~" )
return word;
else if( word.length()==9 && uword==L"~~begin~~" )
return word;
else if( word.length()<=model_suffix_len )
return uword;
else
return lem::UCString(L'~')+lem::right( uword, model_suffix_len );
}