@@ -0,0 +1,1539 @@
+import treetaggerwrapper%0D%0A%0D%0Aclass TreeTagger:%0D%0A    %22%22%22%0D%0A    This class allows you to parse a text and the grammar structure of it.%0D%0A    An example : tags = TreeTagger().tag_text(..., TreeTagger.noun + TreeTagger.verb)%22%22%22%0D%0A%0D%0A    abbreviation = %5B'ABR'%5D%0D%0A    adjective = %5B'ADJ'%5D%0D%0A    adverb = %5B'ADV'%5D%0D%0A    determinant = %5B'DET:ART', 'DET:POS'%5D%0D%0A    interjection = %5B'INT'%5D%0D%0A    conjunction = %5B'KON'%5D%0D%0A    proper_name = %5B'NAM'%5D%0D%0A    noun = %5B'NOM'%5D%0D%0A    numeral = %5B'NUM'%5D%0D%0A    pronoun = %5B'PRO', 'PRO:DEM', 'PRO:IND', 'PRO:PER', 'PRO:POS', 'PRO:REL'%5D%0D%0A    preposition = %5B'RP', 'PRP:det'%5D%0D%0A    punctuation = %5B'PUN', 'PUN:cit'%5D%0D%0A    sentence_tag = 'SENT'%0D%0A    symbol = %5B'SYM'%5D%0D%0A    verb = %5B'VER:cond', 'VER:futu', 'VER:impe', 'VER:impf', 'VER:infi', 'VER:pper', 'VER:ppre', 'VER:pres', 'VER:simp', 'VER:subi', 'VER:subp'%5D%0D%0A    not_correspondence_found = '%3Cunknown%3E'%0D%0A%0D%0A    def __init__(self):%0D%0A        self.tagger = treetaggerwrapper.TreeTagger(TAGLANG='fr', TAGDIR='../treetagger', TAGINENC='utf-8', TAGOUTENC='utf-8')%0D%0A%0D%0A    def tag_text(self, text, params=%5B%5D):%0D%0A        %22%22%22Parse a text with the tags in params. If params is empty, everything will be kept. For more information about the tags,%0D%0A        please consult the following link : http://www.ims.uni-stuttgart.de/institut/mitarbeiter/schmid/french-tagset.html.%22%22%22%0D%0A        tags = self.tagger.TagText(text)%0D%0A        out = list()%0D%0A%0D%0A        for tag in tags:%0D%0A            t = tag.split()%0D%0A            if len(params) == 0 or t%5B1%5D in params:%0D%0A                out.append(t)%0D%0A        return out%0D%0A

Create class tree_tagger to analyze the text