src/Generic/discTagger/PDecoder.cpp
/** used to find the second best path */
used to find the second best path
used to find the second best path
void PDecoder::tracePathFromMiddle(int n_obs, int *traceback, int * traceforward,
								   int secondbestpos, int secondbesttag, int *tag_trace)
{
	int i, j;
	int n_tags = _tagSet->getNTags();
	j = secondbesttag;
	for (i = secondbestpos; i <  n_obs; i++) {
		tag_trace[i] = j;
		j = traceforward[n_tags*i + j];
	}
	j = secondbesttag;
	for (i = secondbestpos; i >=  0; i--) {
		tag_trace[i] = j;
		j = traceback[n_tags*i + j];
	}
}
void PDecoder :: tracePathFromMiddle ( int n_obs , int * traceback , int * traceforward , int secondbestpos , int secondbesttag , int * tag_trace ) { int i , j ; int n_tags = _tagSet -> getNTags ( ) ; j = secondbesttag ; for ( i = secondbestpos ; i < n_obs ; i ++ ) { tag_trace [ i ] = j ; j = traceforward [ n_tags * i + j ] ; } j = secondbesttag ; for ( i = secondbestpos ; i >= 0 ; i -- ) { tag_trace [ i ] = j ; j = traceback [ n_tags * i + j ] ; } }
used to find the second best path
used to find the second best path
// backward
 //	j = _tagSet->getEndTagIndex();
 /* XXX >? */ //forward
 /* XXX >? */