Lines Matching refs:acph

161     acph_subobj_t * acph;  in acphInitialize()  local
170 acph = (acph_subobj_t *) this->subObj; in acphInitialize()
171 acph->procState = SA_STEPSTATE_COLLECT; in acphInitialize()
172 acph->boundStrengthState = SA_BOUNDSTRENGTH_SSEP; in acphInitialize()
174 acph->inspaceok = TRUE; in acphInitialize()
175 acph->needsmoreitems = TRUE; in acphInitialize()
177 acph->headxBottom = 0; in acphInitialize()
178 acph->headxLen = 0; in acphInitialize()
179 acph->cbufBufSize = PICOACPH_MAXSIZE_CBUF; in acphInitialize()
180 acph->cbufLen = 0; in acphInitialize()
184 acph->headx[i].head.type = 0; in acphInitialize()
185 acph->headx[i].head.info1 = 0; in acphInitialize()
186 acph->headx[i].head.info2 = 0; in acphInitialize()
187 acph->headx[i].head.len = 0; in acphInitialize()
188 acph->headx[i].cind = 0; in acphInitialize()
189 acph->headx[i].boundstrength = 0; in acphInitialize()
190 acph->headx[i].boundtype = 0; in acphInitialize()
193 acph->cbuf[i] = 0; in acphInitialize()
202 acph->tabphones = in acphInitialize()
204 if (acph->tabphones == NULL) { in acphInitialize()
214 if (picoktab_hasVowelProp(acph->tabphones, itmp)) { in acphInitialize()
217 if (picoktab_hasDiphthProp(acph->tabphones, itmp)) { in acphInitialize()
220 if (picoktab_hasGlottProp(acph->tabphones, itmp)) { in acphInitialize()
223 if (picoktab_hasNonsyllvowelProp(acph->tabphones, itmp)) { in acphInitialize()
226 if (picoktab_hasSyllconsProp(acph->tabphones, itmp)) { in acphInitialize()
230 if (picoktab_isPrimstress(acph->tabphones, itmp)) { in acphInitialize()
233 if (picoktab_isSecstress(acph->tabphones, itmp)) { in acphInitialize()
236 if (picoktab_isSyllbound(acph->tabphones, itmp)) { in acphInitialize()
239 if (picoktab_isPause(acph->tabphones, itmp)) { in acphInitialize()
245 picoktab_getPrimstressID(acph->tabphones))); in acphInitialize()
247 picoktab_getSecstressID(acph->tabphones))); in acphInitialize()
249 picoktab_getSyllboundID(acph->tabphones))); in acphInitialize()
251 picoktab_getPauseID(acph->tabphones))); in acphInitialize()
257 acph->dtphr = picokdt_getDtPHR(this->voice->kbArray[PICOKNOW_KBID_DT_PHR]); in acphInitialize()
258 if (acph->dtphr == NULL) { in acphInitialize()
265 acph->dtacc = picokdt_getDtACC(this->voice->kbArray[PICOKNOW_KBID_DT_ACC]); in acphInitialize()
266 if (acph->dtacc == NULL) { in acphInitialize()
329 register acph_subobj_t *acph, in acphGetNrSylls() argument
336 for (i = 0; i < acph->headx[ind].head.len; i++) { in acphGetNrSylls()
337 ch = acph->cbuf[acph->headx[ind].cind + i]; in acphGetNrSylls()
338 if (picoktab_isSyllbound(acph->tabphones, ch)) { in acphGetNrSylls()
353 register acph_subobj_t *acph, in acphPhrItemSeqGetPosLeft() argument
361 if ((acph->headx[i].head.type == PICODATA_ITEM_WORDPHON)) { in acphPhrItemSeqGetPosLeft()
362 val = acph->headx[i].head.info1; in acphPhrItemSeqGetPosLeft()
372 register acph_subobj_t *acph) { in acphSubPhrasing() argument
391 upbound = acph->headxLen - 1; in acphSubPhrasing()
393 (acph->headx[upbound].head.type != PICODATA_ITEM_WORDPHON)) { in acphSubPhrasing()
411 if (acph->headx[i].head.type == PICODATA_ITEM_WORDPHON) { in acphSubPhrasing()
420 valbuf[1] = acph->headx[upbound].head.info1; in acphSubPhrasing()
422 valbuf[0] = acphPhrItemSeqGetPosLeft(this, acph, lastprev2, &lastprev2); in acphSubPhrasing()
427 PICODBG_TRACE(("headxLen: %d", acph->headxLen)); in acphSubPhrasing()
434 PICODBG_TRACE(("iter: %d, type: %c", i, acph->headx[i].head.type)); in acphSubPhrasing()
437 if ((acph->headx[i].head.type != PICODATA_ITEM_WORDPHON)) { in acphSubPhrasing()
441 PICODBG_TRACE(("iter: %d, curpos: %d", i, acph->headx[i].head.info1)); in acphSubPhrasing()
444 curpos = acph->headx[i].head.info1; in acphSubPhrasing()
453 valbuf[0] = acphPhrItemSeqGetPosLeft(this, acph, lastprev2, &lastprev2); in acphSubPhrasing()
464 nrsyllsfol += acphGetNrSylls(this, acph, i); in acphSubPhrasing()
473 if (!picokdt_dtPHRconstructInVec(acph->dtphr, valbuf[0], valbuf[1], in acphSubPhrasing()
483 if (okay && (!picokdt_dtPHRclassify(acph->dtphr))) { in acphSubPhrasing()
491 if (okay && (!picokdt_dtPHRdecomposeOutClass(acph->dtphr, &dtres))) { in acphSubPhrasing()
510 acph->headx[i].boundstrength = (picoos_uint8)dtres.class; in acphSubPhrasing()
516 switch (acph->headx[acph->headxLen - 1].head.info2) { in acphSubPhrasing()
518 acph->headx[i].boundtype = in acphSubPhrasing()
522 acph->headx[i].boundtype = in acphSubPhrasing()
526 acph->headx[i].boundtype = in acphSubPhrasing()
531 acph->headx[i].boundtype = in acphSubPhrasing()
541 acph->headx[i].boundtype = in acphSubPhrasing()
551 switch (acph->boundStrengthState) { in acphSubPhrasing()
553 acph->headx[0].boundstrength = in acphSubPhrasing()
557 acph->headx[0].boundstrength = in acphSubPhrasing()
566 switch (acph->headx[acph->headxLen - 1].head.info1) { in acphSubPhrasing()
569 acph->boundStrengthState = SA_BOUNDSTRENGTH_SSEP; in acphSubPhrasing()
572 acph->boundStrengthState = SA_BOUNDSTRENGTH_PPHR; in acphSubPhrasing()
581 switch (acph->headx[acph->headxLen - 1].head.info2) { in acphSubPhrasing()
583 acph->headx[0].boundtype = in acphSubPhrasing()
587 acph->headx[0].boundtype = in acphSubPhrasing()
591 acph->headx[0].boundtype = in acphSubPhrasing()
596 acph->headx[0].boundtype = in acphSubPhrasing()
604 acph->headx[0].boundtype = in acphSubPhrasing()
618 register acph_subobj_t *acph, in acphAccItemSeqGetPosLeft() argument
626 if ((acph->headx[i].head.type == PICODATA_ITEM_WORDPHON)) { in acphAccItemSeqGetPosLeft()
627 val = acph->headx[i].head.info1; in acphAccItemSeqGetPosLeft()
638 register acph_subobj_t *acph, in acphAccNrSyllParts() argument
647 if (ind >= acph->headxLen) { in acphAccNrSyllParts()
654 pend = acph->headx[ind].cind + acph->headx[ind].head.len; in acphAccNrSyllParts()
655 for (pind = acph->headx[ind].cind; pind < pend; pind++) { in acphAccNrSyllParts()
656 if (picoktab_isPrimstress(acph->tabphones, acph->cbuf[pind])) { in acphAccNrSyllParts()
658 } else if (picoktab_isSyllbound(acph->tabphones, acph->cbuf[pind])) { in acphAccNrSyllParts()
685 register acph_subobj_t *acph, in acphAccGetNrsRight() argument
695 if (!acphAccNrSyllParts(this, acph, ind, &s1, &s2)) { in acphAccGetNrsRight()
702 while ((i < acph->headxLen) && in acphAccGetNrsRight()
703 (acph->headx[i].boundstrength == PICODATA_ITEMINFO1_BOUND_PHR0)) { in acphAccGetNrsRight()
704 if (acph->headx[i].head.type == PICODATA_ITEM_WORDPHON) { in acphAccGetNrsRight()
706 *nrsyllsfol += acphGetNrSylls(this, acph, i); in acphAccGetNrsRight()
714 while ((i < acph->headxLen) && in acphAccGetNrsRight()
715 (acph->headx[i].head.info2 != PICODATA_ACC1)) { in acphAccGetNrsRight()
716 if (acph->headx[i].head.type == PICODATA_ITEM_WORDPHON) { in acphAccGetNrsRight()
718 *footsyllsfol += acphGetNrSylls(this, acph, i); in acphAccGetNrsRight()
722 if ((i < acph->headxLen) && (acph->headx[i].head.info2 == PICODATA_ACC1)) { in acphAccGetNrsRight()
723 if (!acphAccNrSyllParts(this, acph, i, &s1, &s2)) { in acphAccGetNrsRight()
733 register acph_subobj_t *acph, in acphAccGetNrsLeft() argument
741 if (!acphAccNrSyllParts(this, acph, ind, &s1, &s2)) { in acphAccGetNrsLeft()
749 (acph->headx[i].boundstrength == PICODATA_ITEMINFO1_BOUND_PHR0)) { in acphAccGetNrsLeft()
750 if (acph->headx[i].head.type == PICODATA_ITEM_WORDPHON) { in acphAccGetNrsLeft()
752 *nrsyllspre += acphGetNrSylls(this, acph, i); in acphAccGetNrsLeft()
757 if ((acph->headx[i].boundstrength != PICODATA_ITEMINFO1_BOUND_PHR0) && in acphAccGetNrsLeft()
758 (acph->headx[i].head.type == PICODATA_ITEM_WORDPHON)) { in acphAccGetNrsLeft()
760 *nrsyllspre += acphGetNrSylls(this, acph, i); in acphAccGetNrsLeft()
768 register acph_subobj_t *acph, in acphIsWordWithoutStress() argument
773 pos = acph->headx[ind].cind; in acphIsWordWithoutStress()
774 for (i = 0; i < acph->headx[ind].head.len; i++) { in acphIsWordWithoutStress()
775 if (picoktab_isPrimstress(acph->tabphones, acph->cbuf[pos + i]) || in acphIsWordWithoutStress()
776 picoktab_isSecstress(acph->tabphones, acph->cbuf[pos + i])) { in acphIsWordWithoutStress()
786 register acph_subobj_t *acph) { in acphAccentuation() argument
809 upbound = acph->headxLen - 1; in acphAccentuation()
811 (acph->headx[upbound].head.type != PICODATA_ITEM_WORDPHON)) { in acphAccentuation()
837 valbuf[1] = acph->headx[upbound].head.info1; in acphAccentuation()
839 valbuf[0] = acphAccItemSeqGetPosLeft(this, acph, lastprev2, &lastprev2); in acphAccentuation()
844 PICODBG_TRACE(("headxLen: %d", acph->headxLen)); in acphAccentuation()
852 PICODBG_TRACE(("iter: %d, type: %c", i, acph->headx[i].head.type)); in acphAccentuation()
855 if ((acph->headx[i].head.type != PICODATA_ITEM_WORDPHON)) { in acphAccentuation()
859 PICODBG_TRACE(("iter: %d, curpos: %d", i, acph->headx[i].head.info1)); in acphAccentuation()
862 curpos = acph->headx[i].head.info1; in acphAccentuation()
871 valbuf[0] = acphAccItemSeqGetPosLeft(this, acph, lastprev2, &lastprev2); in acphAccentuation()
890 if ((!acphAccGetNrsRight(this, acph, i, &nrwordsfol, &nrsyllsfol, in acphAccentuation()
892 (!acphAccGetNrsLeft(this, acph, i, &nrwordspre, &nrsyllspre))) { in acphAccentuation()
906 if (!picokdt_dtACCconstructInVec(acph->dtacc, valbuf[0], valbuf[1], in acphAccentuation()
918 if (okay && (!picokdt_dtACCclassify(acph->dtacc, &prevout))) { in acphAccentuation()
926 if (okay && (!picokdt_dtACCdecomposeOutClass(acph->dtacc, &dtres))) { in acphAccentuation()
941 if (acphIsWordWithoutStress(this, acph, i)) { in acphAccentuation()
943 acph->headx[i].head.info2 = PICODATA_ACC3; in acphAccentuation()
945 acph->headx[i].head.info2 = (picoos_uint8)dtres.class; in acphAccentuation()
948 acph->headx[i].head.info2 = (picoos_uint8)dtres.class; in acphAccentuation()
951 i, acph->headx[i].head.info2)); in acphAccentuation()
967 register acph_subobj_t *acph, in acphPutBoundItem() argument
983 rv = picodata_put_itemparts(&tmphead, NULL, 0, acph->tmpbuf, in acphPutBoundItem()
991 rv = picodata_cbPutItem(this->cbOut, acph->tmpbuf, blen, &blen); in acphPutBoundItem()
1005 (picoos_uint8 *)"acph: ", acph->tmpbuf, blen); in acphPutBoundItem()
1050 register acph_subobj_t *acph; in acphStep() local
1061 acph = (acph_subobj_t *) this->subObj; in acphStep()
1066 acph->procState, acph->headxLen, acph->cbufLen)); in acphStep()
1068 switch (acph->procState) { in acphStep()
1076 while (acph->inspaceok && acph->needsmoreitems && (PICO_OK == in acphStep()
1077 (rv = picodata_cbGetItem(this->cbIn, acph->tmpbuf, in acphStep()
1079 rvP = picodata_get_itemparts(acph->tmpbuf, in acphStep()
1080 PICODATA_MAX_ITEMSIZE, &(acph->headx[acph->headxLen].head), in acphStep()
1081 &(acph->cbuf[acph->cbufLen]), acph->cbufBufSize in acphStep()
1082 - acph->cbufLen, &clen); in acphStep()
1092 if ((acph->headx[acph->headxLen].head.type in acphStep()
1094 && (acph->headx[acph->headxLen].head.info1 in acphStep()
1096 acph->headx[acph->headxLen].head.type in acphStep()
1098 acph->headx[acph->headxLen].head.info1 in acphStep()
1100 acph->headx[acph->headxLen].head.info2 in acphStep()
1102 acph->headx[acph->headxLen].head.len = 0; in acphStep()
1106 if (acph->headx[acph->headxLen].head.type in acphStep()
1108 acph->needsmoreitems = FALSE; in acphStep()
1112 if ((acph->headxLen >= (PICOACPH_MAXNR_HEADX - 2)) in acphStep()
1113 || ((acph->cbufBufSize - acph->cbufLen) in acphStep()
1115 acph->inspaceok = FALSE; in acphStep()
1119 acph->headx[acph->headxLen].cind = acph->cbufLen; in acphStep()
1120 acph->cbufLen += clen; in acphStep()
1122 acph->headx[acph->headxLen].cind = 0; in acphStep()
1124 acph->headxLen++; in acphStep()
1127 if (!acph->needsmoreitems) { in acphStep()
1129 acph->procState = SA_STEPSTATE_PROCESS_PHR; in acphStep()
1131 } else if (!acph->inspaceok) { in acphStep()
1135 acph->headx[acph->headxLen].head.type = PICODATA_ITEM_PUNC; in acphStep()
1136 acph->headx[acph->headxLen].head.info1 = in acphStep()
1138 acph->headx[acph->headxLen].head.info2 = in acphStep()
1140 acph->headx[acph->headxLen].head.len = 0; in acphStep()
1141 acph->needsmoreitems = FALSE; /* not really needed for now */ in acphStep()
1142 acph->headxLen++; in acphStep()
1147 acph->procState = SA_STEPSTATE_PROCESS_PHR; in acphStep()
1176 if (acph->headxLen > 0) { in acphStep()
1180 if (PICO_OK != acphSubPhrasing(this, acph)) { in acphStep()
1185 acph->procState = SA_STEPSTATE_PROCESS_ACC; in acphStep()
1186 } else if (acph->headxLen == 0) { /* no items in inBuf */ in acphStep()
1188 acph->procState = SA_STEPSTATE_COLLECT; in acphStep()
1195 for (i = 0; i < acph->headxLen; i++) { in acphStep()
1196 if ((acph->headx[i].boundstrength != 0) && in acphStep()
1197 (acph->headx[i].boundstrength != in acphStep()
1201 acph->headx[i].boundstrength, in acphStep()
1202 acph->headx[i].boundtype)); in acphStep()
1205 ittype = acph->headx[i].head.type; in acphStep()
1209 if ((32 <= acph->headx[i].head.info1) && in acphStep()
1210 (acph->headx[i].head.info1 < 127) && in acphStep()
1212 PICODBG_INFO_MSG(("'%c',",acph->headx[i].head.info1)); in acphStep()
1214 PICODBG_INFO_MSG(("%3d,", acph->headx[i].head.info1)); in acphStep()
1216 if ((32 <= acph->headx[i].head.info2) && in acphStep()
1217 (acph->headx[i].head.info2 < 127)) { in acphStep()
1218 PICODBG_INFO_MSG(("'%c',",acph->headx[i].head.info2)); in acphStep()
1220 PICODBG_INFO_MSG(("%3d,", acph->headx[i].head.info2)); in acphStep()
1222 PICODBG_INFO_MSG(("%3d)", acph->headx[i].head.len)); in acphStep()
1224 for (j = 0; j < acph->headx[i].head.len; j++) { in acphStep()
1227 acph->cbuf[acph->headx[i].cind+j])); in acphStep()
1230 acph->cbuf[acph->headx[i].cind+j])); in acphStep()
1247 if (acph->headxLen > 0) { in acphStep()
1250 if (PICO_OK != acphAccentuation(this, acph)) { in acphStep()
1255 acph->procState = SA_STEPSTATE_FEED; in acphStep()
1256 } else if (acph->headxLen == 0) { /* no items in inBuf */ in acphStep()
1258 acph->procState = SA_STEPSTATE_COLLECT; in acphStep()
1271 acph->headxBottom, acph->headxLen)); in acphStep()
1273 indupbound = acph->headxBottom + acph->headxLen; in acphStep()
1276 if (acph->headxBottom == 0) { in acphStep()
1279 if (acph->headx[0].head.info1 in acphStep()
1281 if (!acphPutBoundItem(this, acph, in acphStep()
1282 acph->headx[0].boundstrength, in acphStep()
1283 acph->headx[0].boundtype, &dopuoutfull, in acphStep()
1297 for (i = acph->headxBottom; i < indupbound; i++) { in acphStep()
1299 switch (acph->headx[i].head.type) { in acphStep()
1302 if ((acph->headx[i].head.info1 == in acphStep()
1306 if (!acphPutBoundItem(this, acph, in acphStep()
1319 } else if ((acph->headx[i].head.info1 == in acphStep()
1323 if (!acphPutBoundItem(this, acph, in acphStep()
1343 if ((acph->headx[i].boundstrength == in acphStep()
1345 (acph->headx[i].boundstrength == in acphStep()
1347 if (!acphPutBoundItem(this, acph, in acphStep()
1348 acph->headx[i].boundstrength, in acphStep()
1349 acph->headx[i].boundtype, in acphStep()
1363 rv = picodata_put_itemparts(&(acph->headx[i].head), in acphStep()
1364 &(acph->cbuf[acph->headx[i].cind]), in acphStep()
1365 acph->headx[i].head.len, in acphStep()
1366 acph->tmpbuf, PICODATA_MAX_ITEMSIZE, in acphStep()
1369 rvP = picodata_cbPutItem(this->cbOut, acph->tmpbuf, in acphStep()
1377 acph->headxBottom++; in acphStep()
1378 acph->headxLen--; in acphStep()
1385 acph->headx[i].boundstrength = 0; in acphStep()
1395 acph->tmpbuf, PICODATA_MAX_ITEMSIZE); in acphStep()
1402 acph->headxBottom = 0; in acphStep()
1403 acph->headxLen = 0; in acphStep()
1404 acph->cbufLen = 0; in acphStep()
1406 acph->headx[i].boundstrength = 0; in acphStep()
1410 acph->inspaceok = TRUE; in acphStep()
1411 acph->needsmoreitems = TRUE; in acphStep()
1413 acph->procState = SA_STEPSTATE_COLLECT; in acphStep()