def __init__(self, lexicon={}, frequency={}, model=None, morphology=None, context=None, entities=None, default=("<STR_LIT>", "<STR_LIT>", "<STR_LIT>"), language=None):
self.lexicon    = lexicon or {}<EOL>self.frequency  = frequency or {}<EOL>self.model      = model<EOL>self.morphology = morphology<EOL>self.context    = context<EOL>self.entities   = entities<EOL>self.default    = default<EOL>self.language   = language<EOL>f = lambda s: isinstance(s, basestring) or hasattr(s, "<STR_LIT>")<EOL>if f(lexicon):<EOL><INDENT>self.lexicon = Lexicon(path=lexicon)<EOL><DEDENT>if f(frequency):<EOL><INDENT>self.frequency= Frequency(path=frequency)<EOL><DEDENT>if f(morphology):<EOL><INDENT>self.morphology = Morphology(path=morphology, known=self.lexicon)<EOL><DEDENT>if f(context):<EOL><INDENT>self.context = Context(path=context)<EOL><DEDENT>if f(entities):<EOL><INDENT>self.entities = Entities(path=entities, tag=default[<NUM_LIT:1>])<EOL><DEDENT>if f(model):<EOL><INDENT>try: <EOL><INDENT>self.model = Model(path=model)<EOL><DEDENT>except ImportError: <EOL><INDENT>pass<EOL><DEDENT><DEDENT>
A simple shallow parser using a Brill-based part-of-speech tagger.
            The given lexicon is a dictionary of known words and their part-of-speech tag.
            The given default tags are used for unknown words.
            Unknown words that start with a capital letter are tagged NNP (except for German).
            Unknown words that contain only digits and punctuation are tagged CD.
            Optionally, morphological and contextual rules (or a language model) can be used 
            to improve the tags of unknown words.
            The given language can be used to discern between
            Germanic and Romance languages for phrase chunking.