ObjToLexEntry *ObjToLexEntryTransGet2(Obj *obj, Obj *value, char *feat, int paruniv, int *theta_filled, Discourse *dc) { int save_style; ObjToLexEntry *ole; ole = ObjToLexEntryGet1(obj, value, feat, F_NULL, paruniv, theta_filled, dc); if (ole == NULL && DC(dc).style != F_NULL) { save_style = DC(dc).style; DC(dc).style = F_NULL; ole = ObjToLexEntryGet1(obj, value, feat, F_NULL, paruniv, theta_filled, dc); DC(dc).style = save_style; } return(ole); }
LexEntry *ObjToLexEntryGet(Obj *obj, int pos, int paruniv, Discourse *dc) { ObjToLexEntry *ole; char features[2]; features[0] = pos; features[1] = TERM; if ((ole = ObjToLexEntryGet1(obj, NULL, features, F_NULL, paruniv, NULL, dc))) { return(ole->le); } return(NULL); }
LexEntry *ObjToAbbrev(Obj *obj, int force, Discourse *dc) { int pos; ObjToLexEntry *ole; if (!obj) return(NULL); for (ole = obj->ole; ole; ole = ole->next) { if (F_NULL != FeatureGet(ole->features, FT_PARUNIV)) continue; if (DC(dc).lang != FeatureGet(ole->le->features, FT_LANG)) continue; pos = FeatureGet(ole->le->features, FT_POS); if (pos != F_NOUN && pos != F_ADJECTIVE) continue; if (F_LITERARY == FeatureGet(ole->features, FT_STYLE) && !MorphIsWord(ole->le->srcphrase)) { return(ole->le); } } if (force) { if ((ole = ObjToLexEntryGet1(obj, NULL, "NA", F_NULL, F_NULL, NULL, dc))) { return(ole->le); } } return(NULL); }