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