Lines Matching refs:pos
108 * - PROCESS_BOUNDS : go through inBuf items again and match against transduced pos/phoneme
115 * - PROCESS_RECOMB : go through inBuf items again and match against transduced pos/phoneme
188 picoos_uint16 outReadPos; /* next pos to read from inBuf for output */
190 /* picoos_int16 outWritePos; */ /* next pos to output from in buf */
193 picoos_uint8 sylReadPos, sylWritePos; /* next pos to read from sylBuf, next pos to write to sylBuf */
207 picoos_uint16 phonReadPos, phonWritePos; /* next pos to read from phonBufIn, next pos to write to phonBufIn */
220 wordStarted, /* is it the first syl in the word: expect POS */
461 static pico_status_t sphoAddPhoneme(register spho_subobj_t *spho, picoos_int16 pos, picoos_int16 sym) {
465 PICODBG_TRACE(("adding %i/%i (%c on plane %i) at phonBuf[%i]",pos,sym,unshifted,plane,spho->phonWritePos));
471 spho->phonBuf[spho->phonWritePos].pos = pos;
483 static pico_status_t sphoAddTermPhonemes(register spho_subobj_t *spho, picoos_uint16 pos) {
484 return sphoAddPhoneme(spho, pos,
524 register spho_subobj_t *spho, picoos_uint16 pos,
543 headxBuf is given as 'pos'.
549 head = &(spho->headx[pos].head);
550 content = spho->cbuf + spho->headx[pos].cind;
564 rv = sphoAddPhoneme(spho,pos,fstSymbol);
571 /* WORDPHON(POS,WACC)phon */
577 rv = sphoAddPhoneme(spho,pos,fstSymbol);
580 /* for the time being, we force to use POS so we can transduce all fsts in a row without reconsulting the items */
594 PICODBG_DEBUG(("skipping primary stress at pos %i (in 1 .. %i)",i, head->len));
598 PICODBG_DEBUG(("skipping secondary stress at pos %i (in 1 .. %i)",i, head->len));
602 rv = sphoAddPhoneme(spho, pos, fstSymbol);
608 rv = sphoAddPhoneme(spho,pos,fstSymbol);
619 rv = sphoAddPhoneme(spho,pos,fstSymbol);
627 rv = sphoAddPhoneme(spho,pos,fstSymbol);
631 rv = sphoAddPhoneme(spho,pos,fstSymbol);
638 tmpPosSym.pos = spho->phonBuf[i].pos;
640 spho->phonBuf[i].pos = spho->phonBuf[j].pos;
642 spho->phonBuf[j].pos = tmpPosSym.pos;
651 rv = sphoAddPhoneme(spho,pos,fstSymbol);
677 * SPHO_POSSYM_OK : 'pos' and 'sym' are set to the read possym, *readPos is advanced
678 * SPHO_POSSYM_OUT_OF_RANGE : pos is out of range. 'pos' is set to that of the read possym, 'sym' is undefined
679 * SPHO_POSSYM_UNDERFLOW : no more data in buf. 'pos' is set to PICOTRNS_POS_INVALID, 'sym' is undefined
680 * SPHO_POSSYM_INVALID : "strange" pos. 'pos' is set to PICOTRNS_POS_INVALID, 'sym' is undefined
682 static pico_status_t getNextPosSym(spho_subobj_t * spho, picoos_int16 * pos, picoos_int16 * sym,
685 while ((spho->phonReadPos < spho->phonWritePos) && (PICOTRNS_POS_IGNORE == spho->phonBuf[spho->phonReadPos].pos)) {
686 PICODBG_DEBUG(("ignoring phone at spho->phonBuf[%i] because it has pos==IGNORE",spho->phonReadPos));
690 *pos = spho->phonBuf[spho->phonReadPos].pos;
691 if ((PICOTRNS_POS_INSERT == *pos) || ((0 <= *pos) && (*pos < rangeEnd))) {
694 } else if (*pos < 0){ /* *pos is "strange" (e.g. POS_INVALID) */
701 *pos = PICOTRNS_POS_INVALID;
825 picoos_uint32 pos = 0;
826 picoos_write_mem_pi_uint16(ocontent,&pos,sildur);
827 picoos_write_mem_pi_uint16(ocontent,&pos,sildur);
829 ohead.len = pos;
938 picoos_int16 pos, sym, sylsym;
1050 /* PARSE: items -> input pos/phon pairs */
1188 /* set pos at next item */
1196 /* TRANSDUCE: transduction input pos/phon pairs to output pos/phon pairs */
1265 /* BOUNDS: combine input item with pos/phon pairs to insert/modify bounds */
1286 /* advance the phone reading pos to the active range */
1288 while (SPHO_POSSYM_OK == (rv = getNextPosSym(spho, &pos, &sym,
1323 rv = getNextPosSym(spho, &pos, &sym, nextInPos);
1340 picoos_uint32 pos = 0;
1341 picoos_read_mem_pi_uint16(icontent, &pos, &time);
1378 while (SPHO_POSSYM_OK == (rv = getNextPosSym(spho, &pos,
1397 /* RECOMB: combine input item with pos/phon pairs to output item */
1420 PICODBG_DEBUG(("RECOMB treating item in headx at pos %i",spho->outReadPos));
1430 while (SPHO_POSSYM_OK == (rv = getNextPosSym(spho,&pos,&sym,nextInPos))) {
1451 rv = getNextPosSym(spho, &pos, &sym, nextInPos);
1475 rv = getNextPosSym(spho, &pos, &sym, nextInPos);
1507 /* SYL: combine input word item with pos/phon pairs to syl output item */
1510 /* consume all transduced phonemes with pos in in the range [spho->outReadPos,nextInPos[ */
1519 PICODBG_DEBUG(("SYL (1) treating item in headx at pos %i",spho->outReadPos));
1523 PICODBG_TRACE(("SYL expects accent at phonBuf[%i] = (%i,%i) (outReadPos=%i)", spho->phonReadPos, spho->phonBuf[spho->phonReadPos].pos, spho->phonBuf[spho->phonReadPos].sym,spho->outReadPos));
1524 rv = getNextPosSym(spho,&pos,&sym,nextInPos);
1533 /* for the time being, we force to use POS so we can transduce all fsts in a row without reconsulting the items */
1534 PICODBG_TRACE(("SYL expects POS"));
1536 rv = getNextPosSym(spho,&pos,&sym,nextInPos);
1547 PICODBG_DEBUG(("SYL setting POS to %c", ohead.info1));
1558 while (SPHO_POSSYM_OK == (rv = getNextPosSym(spho,&pos,&sym,nextInPos)) && (sym != sylsym)) {
1561 PICODBG_TRACE(("SYL adding phoneme to syllable: (pos %i,sym %i)[plane %i,sym %c]",pos,sym,plane,sym & 0xFF));