scan(si
,ce
,command
) /*scan a phrase */
if(command
== 1)subty
= PLURAL
;
if(sent
[i
].cc
==ADJ_ADV
&& sent
[i
+1].cc
!= NOUN
&& sent
[i
+1].cc
!= UNK
&& sent
[i
+1].cc
!= ADJ
)
verb
=getv(i
,ce
); /*get verb if obvious*/
if(command
== 0)j
=getnoun(i
,ce
); /*get subject*/
if(i
!= j
|| ((i
==j
) && sent
[i
].cc
== NOUN
)){
for(;((c
=sent
[i
].cc
) != ce
) && (c
!= END
) && (c
!= '\0');i
++){
if(verb
== 1 && iverb
== i
+1){
if(nextc
== ADJ
|| nextc
== NOUN_ADJ
|| nextc
== ADJ_ADV
|| nextc
== UNK
){
if(nextc
== ',' && (sent
[i
+2].cc
== ADJ_ADV
|| sent
[i
+2].cc
== ADV
)){
if(lastc
== NOUN
&& (nextc
== ',' || nextc
== END
)){
if(nextc
!= UNK
&& nextc
!= NOUN_VERB
&& nextc
!= NOUN
&& nextc
!= NV_PL
){
if(nextc
==UNK
|| nextc
== NOUN_VERB
|| nextc
== NV_PL
){
if(lastc
== ADJ
)sent
[++i
].cc
= ADJ
;
else sent
[++i
].cc
= VERB
;
while(sent
[j
].cc
== ADV
|| sent
[j
].cc
== ADJ_ADV
){
if((verb
==1 && iverb
== j
) || sent
[j
].cc
==ED
|| sent
[j
].cc
== VERB_ADJ
){
while(i
+1 < j
)sent
[++i
].cc
= ADV
;
else if(verb
==0 && nextc
==NV_PL
&& ((lastc
==NOUN
&& (sent
[i
-1].ic
==UNK
|| sent
[i
-1].ic
==NOUN_VERB
|| sent
[i
-1].ic
==NOUN
))|| lastc
== ',')){
else if(verb
==0 && (nextc
==UNK
|| nextc
==NOUN_VERB
) && (lastc
==NOUN
&& sent
[i
-1].ic
==NV_PL
)){
if(i
== 0)sent
[i
].cc
=ADJ
;
if(nextc
!= CONJ
){ /*parenthetical*/
if(nextc
==END
||(lastc
==',' && nextc
==',')){
if(sent
[i
+2].cc
==PREP_ADV
&&(sent
[i
+1].cc
!= NOUN
&& sent
[i
+1].cc
!= NOUN_VERB
&& sent
[i
+1].cc
!= NV_PL
)){
if((pverb
==1 && iverb
== i
) || sent
[i
].cc
== ED
){
if(pverb
==1 && iverb
== i
+1){
if(sent
[i
+1].cc
!= BE
)continue;
if(sent
[i
+1].cc
== ED
|| sent
[i
+1].cc
== ING
){
else if(sent
[i
+1].cc
== UNK
){
else if(verb
== 0){ /*need verb*/
if(be
==1 && nextc
!= WHO
){
else if(nextc
==NV_PL
&&( sent
[i
+2].cc
==NOUN_VERB
|| sent
[i
+2].cc
==NOUN
||
sent
[i
+2].cc
==UNK
|| sent
[i
+2].cc
==NV_PL
)){
if(sent
[i
-1].cc
== NOUN
){
else if(sent
[i
-1].cc
== BE
){
default: printf("got a %c on %s\n",sent
[i
].cc
,sent
[i
].sp
);
if(sent
[i
].cc
==END
&& sent
[i
].ic
!= ';')return(-1);
if(sent
[i
].ic
== ';')sent
[i
].cc
=';';
for(j
=si
;((c
=sent
[j
].cc
) != ce
) && (c
!= END
); j
++){
if(sent
[j
-1].cc
== CONJ
&& verb
== 0)conj
= 0;
if((sent
[j
].cc
!=VERB
&& sent
[j
].cc
!=BE
) && sent
[iverb
].cc
==AUXX
){
for(ik
=iverb
+1;ik
<=j
;ik
++)sent
[ik
].cc
=sent
[ik
].ic
;
if(sent
[j
-1].cc
== ',' && sent
[j
+1].cc
== ','){
case ',': if(comma
==1 && sent
[j
+1].cc
==CONJ
){
while(((c
=sent
[++j
].cc
) != ce
) && (c
!= END
)){
if(bflg
== 0 || sent
[j
+1].cc
== ED
|| sent
[j
+1].cc
== ING
){
if(sent
[j
+1].cc
== ED
|| sent
[j
+1].cc
== ING
|| sent
[j
+1].cc
== ADV
||
sent
[j
+1].cc
== ADJ_ADV
)sent
[j
].cc
= ADV
;
if(bflg
==1 || vflg
==1 || hflg
==1){
if(c
==ED
||c
==ING
||c
==BE
||must
==1){
if(nextst
==UNK
|| nextst
==NOUN_VERB
|| nextst
==NOUN
|| nextst
==NV_PL
){
if(nextst
==NOUN
||(verb
==1 && (nextst
== NV_PL
|| nextst
==NOUN_VERB
) )){
if(sent
[st
].ic
==NV_PL
)subty
=PLURAL
;
if(sent
[st
-1].cc
== NOUN
&& sent
[st
-1].ic
== NOUN
){
case SUBCONJ
: sent
[st
++].cc
=PRONP
; /* more than .. */
if(verb
==0)verb
=getv(st
,ce
);
if(aflg
== 1 && nextst
!= END
&& nextst
!= ART
){
if(nextst
==NOUN
||nextst
==ADJ
||nextst
== NOUN_ADJ
||nextst
==PRONS_ADJ
||nextst
==PRONP_ADJ
){
if(nextst
!=UNK
&& nextst
!= NOUN_VERB
&& nextst
!= NV_PL
){
if(verb
==1 || sent
[st
+2].cc
==ED
){
if(nextst
== ',' && rep
==0){
if((c
==UNK
||c
==ADJ
||c
==NOUN_ADJ
||c
==ING
) && (sent
[st
+3].cc
==UNK
||sent
[st
+3].cc
==NOUN_VERB
|| sent
[st
+3].cc
==NV_PL
)){
if(sent
[st
+3].ic
==NV_PL
)subty
=PLURAL
;
if(nextst
==NOUN
||nextst
==ING
||nextst
==NOUN_ADJ
|| sent
[st
-1].cc
==ADV
if((nextst
==NV_PL
|| nextst
==NOUN_VERB
) &&(verb
==1 ||(verb
==0 && (sent
[st
+2].cc
==UNK
|| sent
[st
+2].cc
==NOUN_VERB
|| sent
[st
+2].cc
==ED
||sent
[st
+2].cc
==VERB_ADJ
)))){
if(prep
== 0)subty
=PLURAL
;
if(nextst
==CONJ
&&(sent
[st
+2].cc
==ADJ
||sent
[st
+2].cc
==ADJ_ADV
)){
for(t
=st
+1;sent
[t
].cc
== UNK
;t
++);
if(verb
==0 && prep
== 0){ /* UUU. */
if(sent
[t
].cc
==NV_PL
){ /* UUZ.*/
if(sent
[t
+1].cc
==UNK
|| sent
[t
+1].cc
==NOUN_VERB
){ /* UUZU */
if(sent
[t
].cc
==NOUN_VERB
|| sent
[t
].cc
==NOUN
|| sent
[t
].cc
==NV_PL
){
for(tt
=st
;tt
<t1
;tt
++)sent
[tt
].cc
=ADJ
;
if(sent
[st
].cc
== CONJ
&& sent
[st
-1].cc
== ADJ
){
if(sent
[st
-1].cc
==PREP
&& ( sent
[st
].cc
== THAT
|| sent
[st
].cc
== SUBCONJ
)){
if(sent
[st
].cc
!= NOUN
&& sent
[st
].cc
!= PRONP
&& sent
[st
].cc
!= PRONS
){
if(sent
[st
].cc
==ADJ
&& sent
[st
].ic
==ING
){
else if(sent
[st
].cc
== PREP
){
if(sent
[st
+1].cc
==CONJ
&& sent
[st
+2].cc
!= ED
){
while(c
==ADV
||c
==ADJ_ADV
){
if(c
==UNK
||c
==NOUN_VERB
||c
==VERB_ADJ
||c
==ED
|| c
==NV_PL
){
if(verb
== 0)verb
= getv(kk
+1,ce
);
w
: switch(sent
[++kk
].cc
){