python inflector for French language : control gender, tense and number
Project description
inflecteur
inflecteur is a python inflector for french language based on the DELA dictionary
Installation :
$ pip install inflecteur
Control tense :
In [1]: inflecteur.inflect_sentence("Elle boit un café et mange un croissant.", tense='Futur')
'Elle boira un café et mangera un croissant .'
In [2]: d.inflect_sentence("Elle boit un café et mange un croissant.", tense='Passé simple')
'Elle but un café et mangea un croissant .'
Control gender :
In [3]: d.inflect_sentence("Elle boit un café et mange un croissant.", gender='m')
'Il boit un café et mange un croissant .'
Control number :
In [4]: d.inflect_sentence("Elle boit un café et mange un croissant.", number='p')
'Elles boivent des cafés et mangent des croissants .'
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
inflecteur-0.1.tar.gz
(5.3 kB
view hashes)