Logo Search packages:      
Sourcecode: apertium version File versions  Download package

wstring TaggerWord::get_lexical_form_without_ignored_string ( TTag &  t,
int const   TAG_kEOF 
)

Get the lexical form (fine tag) for a given tag (coarse one)

Parameters:
tthe tag
Returns:
the lexical form of tag t without other text that is ignored.

Definition at line 263 of file tagger_word.cc.

                                                                               {
  wstring ret;
   
  if(t==TAG_kEOF)
     return ret;
 
  if (lexical_forms.size()==0) { //This is an unknown word
      ret.append(L"*^");
      ret.append(superficial_form);
  } else if ((*lexical_forms.begin()).second[0]=='*') {  //This is an unknown word that has been guessed
    ret.append(L"*^");
    ret.append(superficial_form);
  } else {
    ret += L'^';
    ret.append(lexical_forms[t]);
  }
  
  if (ret.length() != 0) {
    if (plus_cut)
      ret+=L'+';
    else {
      ret +=L'$'; 
    }
  }

  return ret;
}

Generated by  Doxygen 1.6.0   Back to index