ie-schema 0.1.5

A flexible schema specification and parser for information extraction tasks.
Documentation
# Python API Reference

This project exposes a Python extension module named `ie_schema` built with PyO3.
Auto-generated API pages are available from `autoapi/ie_schema/index`.

## `IESchema`

- `IESchema.loads(input: str | type | object) -> IESchema`: parse from a JSON string (native IE ingest JSON **or** a root JSON Schema object), a stdlib dataclass / Pydantic v2 `BaseModel` type, or an instance of one of those types. IE JSON must not contain unknown top-level keys (so JSON Schema is not misread as an empty ingest).
- `IESchema.load(path: str) -> IESchema`: parse schema JSON from a file path.
- `IESchema.prompt() -> str`: render the internal prompt-plan debug string.
- Iteration over `IESchema` yields task instances.

## Task classes

- `Task`: base task class.
- `ClassificationTask`
  - `task: str`
  - `labels: list[str]`
  - `threshold: float | None`
  - `multi_label: bool`
- `EntityExtractionTask`
  - `entities: list[str]`
- `RelationExtractionTask`
  - `name: str`
  - `head: str`
  - `tail: str`
  - `description: str | None`
- `JSONStructureTask`
  - `name: str`
  - `children: list[StructureChild]`
- `StructureChild`
  - `property: str`
  - `choices: list[str]`
  - `description: str | None`

## Notes

- AutoAPI is generated from documented Python API stubs in `docs/python_api/ie_schema.pyi`, which mirror the PyO3-exported public surface.
- Loading dataclasses or Pydantic models requires `pydantic` at runtime (Pydantic builds JSON Schema, which is then converted the same way as a JSON Schema string).