#NEWLINE# def frames_by_lemma( self , pat ) : #NEWLINE# #INDENT# '\n        Returns a list of all frames that contain LUs in which the\n        ``name`` attribute of the LU matchs the given regular expression\n        ``pat``. Note that LU names are composed of "lemma.POS", where\n        the "lemma" part can be made up of either a single lexeme\n        (e.g. \'run\') or multiple lexemes (e.g. \'a little\').\n\n        Note: if you are going to be doing a lot of this type of\n        searching, you\'d want to build an index that maps from lemmas to\n        frames because each time frames_by_lemma() is called, it has to\n        search through ALL of the frame XML files in the db.\n\n        >>> from nltk.corpus import framenet as fn\n        >>> fn.frames_by_lemma(r\'(?i)a little\')\n        [<frame ID=189 name=Quantity>, <frame ID=2001 name=Degree>]\n\n        :return: A list of frame objects.\n        :rtype: list(AttrDict)\n        ' #NEWLINE# return PrettyList ( ( f for f in self . frames ( ) if any ( ( re . search ( self , luName ) for luName in f . lexUnit ) ) ) )