Sentences for French

This is the documentation for 4.3.0 version, which is not the latest version. Consider upgrading to 4.3.1.

Examples

will generate:

  • Le jardinier a donné des pommes à sa voisine.

  • Il les lui a données.

  • Il lui a donné des pommes.

  • Il les a données à sa voisine.

Features and Usage

The generation order between DIRECT and INDIRECT respects the declared order: if you change the order, you can generate Le jardinier a donné à sa voisine des pommes.

Use negative: true and optionnaly negativeAdverb (e.g. jamais, will default to pas) to generate a negative form, like Il ne les lui a pas données..

Agreement with direct complement when using avoir auxiliary is made automatically.

There can be 2 indirect object groups, for instance to generate Pascal parle à son frère de sa leçon / Il lui parle de sa leçon. Put multiple objects with type INDIRECT in the objGroups array.

In subjectGroup, use person to generate a personal subject pronoun (je, tu, nous, vous, etc.). Possible values are 1S (1st person, singular ⇒ je), 2S, 1P, 2P (2nd person, plural ⇒ vous) as possible values. 3S and 3P are not allowed as we would not know whether to generate il/elle or ils/elles. When using person parameter, subject property is ignored.

In the sentence, use modifierAdverb to add an adverb between the verb and the direct object, like Le directeur prête souvent sa voiture. In a negative sentence, the adverb will be added after the 'negativeAdverb', like Le directeur ne prête plus souvent sa voiture.

In objGroups, use the value parameter REPRESENTANT: 'refexpr' combined with person to generate a personal pronoun (me, te, nous, vous, etc.). Possible values are 1S (1st person, singular ⇒ je), 2S, 1P, 2P (2nd person, plural ⇒ vous) as possible values. When using 3S and 3P, you must first setup the gender of the group obj.

You can also add the usual value parameters to the subjectGroup and objGroups

To generate a specific form of pronoun, such as en, you can use the 'pronounForm' in the objGroups. Value should be a string or a mixin. Make sure to force the use of the pronoun with the value parameter REPRESENTANT: 'refexpr'

Examples

will generate:

  • Ta femme a prêté ma tondeuse à son neveu.

  • Elle la lui a prêtée.

will generate:

  • Le directeur ne prête pas souvent sa camionnette à ses élèves.

  • Il ne leur a pas souvent prêté sa camionnette.

will generate:

  • Pierre me conseille.

will generate:

  • Pierre nous en remercie.