commited all contents created by participants
This commit is contained in:
+21
@@ -0,0 +1,21 @@
|
||||
from pattern.fr import parsetree, parse, split
|
||||
|
||||
texte = parse(u"Le petit chat attend que l'esclave humain daigne lui apporter son repas.")
|
||||
|
||||
#print texte
|
||||
|
||||
|
||||
for phrase in split( texte ):
|
||||
# print sentence.__dict__.keys()
|
||||
print phrase.words
|
||||
|
||||
|
||||
print "---"
|
||||
# print split( texte ).words[0].__dict__.keys()
|
||||
print split( texte ).words[0].type
|
||||
|
||||
'''
|
||||
for lexeme in lexemes:
|
||||
for chunk in lexeme.chunks:
|
||||
print chunk.type, [(w.string, w.type) for w in chunk.words]
|
||||
'''
|
||||
Reference in New Issue
Block a user