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

wstring LexTorWord::get_lexical_choice ( int  choice = -1,
bool  include_ignored = true 

Return the lexical choice at position 'choice', if 'choice' is not given the default one is returned

Definition at line 58 of file lextor_word.cc.

  if (word == L"") {
    if (include_ignored)
      return ignored_string;
      return L"";

  if (choice<0)

  if (choice>=(int)lexical_choices.size()) {
    wcerr<<L"Error in LexTorWord::get_lexical_choice, choice position given is "
      <<L"greater than the number of choices available\n";
    wcerr<<L"position requested: "<<choice<<"\n";
    wcerr<<L"number of lexical choices: "<<lexical_choices.size()<<"\n";
    wcerr<<L"Returning default choice\n";

  if (include_ignored)
    return ignored_string+L"^"+lexical_choices[choice]+L"$";
    return lexical_choices[choice];

Generated by  Doxygen 1.6.0   Back to index