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

string 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:
t the tag
Returns:
the lexical form of tag t without other text that is ignored.

Definition at line 138 of file TaggerWord.C.

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

  return ret;
}


Generated by  Doxygen 1.6.0   Back to index