Elamur Research⌕
☰
home / papers / 2017 / The NLTK FrameNet API: Designing for Discoverability with a Rich Linguistic Resource

The NLTK FrameNet API: Designing for Discoverability with a Rich Linguistic Resource

Paper · 2017 · Nathan Schneider and Chuck Wooters

Summary

FrameNet is a large English lexicon built on frame semantics. Researchers use it widely, but its custom XML format is hard to work with, and the website's HTML views hide some details, such as the mappings between frame elements across related frames. The few existing open-source readers are outdated and not widely used. The authors present a Python API for FrameNet 1.7 that ships with NLTK. It covers nearly all of the release: frames, lexical units (LUs), frame elements (FEs), frame-to-frame relations, semantic types, lexicographic exemplars and full-text annotated documents.

The design rests on three goals:

  • Simplicity: a small set of main methods, with everything else reached through object attributes.
  • Discoverability: readable printed views of objects that also show how to reach their parts.
  • On-demand loading: XML files are read lazily and then cached.

The result is a demonstration system rather than a measured experiment. It matters because it lowers the barrier to FrameNet-based work such as semantic role labeling. It also makes obscure parts of the resource visible to newcomers.

Key points

  • FrameNet holds more than 1,000 frames, about 10,000 lexical senses and about 100,000 annotated lexical tokens. The unzipped 1.7 release is 855 MB, spread over thousands of XML files.
  • The data is installed via nltk.download('framenet_v17') in NLTK 3.2.2 or newer, on Python 2.7 or 3.x. The module is imported as from nltk.corpus import framenet as fn.
  • Lexicon methods:
    • frames(), lus() and fes() search entry names by regular expression, optionally restricted to one frame.
    • frame() and lu() fetch a single entry by name or ID, raising FramenetError if it is missing.
    • LU names carry a part-of-speech suffix and may be multiword, e.g. give up.v.
  • Database objects:
    • Objects are AttrDict mappings whose keys can be read as attributes.
    • frame_relations() and fe_relations() expose the network of frames, including FE-level correspondences.
    • propagate_semtypes() spreads FE semantic types along FE relations. It is optional because it takes several seconds.
    • annotations(), exemplars(), ft_sents() and docs() give access to the corpus.
  • Limitations: valence patterns are not yet supported. Future work includes adapting the API to other-language FrameNets and the cross-lingual mappings of the Multilingual FrameNet project.

Interesting ideas

  • I1. Each printed object view labels its sections with the exact attribute names needed to reach them, so browsing the output teaches the API without separate documentation.
  • I2. Thousands of resource files are read only when first touched and then kept in memory, so start-up stays cheap while repeated lookups stay fast.
  • I3. Frame-to-frame relations carry explicit links between corresponding roles of the two frames, not just a link between the frames themselves.
  • I4. Selectional-restriction types written on a few roles are spread to related roles by rule-based propagation, offered as an explicit optional step because it is slow.

For Mova

How these ideas could serve Mova, our small open language model — its files, stages and tests:

  • I1 (world): Explanation dumps of entities, states and frames could print the accessor path next to each field, so a developer can jump from a printed trace straight to the code-level object.
  • I2 (world): The compiled knowledge layer (verb classes, WordNet/FrameNet ontology, Wikidata graph) could load slices lazily per lexeme or frame, keeping small test runs fast.
  • I3 (frames): When a specific frame like Revenge is found, its roles could be mapped deterministically onto the parent frame's roles, letting general-purpose reasoning reuse them with a traceable justification.
  • I4 (frames): Role-filler constraints (e.g. Avenger must be Sentient) could be inherited along role mappings and used to reject implausible role assignments, with the propagation step logged for explainability.
  • Lexicon keys bundle the lemma with a part-of-speech suffix and allow multiword lemmas such as give up.v, which makes regex search over the lexicon both simple and precise. — (tokens): Lemma identifiers could follow the same lemma-plus-POS convention, including phrasal verbs, so the tagger output joins cleanly with FrameNet and VerbNet entries.

Our summary of the paper, in our own words — not its text. The work belongs to its authors; read it at the links above.

 Institutions

Cite

Cite as Nathan Schneider and Chuck Wooters. 2017. The NLTK FrameNet API: Designing for Discoverability with a Rich Linguistic Resource. Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing: System Demonstrations.

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.18653/v1/d17-2001 · arXiv 1703.07438

@inproceedings{schneider2017nltk,
  title = {{The NLTK FrameNet API: Designing for Discoverability with a Rich Linguistic Resource}},
  author = {Nathan Schneider and Chuck Wooters},
  booktitle = {Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing: System Demonstrations},
  year = {2017},
  doi = {10.18653/v1/d17-2001},
  eprint = {1703.07438},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.18653/v1/d17-2001}
}

References

2 references, 0 of them with a card of ours. ↗ leads to the work, «find» searches for one we have no id for yet.

  1. Hiroaki Sato. 2003. FrameSQL: A software tool for FrameNet. In Proc. of ASIALEX 2003, pages 251– 258, Tokyo, Japan. find
  2. Collin Baker, Michael Ellsworth, and Katrin Erk. 2007. SemEval-2007 Task 19: frame semantic structure github.com/icsi-berkeley/multilingual_FN find

Updated

↑ back to top

This page in Markdown → https://md.research.elamur.ai/free/en/papers/schneider-2017-nltk-framenet-api-designing-discoverability/