Corpus reader for the FrameNet 1.7 lexicon and corpus.
Class |
|
A class that wraps a dict and allows accessing the keys of the dict as if they were attributes. Taken from here: http://stackoverflow.com/a/14620633/8879 |
Class |
|
Wraps and acts as a proxy for a value to be loaded lazily (on demand). Adapted from https://gist.github.com/sergey-miryanov/2935416 |
Class |
|
Displays an abbreviated repr of values where possible. Inherits from AttrDict, so a callable value will be lazily converted to an actual value. |
Class |
|
Displays an abbreviated repr of only the first several elements, not the whole list. |
Class |
|
Displays an abbreviated repr of only the first several elements, not the whole list. |
Class |
|
Displays an abbreviated repr of only the first several elements, not the whole list. |
Class |
|
Displays an abbreviated repr of only the first several elements, not the whole list. |
Class |
|
A list subclass which adds a '_type' attribute for special printing (similar to an AttrDict, though this is NOT an AttrDict subclass). |
Exception |
|
An exception class for framenet-related errors. |
Function | demo |
Undocumented |
Function | mimic |
Wrap the first of 'lines' with textwrap and the remaining lines at exactly the same positions as the first. |
Function | _annotation |
Given a sentence or FE annotation set, construct the width-limited string showing an ASCII visualization of the sentence's annotations, calling either _annotation_ascii_frames() or _annotation_ascii_FEs() as appropriate... |
Function | _annotation_ascii_ |
Helper for _annotation_ascii_FEs(). |
Function | _annotation_ascii_ |
ASCII string rendering of the sentence along with a single target and its FEs. Secondary and tertiary FE layers are included if present. 'sent' can be an FE annotation set or an LU sentence with a single target... |
Function | _annotation |
ASCII string rendering of the sentence along with its targets and frame names. Called for all full-text sentences, as well as the few LU sentences with multiple targets (e.g., fn.lu(6412).exemplars[82] has two want... |
Function | _pretty |
Helper function for pretty-printing an exemplar sentence for a lexical unit. |
Function | _pretty |
Helper function for pretty-printing any AttrDict object. |
Function | _pretty |
Helper function for pretty-printing a list of exemplar sentences for a lexical unit. |
Function | _pretty |
Helper function for pretty-printing a frame element. |
Function | _pretty |
Helper function for pretty-printing an FE relation. |
Function | _pretty |
Helper function for pretty-printing a frame. |
Function | _pretty |
Helper function for pretty-printing a frame relation. |
Function | _pretty |
Helper function for pretty-printing a frame relation type. |
Function | _pretty |
Helper function for pretty-printing an annotated sentence from a full-text document. |
Function | _pretty |
Helper function for pretty-printing a list of annotated sentences for a full-text document. |
Function | _pretty |
Helper function for pretty-printing a long string. |
Function | _pretty |
Helper function for pretty-printing a lexical unit. |
Function | _pretty |
Helper function for pretty-printing a sentence with its POS tags. |
Function | _pretty |
Helper function for pretty-printing a semantic type. |
Wrap the first of 'lines' with textwrap and the remaining lines at exactly the same positions as the first.
Given a sentence or FE annotation set, construct the width-limited string showing an ASCII visualization of the sentence's annotations, calling either _annotation_ascii_frames() or _annotation_ascii_FEs() as appropriate. This will be attached as a method to appropriate AttrDict instances and called in the full pretty-printing of the instance.
ASCII string rendering of the sentence along with a single target and its FEs. Secondary and tertiary FE layers are included if present. 'sent' can be an FE annotation set or an LU sentence with a single target. Line-wrapped to limit the display width.
ASCII string rendering of the sentence along with its targets and frame names. Called for all full-text sentences, as well as the few LU sentences with multiple targets (e.g., fn.lu(6412).exemplars[82] has two want.v targets). Line-wrapped to limit the display width.
Helper function for pretty-printing an exemplar sentence for a lexical unit.
:param sent: An annotation set or exemplar sentence to be printed. :param aset_level: If True, 'sent' is actually an annotation set within a sentence. :type sent: AttrDict :return: A nicely formated string representation of the exemplar sentence with its target, frame, and FE annotations. :rtype: str
Helper function for pretty-printing any AttrDict object.
:param obj: The obj to be printed. :type obj: AttrDict :return: A nicely formated string representation of the AttrDict object. :rtype: str
Helper function for pretty-printing a list of exemplar sentences for a lexical unit.
:param sent: The list of exemplar sentences to be printed. :type sent: list(AttrDict) :return: An index of the text of the exemplar sentences. :rtype: str
Helper function for pretty-printing a frame element.
:param fe: The frame element to be printed. :type fe: AttrDict :return: A nicely formated string representation of the frame element. :rtype: str
Helper function for pretty-printing an FE relation.
:param ferel: The FE relation to be printed. :type ferel: AttrDict :return: A nicely formated string representation of the FE relation. :rtype: str
Helper function for pretty-printing a frame.
:param frame: The frame to be printed. :type frame: AttrDict :return: A nicely formated string representation of the frame. :rtype: str
Helper function for pretty-printing a frame relation.
:param frel: The frame relation to be printed. :type frel: AttrDict :return: A nicely formated string representation of the frame relation. :rtype: str
Helper function for pretty-printing a frame relation type.
:param freltyp: The frame relation type to be printed. :type freltyp: AttrDict :return: A nicely formated string representation of the frame relation type. :rtype: str
Helper function for pretty-printing an annotated sentence from a full-text document.
:param sent: The sentence to be printed. :type sent: list(AttrDict) :return: The text of the sentence with annotation set indices on frame targets. :rtype: str
Helper function for pretty-printing a list of annotated sentences for a full-text document.
:param sent: The list of sentences to be printed. :type sent: list(AttrDict) :return: An index of the text of the sentences. :rtype: str
Helper function for pretty-printing a long string.
:param defstr: The string to be printed. :type defstr: str :return: A nicely formated string representation of the long string. :rtype: str
Helper function for pretty-printing a lexical unit.
:param lu: The lu to be printed. :type lu: AttrDict :return: A nicely formated string representation of the lexical unit. :rtype: str