Back in 2005, I was playing around with the idea of creating rules for conjugating verbs in various languages. This is my attempt to create an online version of that book, 501 French Verbs. The difference is that mine covers 631 verbs and also does complete conjugations, including:
The coding of this application is fairly straightforward. I first created a list of verbs to be conjugated. I then established the general conjugation rules for the verbs. In French, verbs are either regular or irregular. Regular verbs usually come in one of three forms ending in -er, -ir, or -re. The vast majority of French verbs are regular, therefore by establishing the conjugation rules for these regular verbs, the amount of information required to express their conjugations is minimal. The script generates all of the conjugated forms based on the rules. Irregular verbs do not follow the same pattern as regular verbs even though their spelling would normally indicate a regular form. Irregulars include some of the most important and oft-used verbs, so they cannot simply be ignored. To address these irregular verbs a list of exceptions was created and checked against before applying the rules for regular verbs.
The beauty of this script is that the majority of the information displayed is generated using a limited set of rules, therefore, the overhead of the application is very low. For every few bytes required to add a verb and indicate its conjugation form there are many kilobytes of information returned to the user. The entire program that generates all of the conjugations comes in at 61KB, which is about 1/10th the space required to store the information in its entirety.
I started a similar script for German that I’d love to find the time to finish. I also started a version in Japanese that relies heavily on Unicode. I enjoyed writing these and really do need to go back and finish them… someday.
The original script can be found here: http://www.myresumestuff.com/scripting/fr.html.