Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #! /usr/bin/env python
- # -*- coding: utf-8 -*-
- def pluriel(mot):
- ail='bail corail émail soupirail travail vantail vitrail'.split()
- ou='hibou chou genou caillou pou bijou'.split()
- eu='pneu bleu'.split()
- al='aval bal carnaval chacal corral final festival récital regal'.split()
- au='landau sarrau'.split()
- if mot in ail or mot in [x.upper() for x in ail]: return mot.lower()[:-2]+'ux'
- if mot in ou or mot in [x.upper() for x in ou]: return mot.lower() +'x'
- if mot in eu or mot in [x.upper() for x in eu]: return mot.lower()+'s'
- if mot in au or mot in [x.upper() for x in au]: return mot.lower()+'s'
- if mot in al or mot in [x.upper() for x in al]: return mot.lower()+'s'
- if mot[-1] in 'sSxXzZ': return mot
- if mot[-2:] == 'al' or mot[-2:] == 'AL': return mot.lower()[:-1]+'ux'
- if mot[-2:] == 'au' or mot[-2:] == 'AU': return mot.lower()+'x'
- if mot[-2:] == 'eu' or mot[-2:] == 'EU': return mot.lower()+'x'
- if mot is 'oeil' or mot is 'OEIL': return 'yeux'
- if mot is 'ail' or mot is 'AIL': return 'aulx'
- else: return mot.lower()+'s'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement