Home | History | Annotate | Download | only in lib

Lines Matching refs:headx

70   - headx: array for extended item heads of fixed size (head plus
74 headx). Future: replace these two buffers by a single double-sided
77 0. bottom up filling of items in headx and cbuf1
82 -> info stays in "headx, cbuf1" and changed in place \n
89 -> headx changed in place; cbuf1 to cbuf2 \n
165 of fixed size without content, two fields are contained in headx
167 -> headx further extended with boundary strength and type info to
168 indicate that to the left of the headx ele a BOUND needs to be
173 -> changed in place in headx
186 picoos_uint8 inspaceok; /* flag: headx/cbuf1 has space for an item */
192 picosa_headx_t headx[PICOSA_MAXNR_HEADX];
275 /* init headx, cbuf1, cbuf2 */
277 sa->headx[i].head.type = 0;
278 sa->headx[i].head.info1 = PICODATA_ITEMINFO1_NA;
279 sa->headx[i].head.info2 = PICODATA_ITEMINFO2_NA;
280 sa->headx[i].head.len = 0;
281 sa->headx[i].cind = 0;
499 if ((sa->headx[i].head.type == PICODATA_ITEM_WORDGRAPH) ||
500 (sa->headx[i].head.type == PICODATA_ITEM_WORDINDEX) ||
501 (sa->headx[i].head.type == PICODATA_ITEM_WORDPHON) ) {
502 val = sa->headx[i].head.info1;
533 (sa->headx[first].head.type != PICODATA_ITEM_WORDGRAPH) &&
534 (sa->headx[first].head.type != PICODATA_ITEM_WORDINDEX) &&
535 (sa->headx[first].head.type != PICODATA_ITEM_WORDPHON)) {
550 valbuf[half_nratt_posd+1] = sa->headx[first].head.info1;
558 /* process from left to right all items in headx */
562 PICODBG_TRACE(("iter: %d, type: %c", ci, sa->headx[ci].head.type));
565 if ((sa->headx[ci].head.type != PICODATA_ITEM_WORDGRAPH) &&
566 (sa->headx[ci].head.type != PICODATA_ITEM_WORDINDEX) &&
567 (sa->headx[ci].head.type != PICODATA_ITEM_WORDPHON)) {
571 PICODBG_TRACE(("iter: %d, curPOS: %d", ci, sa->headx[ci].head.info1));
589 if (sa->headx[ci].head.info1 != valbuf[half_nratt_posd]) {
593 valbuf[half_nratt_posd] = sa->headx[ci].head.info1;
613 PICODBG_DEBUG(("keeping: %d", sa->headx[ci].head.info1));
659 sa->headx[ci].head.info1 = (picoos_uint8)dtres.class;
660 if (sa->headx[ci].head.type == PICODATA_ITEM_WORDINDEX) {
662 disambiguated POS, adapt current headx cind/len
666 for (i = 0; i < sa->headx[ci].head.len; i += PICOKLEX_POSIND_SIZE) {
670 sa->cbuf1[sa->headx[ci].cind + i])) {
673 sa->headx[ci].cind += i;
685 sa->headx[ci].head.len = PICOKLEX_POSIND_SIZE;
704 /* set headx.cind, and copy content, head unchanged */
705 cind1 = sa->headx[ind].cind;
706 sa->headx[ind].cind = sa->cbuf2Len;
709 if (sa->headx[ind].head.len > (sa->cbuf2BufSize - sa->cbuf2Len)) {
710 sa->headx[ind].head.len = sa->cbuf2BufSize - sa->cbuf2Len;
714 if (sa->headx[ind].head.len == 0) {
715 sa->headx[ind].cind = 0;
719 for (i = 0; i < sa->headx[ind].head.len; i++) {
725 sa->headx[ind].head.type, sa->headx[ind].head.len));
742 if (picoklex_lexIndLookup(lex, &(sa->cbuf1[sa->headx[ind].cind + 1]),
744 sa->headx[ind].cind = sa->cbuf2Len;
753 sa->headx[ind].cind = 0;
758 sa->headx[ind].head.type = PICODATA_ITEM_WORDPHON;
759 sa->headx[ind].head.len = plen;
1003 /* item in headx[ind]/cbuf1, out: modified headx and cbuf2 */
1012 if (saDoG2P(this, sa, &(sa->cbuf1[sa->headx[ind].cind]),
1013 sa->headx[ind].head.len, sa->headx[ind].head.info1,
1025 sa->headx[ind].head.type = PICODATA_ITEM_WORDPHON;
1026 sa->headx[ind].head.len = (picoos_uint8)plen;
1027 sa->headx[ind].cind = sa->cbuf2Len;
1225 &(sa->headx[sa->headxLen].head),
1237 construct PUNC-FLUSH item in headx */
1238 if ((sa->headx[sa->headxLen].head.type ==
1240 (sa->headx[sa->headxLen].head.info1 ==
1242 sa->headx[sa->headxLen].head.type =
1244 sa->headx[sa->headxLen].head.info1 =
1246 sa->headx[sa->headxLen].head.info2 =
1248 sa->headx[sa->headxLen].head.len = 0;
1253 sa->headx[sa->headxLen].cind = sa->cbuf1Len;
1255 if ((sa->headx[sa->headxLen].head.type ==
1257 (sa->headx[sa->headxLen].head.info1 ==
1259 (sa->headx[sa->headxLen].head.info2 ==
1264 sa->headx[sa->headxLen].head.type = PICODATA_ITEM_WORDPHON;
1265 sa->headx
1266 sa->headx[sa->headxLen].head.info2 = PICODATA_ITEMINFO2_NA;
1269 while ((i < sa->headx[sa->headxLen].head.len) && (wordsep != sa->cbuf1[sa->headx[sa->headxLen].cind+i])) {
1270 PICODBG_INFO(("accepting phoneme %i",sa->cbuf1[sa->headx[sa->headxLen].cind+i]));
1274 if (i < sa->headx[sa->headxLen].head.len) {
1276 sa->headx[sa->headxLen].head.len = i;
1281 if (sa->headx[sa->headxLen].head.type ==
1294 sa->headx[sa->headxLen].cind = sa->cbuf1Len;
1297 sa->headx[sa->headxLen].cind = 0;
1310 sa->headx[sa->headxLen].head.type = PICODATA_ITEM_PUNC;
1311 sa->headx[sa->headxLen].head.info1 =
1313 sa->headx[sa->headxLen].head.info2 =
1315 sa->headx[sa->headxLen].head.len = 0;
1344 /* process posd state: process items in headx/cbuf1
1350 /* we have a phrase in headx, cbuf1 (can be
1369 ittype = sa->headx[i].head.type;
1373 if ((32 <= sa->headx[i].head.info1) &&
1374 (sa->headx[i].head.info1 < 127) &&
1377 PICODBG_INFO_MSG(("'%c',",sa->headx[i].head.info1));
1379 PICODBG_INFO_MSG(("%3d,", sa->headx[i].head.info1));
1381 if ((32 <= sa->headx[i].head.info2) &&
1382 (sa->headx[i].head.info2 < 127)) {
1383 PICODBG_INFO_MSG(("'%c',",sa->headx[i].head.info2));
1385 PICODBG_INFO_MSG(("%3d,", sa->headx[i].head.info2));
1387 PICODBG_INFO_MSG(("%3d)", sa->headx[i].head.len));
1389 for (j = 0; j < sa->headx[i].head.len; j++) {
1393 sa->cbuf1[sa->headx[i].cind+j]));
1396 sa->cbuf1[sa->headx[i].cind+j]));
1408 /* process wpho state: process items in headx/cbuf1 and modify
1409 * headx in place and fill cbuf2
1414 /* we have a phrase in headx, cbuf1 (can be single
1429 switch (sa->headx[i].head.type) {
1441 if (0 == sa->headx[i].head.info2) {
1444 lex = sa->ulex[sa->headx[i].head.info2-1];
1455 /* copy item unmodified, ie. headx untouched,
1482 ittype = sa->headx[i].head.type;
1486 if ((32 <= sa->headx[i].head.info1) &&
1487 (sa->headx[i].head.info1 < 127) &&
1489 PICODBG_INFO_MSG(("'%c',",sa->headx[i].head.info1));
1491 PICODBG_INFO_MSG(("%3d,", sa->headx[i].head.info1));
1493 if ((32 <= sa->headx[i].head.info2) &&
1494 (sa->headx[i].head.info2 < 127)) {
1495 PICODBG_INFO_MSG(("'%c',",sa->headx[i].head.info2));
1497 PICODBG_INFO_MSG(("%3d,", sa->headx[i].head.info2));
1499 PICODBG_INFO_MSG(("%3d)", sa->headx[i].head.len));
1501 for (j = 0; j < sa->headx[i].head.len; j++) {
1504 sa->cbuf2[sa->headx[i].cind+j]));
1507 sa->cbuf2[sa->headx[i].cind+j]));
1527 /* reset headx, cbuf2 */
1541 &(sa->headx[sa->headxBottom].head),
1542 &(sa->cbuf2[sa->headx[sa->headxBottom].cind]),
1543 sa->headx[sa->headxBottom].head.len, sa->tmpbuf,
1546 if (PICODATA_ITEM_WORDPHON == sa->headx[sa->headxBottom].head.type) {
1548 rv = saExtractPhonemes(this, sa, 0, &(sa->headx[sa->headxBottom].head),
1549 &(sa->cbuf2[sa->headx[sa->headxBottom].cind]));