1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199
|
*** nword.c- Sat Nov 9 11:17:04 1996
--- nword.c Sun Dec 8 21:34:33 1996
***************
*** 984,991 ****
#ifdef BUNMATU
/* ʸˤʤʤ */
if (IsBunmatu(gram, pq->nw_rowcol)) {
! /* ¾ξˤʸ */
! if (q->nw_class >= ND_OPN)
pq->nw_flags &= ~NW_BUNMATU;
else
pq->nw_flags |= NW_BUNMATU;
--- 984,993 ----
#ifdef BUNMATU
/* ʸˤʤʤ */
if (IsBunmatu(gram, pq->nw_rowcol)) {
! /* ʤɤξȡɤߤԤƤˤ
! ʸ */
! if (q->nw_class >= ND_OPN ||
! (doflush && yy + pq->nw_ylen == cx->store->nyomi))
pq->nw_flags &= ~NW_BUNMATU;
else
pq->nw_flags |= NW_BUNMATU;
***************
*** 1382,1387 ****
--- 1384,1392 ----
int l2;
};
+ #define FUJIEDA_HACK
+ /* ƣޡʣɣӣԤΥϥåͭˤ */
+
static
void
evalSplit(suc, ul)
***************
*** 1396,1406 ****
--- 1401,1420 ----
u2 = 0L;
for (p = suc; p; p = p->nw_next)
{
+ #ifdef BUNMATU
+ if (!CanSplitWord(p) || OnlyBunmatu(p) || (p->nw_flags & NW_SUC))
+ #else
if (!CanSplitWord(p) || (p->nw_flags & NW_SUC))
+ #endif
continue;
if ((unsigned long)l2 < (unsigned long)p->nw_ylen)
l2 = p->nw_ylen;
+ #ifdef FUJIEDA_HACK
+ /* ɤߤʸñͥ٤Ϲθʤ */
+ if (u2 < p->nw_prio && p->nw_ylen > 1)
+ #else
if (u2 < p->nw_prio)
+ #endif
u2 = p->nw_prio;
};
ul->l2 = l2;
***************
*** 1419,1426 ****
--- 1433,1445 ----
int maxclen;
int flush;
{
+ #ifdef FUJIEDA_HACK
+ int L, L1 = 0, L2;
+ unsigned long U1, U2;
+ #else
unsigned L, L1 = 0, L2;
unsigned U2;
+ #endif
struct nword *w;
int i;
int maxary = PARMSIZE - 1;
***************
*** 1448,1474 ****
}
if (L1 == 0) {
L = (L1 = 1)+ (L2 = 0);
U2 = (unsigned)0;
if (maxary > maxclen)
maxary = maxclen;
for (i = 0; i <= maxary; i++)
ul2[i].l2 = ul2[i].u2 = 0L;
for (w = top; w; w = w->nw_next) {
! int l, l1;
struct splitParm ul;
! /* ichido ni 2tu tukomono ha yameru */
if (!CanSplitWord(w)) {
continue;
}
if ((w->nw_flags & NW_PRE) && (w->nw_flags & NW_SUC)) {
continue;
}
! /* mijikasugiru/bunsetumatu ni narenai monoha hazusu */
l1 = w->nw_ylen;
if (l1 <= 0) {
continue;
}
! /* shuujoushi ha bun no tochuu deha tukanai */
if (flush && (unsigned)yy + w->nw_ylen == cx->store->nyomi) {
L1 = l1;
break;
--- 1467,1497 ----
}
if (L1 == 0) {
L = (L1 = 1)+ (L2 = 0);
+ #ifdef FUJIEDA_HACK
+ U2 = U1 = 0L;
+ #else
U2 = (unsigned)0;
+ #endif
if (maxary > maxclen)
maxary = maxclen;
for (i = 0; i <= maxary; i++)
ul2[i].l2 = ul2[i].u2 = 0L;
for (w = top; w; w = w->nw_next) {
! int l, l1;
struct splitParm ul;
! /* ʸˤʤʤ */
if (!CanSplitWord(w)) {
continue;
}
if ((w->nw_flags & NW_PRE) && (w->nw_flags & NW_SUC)) {
continue;
}
! /* ɤߤƤʤ */
l1 = w->nw_ylen;
if (l1 <= 0) {
continue;
}
! /* ʸˤΤĹ */
if (flush && (unsigned)yy + w->nw_ylen == cx->store->nyomi) {
L1 = l1;
break;
***************
*** 1480,1486 ****
continue;
}
#endif
! /* migi donari no bunsetsu wo kaiseki */
if (l1 <= maxary) {
if (!ul2[l1].l2)
evalSplit(xq[l1].tree, &ul2[l1]);
--- 1503,1509 ----
continue;
}
#endif
! /* ٤ʸ */
if (l1 <= maxary) {
if (!ul2[l1].l2)
evalSplit(xq[l1].tree, &ul2[l1]);
***************
*** 1491,1496 ****
--- 1514,1534 ----
}
/* hikaku */
l = l1 + ul.l2;
+ #ifdef FUJIEDA_HACK
+ if ((L < l) || /* ʸĹ */
+ ((L == l) &&
+ (U1 < w->nw_prio || /* ʸܤͥ */
+ (U1 == w->nw_prio &&
+ (U2 < ul.u2 || /* ʸܤͥ */
+ (U2 == ul.u2 &&
+ (L2 < ul.l2))))))) { /* ʸܤĹ */
+ L = l;
+ U1 = w->nw_prio;
+ L1 = l1;
+ L2 = ul.l2;
+ U2 = ul.u2;
+ }
+ #else
if ((((int)L < l)) ||
(((int)L == l) && (U2 < ul.u2)) ||
(((int)L == l) && (U2 == ul.u2) && ((int)L2 < ul.l2))
***************
*** 1500,1505 ****
--- 1538,1544 ----
L2 = ul.l2;
U2 = ul.u2;
}
+ #endif
}
}
#ifdef USE_MALLOC_FOR_BIG_ARRAY
***************
*** 2000,2007 ****
--- 2039,2048 ----
candidates[i] = wp;
wp += 2 * ((*wp >> 1) & 0x7f) + 2;
};
+ /*
if (thisCache->nc_count)
continue;
+ */
if (qm && qm->dm_qbits) {
int bits;
|