Talk:Apertium and Constraint Grammar
Revision as of 14:11, 14 April 2008 by Francis Tyers (talk | contribs) (New page: * Window = whole of what we're looking at; several sentences at the same time. * SingleWindow = one sentence (for want of a better term). Usually there's 3 SingleWindow in a Window, but t...)
- Window = whole of what we're looking at; several sentences at the same time.
- SingleWindow = one sentence (for want of a better term). Usually there's 3 SingleWindow in a Window, but that's runtime defined. Can be anywhere from 1 to hundreds set with --num-windows
- Cohort = one
Some notes:
cCohort = 0; cWindow = 0; lCohort = 0; lWindow = 0; while ((inchar == u_fgetc(input))) { if(inchar == '^') { // check if the current limit of Cohorts to SingleWindow has been reached on this SingleWindow if( // check if there is an existing SingleWindow if(!cSWindow) { initialiseSingleWindow(); } // check for current Cohort // read Cohort readCohort(input, cCohort); // Up number of cohorts. } if(inchar == '[') { while(inchar != ']') { inchar = u_fgetc(input); if(cCohort) { ux_append(cCohort->text, inchar); } else if(cWindow) { ux_append(cWindow->text, inchar); } } } } readCohort(UFILE *input, Cohort *cCohort) { while((inchar == u_fgetc(input))) { if(inchar == '$') { return; } } } processReading(UFILE *input, Reading *cReading) { }