Exemplo n.º 1
0
/* If there is room for more sentences, add one.
 */
static void
more_sentences (state *s)
{
  int i;
  Bool any = False;
  for (i = 0; i < s->nsentences; i++)
    {
      sentence *se = s->sentences[i];
      if (! se)
        {
          se = new_sentence (s, s);
          populate_sentence (s, se);
          if (se->nwords > 0)
            s->spawn_p = False, any = True;
          else
            {
              free_sentence (s, se);
              se = 0;
            }
          s->sentences[i] = se;
          if (se)
            s->latest_sentence = se->id;
          break;
        }
    }

  if (any) sort_sentences (s);
}
Exemplo n.º 2
0
void make_sentence()
{
	SENTENCE *sent=NULL;
	BREATH *breath;
	MORPH *morph;

	for( breath = bhead; breath; breath = breath->next) {
	  	if( sent == NULL || breath->silence == SILB )  {
			sent = new_sentence();
		}
		add_to_sentence( breath, sent );
	}

	for( morph = mphead; morph; morph = morph->next )  {
		if( morph->silence != SILB && morph->silence != SILE &&
			morph->silence != PAU )
			strcat( spoken_text, morph->kanji );
	}
}