Skip to content

Glazing v0.1.0

Choose a tag to compare

@aaronstevenwhite aaronstevenwhite released this 23 Sep 14:36

We're excited to announce the first release of Glazing, a package containing unified data models and interfaces for syntactic and semantic frame ontologies.

Glazing provides a modern Python interface for working with four major linguistic resources: FrameNet, PropBank, VerbNet, and WordNet.

✨ Highlights

  • 🚀 One-command setup: Get started immediately with glazing init to download and prepare all datasets
  • 📦 Type-safe models: Comprehensive Pydantic v2 models for all data structures
  • 🔍 Unified search: Query across all datasets with a consistent API
  • 🔗 Cross-references: Automatic mapping between resources
  • 💾 Efficient storage: JSON Lines format with streaming support
  • 🐍 Modern Python: Full type hints and Python 3.13+ support

📚 Supported Datasets

  • FrameNet 1.7: Semantic frames, frame elements, lexical units, and frame relations
  • PropBank 3.4: Framesets, rolesets, and semantic role labels
  • VerbNet 3.4: Verb classes, thematic roles, syntactic frames, and GL semantics
  • WordNet 3.1: Synsets, lemmas, lexical relations, and morphological processing

🚀 Quick Start

# Install the package
pip install glazing

# Initialize all datasets (one-time setup)
glazing init

# Start using the Python API
python -c "
from glazing.search import UnifiedSearch
search = UnifiedSearch()
results = search.search('give')
for r in results[:5]:
    print(f'{r.dataset}: {r.name}')
"

🛠️ Installation

pip install glazing

Requirements:

  • Python 3.13 or higher
  • ~5MB for the package
  • ~54MB for raw downloaded datasets
  • ~130MB total disk space after conversion (includes both raw and converted data)

📖 Features

Command-Line Interface

  • glazing init - Initialize all datasets with a single command
  • glazing download - Download individual or all datasets
  • glazing convert - Convert from source formats to JSON Lines
  • glazing search - Search across datasets with various filters

Python API

from glazing.framenet.loader import FrameNetLoader
from glazing.verbnet.loader import VerbNetLoader

# Loaders automatically load data after 'glazing init'
fn_loader = FrameNetLoader()
frames = fn_loader.frames

vn_loader = VerbNetLoader()  
verb_classes = list(vn_loader.classes.values())

Cross-Reference Resolution

from glazing.references.extractor import ReferenceExtractor
from glazing.verbnet.loader import VerbNetLoader
from glazing.propbank.loader import PropBankLoader

# Extract references
extractor = ReferenceExtractor()
extractor.extract_verbnet_references(list(vn_loader.classes.values()))
extractor.extract_propbank_references(list(pb_loader.framesets.values()))

# Access cross-references
if "give.01" in extractor.propbank_refs:
    refs = extractor.propbank_refs["give.01"]
    vn_classes = refs.get_verbnet_classes()

📝 Documentation

📊 Technical Details

  • Performance: Streaming support for lazy loading datasets
  • Format: JSON Lines for efficient storage and processing
  • Validation: Automatic validation using Pydantic models
  • Caching: Efficient caching for repeated operations
  • Type Safety: Full type hints for better IDE support

🤝 Contributing

We welcome contributions! Please see our Contributing Guidelines.

📜 Citation

If you use Glazing in your research, please cite:

@software{glazing2025,
  author = {White, Aaron Steven},
  title = {Glazing: Unified Data Models and Interfaces for Syntactic and Semantic Frame Ontologies},
  year = {2025},
  url = {https://github.com/aaronstevenwhite/glazing},
  version = {0.1.0}
}

🙏 Acknowledgments

This project was funded by the National Science Foundation (BCS-2040831) and builds upon the foundational work of the FrameNet, PropBank, VerbNet, and WordNet teams.

📮 Contact


Thank you for using Glazing! We're excited to see what you build with it. 🎉