'Obtain details for a specific frame.
>>> from nltk.corpus import framenet as fn
>>> len(fn.frames()) in (1019, 1221)    # FN 1.5 and 1.7, resp.
True
>>> x = PrettyList(fn.frames(r\'(?i)crim\'), maxReprSize=0, breakLines=True)
>>> x.sort(key=lambda f: f.ID)
>>> x
[<frame ID=200 name=Criminal_process>,
<frame ID=500 name=Criminal_investigation>,
<frame ID=692 name=Crime_scenario>,
<frame ID=700 name=Committing_crime>]
A brief intro to Frames (excerpted from "FrameNet II: Extended
Theory and Practice" by Ruppenhofer et. al., 2010):
A Frame is a script-like conceptual structure that describes a
particular type of situation, object, or event along with the
participants and props that are needed for that Frame. For
example, the "Apply_heat" frame describes a common situation
involving a Cook, some Food, and a Heating_Instrument, and is
evoked by words such as bake, blanch, boil, broil, brown,
simmer, steam, etc.
We call the roles of a Frame "frame elements" (FEs) and the
frame-evoking words are called "lexical units" (LUs).
FrameNet includes relations between Frames. Several types of
relations are defined, of which the most important are:
- Inheritance: An IS-A relation. The child frame is a subtype
of the parent frame, and each FE in the parent is bound to
a corresponding FE in the child. An example is the
"Revenge" frame which inherits from the
"Rewards_and_punishments" frame.
- Using: The child frame presupposes the parent frame as
background, e.g the "Speed" frame "uses" (or presupposes)
the "Motion" frame; however, not all parent FEs need to be
bound to child FEs.
- Subframe: The child frame is a subevent of a complex event
represented by the parent, e.g. the "Criminal_process" frame
has subframes of "Arrest", "Arraignment", "Trial", and
"Sentencing".
- Perspective_on: The child frame provides a particular
perspective on an un-perspectivized parent frame. A pair of
examples consists of the "Hiring" and "Get_a_job" frames,
which perspectivize the "Employment_start" frame from the
Employer\'s and the Employee\'s point of view, respectively.
:param name: A regular expression pattern used to match against
Frame names. If \'name\' is None, then a list of all
Framenet Frames will be returned.
:type name: str
:return: A list of matching Frames (or all Frames).
:rtype: list(AttrDict)'

def frames(self, name=None):

    try:
        fIDs = list(self._frame_idx.keys())
    except AttributeError:
        self._buildframeindex()
        fIDs = list(self._frame_idx.keys())
    if (name is not None):
        return PrettyList((self.frame(fID) for (fID, finfo) in self.frame_ids_and_names(name).items()))
    else:
        return PrettyLazyMap(self.frame, fIDs)
