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

void HMM2::read_ambiguity_classes ( FILE *  in  ) 

It reads the ambiguity classes from the stream received as input

Parameters:
is the input stream

Definition at line 64 of file HMM2.C.

{
  while(in)
  {
    int ntags = EndianUtil<int>::read(in);

    if(feof(in))
    {
      break;
    }
    set<TTag> ambiguity_class;

    for(; ntags != 0; ntags--)
    {
      ambiguity_class.insert(EndianUtil<TTag>::read(in));
    }
    
    if(ambiguity_class.size() != 0)
    {
      td->getOutput().add(ambiguity_class);
    }     
  }
  
  td->setProbabilities(td->getTagIndex().size(), td->getOutput().size());
}


Generated by  Doxygen 1.6.0   Back to index