|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectrita.RiObject
rita.RiConjugator
public class RiConjugator
Handles verb conjugation based on tense, person, number for simple, passive, progressive, and perfect forms. An example:
RiConjugator rc = new RiConjugator(this);
rc.setNumber("plural");
rc.setPerson("2nd");
rc.setTense("past");
rc.setPassive(true);
rc.setPerfect(true);
rc.setProgressive(false);
String c = rc.conjugate("announce");
Minnen, G., Carroll, J., and Pearce, D. (2001). Applied Morphological Processing of English. Natural Language Engineering 7(3): 207--223.
| Field Summary | |
|---|---|
static boolean |
DBUG
|
| Fields inherited from interface processing.core.PConstants |
|---|
A, AB, ADD, AG, ALPHA, ALPHA_MASK, ALT, AMBIENT, AR, ARC, ARGB, ARROW, B, BACKSPACE, BASELINE, BEEN_LIT, BEVEL, BLEND, BLUE_MASK, BLUR, BOTTOM, BOX, BURN, CENTER, CENTER_DIAMETER, CENTER_RADIUS, CHATTER, CLOSE, CMYK, CODED, COMPLAINT, CONTROL, CORNER, CORNERS, CROSS, CUSTOM, DA, DARKEST, DB, DEG_TO_RAD, DELETE, DG, DIAMETER, DIFFERENCE, DILATE, DIRECTIONAL, DISABLE_ACCURATE_TEXTURES, DISABLE_DEPTH_SORT, DISABLE_DEPTH_TEST, DISABLE_OPENGL_2X_SMOOTH, DISABLE_OPENGL_ERROR_REPORT, DODGE, DOWN, DR, DXF, EB, EDGE, EG, ELLIPSE, ENABLE_ACCURATE_TEXTURES, ENABLE_DEPTH_SORT, ENABLE_DEPTH_TEST, ENABLE_NATIVE_FONTS, ENABLE_OPENGL_2X_SMOOTH, ENABLE_OPENGL_4X_SMOOTH, ENABLE_OPENGL_ERROR_REPORT, ENTER, EPSILON, ER, ERODE, ERROR_BACKGROUND_IMAGE_FORMAT, ERROR_BACKGROUND_IMAGE_SIZE, ERROR_PUSHMATRIX_OVERFLOW, ERROR_PUSHMATRIX_UNDERFLOW, ERROR_TEXTFONT_NULL_PFONT, ESC, EXCLUSION, G, GIF, GRAY, GREEN_MASK, HALF_PI, HAND, HARD_LIGHT, HINT_COUNT, HSB, IMAGE, INVERT, JAVA2D, JPEG, LEFT, LIGHTEST, LINE, LINES, LINUX, MACOSX, MAX_FLOAT, MAX_INT, MIN_FLOAT, MIN_INT, MITER, MODEL, MULTIPLY, NORMALIZED, NX, NY, NZ, OPAQUE, OPEN, OPENGL, ORTHOGRAPHIC, OTHER, OVERLAY, P2D, P3D, PATH, PDF, PERSPECTIVE, PI, platformNames, POINT, POINTS, POLYGON, POSTERIZE, PROBLEM, PROJECT, QUAD, QUAD_STRIP, QUADS, QUARTER_PI, R, RAD_TO_DEG, RADIUS, RECT, RED_MASK, REPLACE, RETURN, RGB, RIGHT, ROUND, SA, SB, SCREEN, SG, SHAPE, SHIFT, SHINE, SOFT_LIGHT, SPB, SPG, SPHERE, SPOT, SPR, SQUARE, SR, SUBTRACT, SW, TAB, TARGA, THIRD_PI, THRESHOLD, TIFF, TOP, TRIANGLE, TRIANGLE_FAN, TRIANGLE_STRIP, TRIANGLES, TWO_PI, TX, TY, TZ, U, UP, V, VERTEX_FIELD_COUNT, VW, VX, VY, VZ, WAIT, WHITESPACE, WINDOWS, X, Y, Z |
| Constructor Summary | |
|---|---|
RiConjugator()
|
|
RiConjugator(processing.core.PApplet pApplet)
|
|
| Method Summary | |
|---|---|
java.lang.String |
conjugate()
Conjugates the current head verb based on the state of the conjugator |
java.lang.String |
conjugate(int numberConstant,
int personConstant,
int tenseConstant,
java.lang.String verb)
A convenience method to set number, person, & tense, then conjugate, all in one call |
java.lang.String |
conjugate(java.lang.String verb)
Conjugates the verb based on the current state of the conjugator |
java.lang.String |
conjugate(java.lang.String number,
java.lang.String person,
java.lang.String tense,
java.lang.String verb)
A convenience method to set number, person, & tense, then conjugate, all in one call |
java.lang.String[] |
conjugateAll(java.lang.String verb)
Returns all possible conjugations of the specified verb (contains duplicates) |
void |
conjugateAll(java.lang.String verb,
java.util.Set result)
Returns all unique possible conjugations of the specified verb |
java.lang.String |
getNumber()
Returns a String representing the current number from one of (singular, plural) |
java.lang.String |
getPast(java.lang.String v)
|
java.lang.String |
getPast(java.lang.String verb,
int pers,
int numb)
|
java.lang.String |
getPastParticiple(java.lang.String v)
|
java.lang.String |
getPerson()
Returns a String representing the current person from one of (first, second, third) |
java.lang.String |
getPresent(java.lang.String baseForm,
int person,
int number)
Processes the baseform of this Verb to obtain the present
tense form for a specific Person and Number
combination. |
java.lang.String |
getPresentParticiple(java.lang.String v)
|
java.lang.String |
getTense()
Returns a String representing the current tense from one of (past, present, future) |
java.lang.String |
getVerb()
Returns the current verb |
boolean |
isPassive()
Returns whether the conjugation will use passive tense |
boolean |
isPerfect()
Returns whether the conjugation will use perfect tense |
boolean |
isProgressive()
Returns whether the conjugation will use progressive tense |
static void |
main(java.lang.String[] args)
|
void |
setNumber(int numberConstant)
Sets the number for the conjugation, from one of the constants: [SINGULAR, PLURAL] |
void |
setNumber(java.lang.String numberString)
Sets the number from one of (singular, plural) |
void |
setPassive(boolean passive)
Sets whether the conjugation should use passive tense |
void |
setPerfect(boolean perfect)
Sets whether the conjugation should use perfect tense |
void |
setPerson(int personConstant)
Sets the person for the conjugation, from one of the constants: [FIRST_PERSON, SECOND_PERSON, THIRD_PERSON] |
void |
setPerson(java.lang.String personString)
Sets the number from one of (first, second, third) |
void |
setProgressive(boolean progressive)
Sets whether the conjugation should use progressive tense |
void |
setState(int numberConstant,
int personConstant,
int tenseConstant)
A convenience method to set number, person, & tense in one call |
void |
setState(java.lang.String number,
java.lang.String person,
java.lang.String tense)
A convenience method to set number, person, & tense in one call |
void |
setTense(int tenseConstant)
Sets the tense for the conjugation, from one of the constants: [PAST_TENSE, PRESENT_TENSE, FUTURE_TENSE] |
void |
setTense(java.lang.String tenseString)
Sets the number from one of (past, present, future) |
void |
setVerb(java.lang.String verb)
Sets the verb to be conjugated |
java.lang.String |
toString()
|
| Methods inherited from class rita.RiObject |
|---|
dispose, getId, getPApplet, nextId |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final boolean DBUG
| Constructor Detail |
|---|
public RiConjugator()
public RiConjugator(processing.core.PApplet pApplet)
| Method Detail |
|---|
public java.lang.String getPresent(java.lang.String baseForm,
int person,
int number)
Verb to obtain the present
tense form for a specific Person and Number
combination. The default behaviour is to assume that all present tense
forms except for 3rd person singular are identical to the baseform. This
is only every not the case with the verb be which has different
forms for different person and number values (am, are
etc).
public java.lang.String conjugate()
setVerb(String),
setNumber(int),
setPerson(int),
setTense(int),
setPassive(boolean),
setProgressive(boolean),
setPerfect(boolean)public java.lang.String conjugate(java.lang.String verb)
setNumber(int),
setPerson(int),
setTense(int),
setPassive(boolean),
setProgressive(boolean),
setPerfect(boolean)
public java.lang.String getPast(java.lang.String verb,
int pers,
int numb)
public java.lang.String getPast(java.lang.String v)
public java.lang.String getPresentParticiple(java.lang.String v)
public java.lang.String getPastParticiple(java.lang.String v)
public void setVerb(java.lang.String verb)
public java.lang.String toString()
toString in class java.lang.Objectpublic void setNumber(int numberConstant)
public void setPerson(int personConstant)
public void setTense(int tenseConstant)
public java.lang.String getTense()
public java.lang.String getPerson()
public java.lang.String getNumber()
public void setNumber(java.lang.String numberString)
public void setPerson(java.lang.String personString)
public void setTense(java.lang.String tenseString)
public void setPassive(boolean passive)
public void setPerfect(boolean perfect)
public void setProgressive(boolean progressive)
public void setState(java.lang.String number,
java.lang.String person,
java.lang.String tense)
public void setState(int numberConstant,
int personConstant,
int tenseConstant)
public java.lang.String conjugate(java.lang.String number,
java.lang.String person,
java.lang.String tense,
java.lang.String verb)
public java.lang.String conjugate(int numberConstant,
int personConstant,
int tenseConstant,
java.lang.String verb)
public boolean isPassive()
public boolean isPerfect()
public boolean isProgressive()
public java.lang.String getVerb()
public void conjugateAll(java.lang.String verb,
java.util.Set result)
public java.lang.String[] conjugateAll(java.lang.String verb)
public static void main(java.lang.String[] args)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||