Exemplo n.º 1
0
void ReportWordFormHeader(Rpt *rpt, Discourse *dc)
{
  RptStartLine(rpt);
  RptAddConcept(rpt, N("quantity"), dc);
  RptAddConcept(rpt, N("suffix"), dc);
  RptAdd(rpt, "", RPT_JUST_LEFT);
  RptAdd(rpt, "", RPT_JUST_LEFT);
  RptAddConcept(rpt, N("suffix"), dc);
  RptAdd(rpt, "", RPT_JUST_LEFT);
  RptAdd(rpt, "", RPT_JUST_LEFT);
  RptAddConcept(rpt, N("example"), dc);
  RptAddConcept(rpt, N("example"), dc);
}
Exemplo n.º 2
0
void RptAddFeaturesAbbrev(Rpt *rpt, char *features, int force, char *except,
                          Discourse *dc)
{
    char	buf[PHRASELEN];
    GenFeaturesAbbrevString(features, 0, force, except, dc, PHRASELEN, buf);
    RptAdd(rpt, buf, RPT_JUST_LEFT);
}
Exemplo n.º 3
0
void RptAddConcept(Rpt *rpt, Obj *obj, Discourse *dc)
{
    char	buf[PHRASELEN];
    GenConceptString(obj, N("empty-article"), F_NOUN, F_NULL, DC(dc).lang,
                     F_NULL, F_NULL, F_NULL, PHRASELEN, 0, 1, dc, buf);
    RptAdd(rpt, buf, RPT_JUST_LEFT);
}
Exemplo n.º 4
0
void ReportWordFormLine1(char *index, WordFormRule *wfr)
{
  if (wfr->count <= WORDFORM_COUNT_THRESH) return;
  RptStartLine(ReportWordFormRpt);
  RptAddInt(ReportWordFormRpt, wfr->count, ReportWordFormDc);
  RptAdd(ReportWordFormRpt, wfr->suffix1, RPT_JUST_LEFT);
  RptAddFeaturesAbbrev(ReportWordFormRpt, wfr->lefeat1, 1, "",
                       ReportWordFormDc);
  RptAddFeaturesAbbrev(ReportWordFormRpt, wfr->linkfeat1, 1, "",
                       ReportWordFormDc);
  RptAdd(ReportWordFormRpt, wfr->suffix2, RPT_JUST_LEFT);
  RptAddFeaturesAbbrev(ReportWordFormRpt, wfr->lefeat2, 1, "",
                       ReportWordFormDc);
  RptAddFeaturesAbbrev(ReportWordFormRpt, wfr->linkfeat2, 1, "",
                       ReportWordFormDc);
  RptAdd(ReportWordFormRpt, wfr->example1->srcphrase, RPT_JUST_LEFT);
  RptAdd(ReportWordFormRpt, wfr->example2->srcphrase, RPT_JUST_LEFT);
}
Exemplo n.º 5
0
void RptAddList(Rpt *rpt, ObjList *objs, int justif, Discourse *dc)
{
    char		buf[PHRASELEN];
    ObjList	*p;
    for (p = objs; p; p = p->next) {
        GenConceptString(p->obj, N("empty-article"), F_NOUN, F_NULL,
                         DC(dc).lang, F_NULL, F_NULL, F_NULL, PHRASELEN, 1, 1,
                         dc, buf);
        RptAdd(rpt, buf, justif);
    }
}
Exemplo n.º 6
0
void RptAddFloat(Rpt *rpt, Float x, Discourse *dc)
{
    char	buf[PHRASELEN];
    sprintf(buf, "%g", x);
    RptAdd(rpt, buf, RPT_JUST_RIGHT);
}
Exemplo n.º 7
0
void RptAddLong(Rpt *rpt, long i, Discourse *dc)
{
    char	buf[PHRASELEN];
    sprintf(buf, "%ld", i);
    RptAdd(rpt, buf, RPT_JUST_RIGHT);
}
Exemplo n.º 8
0
void RptAddInt(Rpt *rpt, int i, Discourse *dc)
{
    char	buf[PHRASELEN];
    sprintf(buf, "%d", i);
    RptAdd(rpt, buf, RPT_JUST_RIGHT);
}
Exemplo n.º 9
0
void RptAddFeatAbbrev(Rpt *rpt, int feature, int force, Discourse *dc)
{
    char	*s;
    s = GenFeatAbbrevString(feature, force, dc);
    RptAdd(rpt, s, RPT_JUST_LEFT);
}
Exemplo n.º 10
0
void RptAddTs(Rpt *rpt, Ts *ts, Discourse *dc)
{
    char	buf[PHRASELEN];
    TsToString(ts, 0, PHRASELEN, buf);
    RptAdd(rpt, buf, RPT_JUST_LEFT);
}