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

string InterchunkWord::chunkPart ( ApertiumRE const &  part )

Reference a chunk part

Parameters:
partregular expression to match
Returns:
reference to the part of string matched

Definition at line 88 of file interchunk_word.cc.

{
  string result = part.match(chunk);
  if(result.size() == 0)
  {
    result = part.match(queue);
    if(result.size() != queue.size())
    {
      return "";
    }
    else
    {
      return result;
    }
  }
  else if(result.size() == chunk.size())
  {
    return part.match(chunk+queue);
  }
  else
  {
    return result;
  }
}

Generated by  Doxygen 1.6.0   Back to index