1234567891011121314 |
- from pattern.fr import parse, split
- lexemes = parse(u"Le petit chat attend que l'esclave humain daigne lui apporter son repas..")
- print lexemes
- '''
- for sentence in split( lexemes ):
- print sentence
- '''
- for lexeme in lexemes:
- for chunk in lexeme.chunks:
- print chunk.type, [(w.string, w.type) for w in chunk.words]
|