v0.2.0
This minor release adds symbol parsing, fuzzy search, and syntax-based search capabilities to Glazing.
✨ What's New
Symbol Parsing
Parse linguistic identifiers from all four datasets to extract structured information:
>>> from glazing.propbank.symbol_parser import parse_roleset_id
>>> result = parse_roleset_id("give.01")
>>> result.lemma
'give'
>>> result.sense_number
1Fuzzy String Matching
Find approximate matches using Levenshtein distance:
>>> from glazing.search import UnifiedSearch
>>> searcher = UnifiedSearch()
>>> results = searcher.search_with_fuzzy("comunication", fuzzy_threshold=0.8)
>>> # Returns results including "Communication" framesSyntax-Based Search
Search across datasets using syntactic patterns:
>>> from glazing.search import UnifiedSearch
>>> searcher = UnifiedSearch()
>>> results = searcher.search_by_syntax(
... pattern="NP V NP PP[to]", # Ditransitive pattern
... allow_wildcards=True
... )
>>> # Returns 52 matching patternsEnhanced Cross-References
New MappingIndex class provides transitive reference resolution with caching:
- Discover indirect mappings between datasets
- File-based caching for performance
- Configurable hop limits for transitive searches
🔧 CLI Enhancements
New Commands
glazing search query --fuzzy- Enable fuzzy matching for typo correctionglazing search fuzzy- Search with fuzzy matching and typo correctionglazing search syntax- Search for syntactic patterns with morphological featuresglazing search args- Search for arguments with specific propertiesglazing search role- Search for semantic roles across datasetsglazing search roles- Search for semantic roles with specific propertiesglazing search elements- Search for frame elements with specific propertiesglazing search relations- Search for synsets with specific relationsglazing xref resolve- Resolve cross-references for an entityglazing xref extract- Extract cross-references from all datasetsglazing xref clear-cache- Clear cached cross-references
Improvements
- Progress indicators for long-running operations
- Better error messages and help text
🐳 Docker Support
New Dockerfile for containerized deployment:
# Use official Python 3.13 slim image as base
FROM python:3.13-slim
# Set working directory
WORKDIR /app
# Set environment variables
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
PIP_NO_CACHE_DIR=1 \
PIP_DISABLE_PIP_VERSION_CHECK=1
# Install system dependencies required for building packages
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc \
g++ \
&& rm -rf /var/lib/apt/lists/*
# Copy only requirements first to leverage Docker cache
COPY pyproject.toml README.md ./
COPY src/glazing/__version__.py src/glazing/
# Install package dependencies
RUN pip install --upgrade pip && \
pip install -e .
# Copy the rest of the application code
COPY src/ src/
COPY tests/ tests/
# Create data directory for datasets
RUN mkdir -p /data
# Set environment variable for data directory
ENV GLAZING_DATA_DIR=/data
# Initialize datasets during build
RUN glazing init --data-dir /data
# Expose data directory as volume
VOLUME ["/data"]
# Set the entrypoint to the glazing CLI
ENTRYPOINT ["glazing"]
# Default command shows help
CMD ["--help"]📚 New Documentation
- User Guides:
- Fuzzy search guide (
docs/user-guide/fuzzy-search.md) - Syntax search guide (
docs/user-guide/syntax-search.md)
- Fuzzy search guide (
- API Documentation:
- Symbol parsers for all datasets (4 files)
- Fuzzy matching utilities
- Syntax pattern models
- Data Formats: JSON schemas added to
data-formats.md
📦 Technical Changes
New Modules
glazing.syntax- Syntactic pattern models and parserglazing.utils.fuzzy_match- String similarity functionsglazing.utils.ranking- Result ranking utilitiesglazing.references.index- Mapping index implementationglazing.symbols- Symbol type definitionsglazing.{dataset}.symbol_parser- Parse dataset identifiers (4 modules)
Dependencies
- Added
python-Levenshtein>=0.20.0for fuzzy matching
📦 Updating
pip install --upgrade glazing==0.2.0Requirements:
- Python 3.13 or higher
- New dependency:
python-Levenshtein>=0.20.0
🔧 Compatibility
- Fully backwards compatible with v0.1.x
- No breaking changes
- All existing APIs continue to work
📜 Citation
If you use this version of 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.2.0},
doi = {10.5281/zenodo.17185626}
}🙏 Acknowledgments
This project is funded by the National Science Foundation (BCS-2040831).
📮 Contact
- Author: Aaron Steven White (aaron.white@rochester.edu)
- Repository: https://github.com/aaronstevenwhite/glazing
- Documentation: https://glazing.readthedocs.io
- PyPI: https://pypi.org/project/glazing/
Full Changelog: v0.1.1...v0.2.0