From d07d94dd01497fe3578893beec8c660d89c5b6db Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Wed, 4 Feb 2026 03:55:57 +0000
Subject: [PATCH 01/11] codegen metadata
---
.stats.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.stats.yml b/.stats.yml
index d0ad896..84c00e9 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 5
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/isaacus%2Fisaacus-fa910a5a3d1321234423bd8c042d202a64d4d956ef45847b4de358cb18e447eb.yml
openapi_spec_hash: 926b9b619c15e8570e496e11d4fb753e
-config_hash: e26cc2858d2a56a077aee5473a5746df
+config_hash: ed02aaf8b97a6f9e13463c741be2a12f
From 1f9c5116054a44d62013e5c82ba9d85d38b28f33 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Wed, 4 Feb 2026 03:59:48 +0000
Subject: [PATCH 02/11] feat(sdk): move ilgs structs around
---
.stats.yml | 2 +-
api.md | 34 ++++-----
src/isaacus/types/__init__.py | 14 ----
src/isaacus/types/enrichment_response.py | 4 +-
src/isaacus/types/ilgs/__init__.py | 18 +++++
.../ilgs_v1_crossreference.py} | 10 +--
.../types/{date.py => ilgs/ilgs_v1_date.py} | 10 +--
.../{document.py => ilgs/ilgs_v1_document.py} | 70 +++++++++----------
.../types/{email.py => ilgs/ilgs_v1_email.py} | 10 +--
.../ilgs_v1_external_document.py} | 14 ++--
.../ilgs_v1_id_number.py} | 10 +--
.../{location.py => ilgs/ilgs_v1_location.py} | 12 ++--
.../{person.py => ilgs/ilgs_v1_person.py} | 12 ++--
.../ilgs_v1_phone_number.py} | 10 +--
.../types/{quote.py => ilgs/ilgs_v1_quote.py} | 10 +--
.../{segment.py => ilgs/ilgs_v1_segment.py} | 16 ++---
.../types/{span.py => ilgs/ilgs_v1_span.py} | 6 +-
.../types/{term.py => ilgs/ilgs_v1_term.py} | 14 ++--
.../{website.py => ilgs/ilgs_v1_website.py} | 10 +--
19 files changed, 146 insertions(+), 140 deletions(-)
create mode 100644 src/isaacus/types/ilgs/__init__.py
rename src/isaacus/types/{crossreference.py => ilgs/ilgs_v1_crossreference.py} (90%)
rename src/isaacus/types/{date.py => ilgs/ilgs_v1_date.py} (94%)
rename src/isaacus/types/{document.py => ilgs/ilgs_v1_document.py} (79%)
rename src/isaacus/types/{email.py => ilgs/ilgs_v1_email.py} (79%)
rename src/isaacus/types/{external_document.py => ilgs/ilgs_v1_external_document.py} (94%)
rename src/isaacus/types/{id_number.py => ilgs/ilgs_v1_id_number.py} (79%)
rename src/isaacus/types/{location.py => ilgs/ilgs_v1_location.py} (89%)
rename src/isaacus/types/{person.py => ilgs/ilgs_v1_person.py} (98%)
rename src/isaacus/types/{phone_number.py => ilgs/ilgs_v1_phone_number.py} (81%)
rename src/isaacus/types/{quote.py => ilgs/ilgs_v1_quote.py} (91%)
rename src/isaacus/types/{segment.py => ilgs/ilgs_v1_segment.py} (96%)
rename src/isaacus/types/{span.py => ilgs/ilgs_v1_span.py} (92%)
rename src/isaacus/types/{term.py => ilgs/ilgs_v1_term.py} (91%)
rename src/isaacus/types/{website.py => ilgs/ilgs_v1_website.py} (81%)
diff --git a/.stats.yml b/.stats.yml
index 84c00e9..e3c6a72 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 5
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/isaacus%2Fisaacus-fa910a5a3d1321234423bd8c042d202a64d4d956ef45847b4de358cb18e447eb.yml
openapi_spec_hash: 926b9b619c15e8570e496e11d4fb753e
-config_hash: ed02aaf8b97a6f9e13463c741be2a12f
+config_hash: 8608b9490f9a482b18bd8f733d2c82f6
diff --git a/api.md b/api.md
index efdbf07..8b462e5 100644
--- a/api.md
+++ b/api.md
@@ -62,25 +62,27 @@ Methods:
- client.enrichments.create(\*\*params) -> EnrichmentResponse
-# ILGSv1
+# ILGS
+
+## v1
Types:
```python
-from isaacus.types import (
- Crossreference,
- Date,
- Document,
- Email,
- ExternalDocument,
- IDNumber,
- Location,
- Person,
- PhoneNumber,
- Quote,
- Segment,
- Span,
- Term,
- Website,
+from isaacus.types.ilgs import (
+ ILGSv1Crossreference,
+ ILGSv1Date,
+ ILGSv1Document,
+ ILGSv1Email,
+ ILGSv1ExternalDocument,
+ ILGSv1IDNumber,
+ ILGSv1Location,
+ ILGSv1Person,
+ ILGSv1PhoneNumber,
+ ILGSv1Quote,
+ ILGSv1Segment,
+ ILGSv1Span,
+ ILGSv1Term,
+ ILGSv1Website,
)
```
diff --git a/src/isaacus/types/__init__.py b/src/isaacus/types/__init__.py
index 22f2d74..f1751e9 100644
--- a/src/isaacus/types/__init__.py
+++ b/src/isaacus/types/__init__.py
@@ -2,20 +2,6 @@
from __future__ import annotations
-from .date import Date as Date
-from .span import Span as Span
-from .term import Term as Term
-from .email import Email as Email
-from .quote import Quote as Quote
-from .person import Person as Person
-from .segment import Segment as Segment
-from .website import Website as Website
-from .document import Document as Document
-from .location import Location as Location
-from .id_number import IDNumber as IDNumber
-from .phone_number import PhoneNumber as PhoneNumber
-from .crossreference import Crossreference as Crossreference
-from .external_document import ExternalDocument as ExternalDocument
from .embedding_response import EmbeddingResponse as EmbeddingResponse
from .reranking_response import RerankingResponse as RerankingResponse
from .enrichment_response import EnrichmentResponse as EnrichmentResponse
diff --git a/src/isaacus/types/enrichment_response.py b/src/isaacus/types/enrichment_response.py
index 9e1c420..adcd7e9 100644
--- a/src/isaacus/types/enrichment_response.py
+++ b/src/isaacus/types/enrichment_response.py
@@ -3,7 +3,7 @@
from typing import List
from .._models import BaseModel
-from .document import Document
+from .ilgs.ilgs_v1_document import ILGSv1Document
__all__ = ["EnrichmentResponse", "Result", "Usage"]
@@ -17,7 +17,7 @@ class Result(BaseModel):
therefore, ending at the number of inputs minus `1`).
"""
- document: Document
+ document: ILGSv1Document
"""The enriched document."""
diff --git a/src/isaacus/types/ilgs/__init__.py b/src/isaacus/types/ilgs/__init__.py
new file mode 100644
index 0000000..dd6ceac
--- /dev/null
+++ b/src/isaacus/types/ilgs/__init__.py
@@ -0,0 +1,18 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from .ilgs_v1_date import ILGSv1Date as ILGSv1Date
+from .ilgs_v1_span import ILGSv1Span as ILGSv1Span
+from .ilgs_v1_term import ILGSv1Term as ILGSv1Term
+from .ilgs_v1_email import ILGSv1Email as ILGSv1Email
+from .ilgs_v1_quote import ILGSv1Quote as ILGSv1Quote
+from .ilgs_v1_person import ILGSv1Person as ILGSv1Person
+from .ilgs_v1_segment import ILGSv1Segment as ILGSv1Segment
+from .ilgs_v1_website import ILGSv1Website as ILGSv1Website
+from .ilgs_v1_document import ILGSv1Document as ILGSv1Document
+from .ilgs_v1_location import ILGSv1Location as ILGSv1Location
+from .ilgs_v1_id_number import ILGSv1IDNumber as ILGSv1IDNumber
+from .ilgs_v1_phone_number import ILGSv1PhoneNumber as ILGSv1PhoneNumber
+from .ilgs_v1_crossreference import ILGSv1Crossreference as ILGSv1Crossreference
+from .ilgs_v1_external_document import ILGSv1ExternalDocument as ILGSv1ExternalDocument
diff --git a/src/isaacus/types/crossreference.py b/src/isaacus/types/ilgs/ilgs_v1_crossreference.py
similarity index 90%
rename from src/isaacus/types/crossreference.py
rename to src/isaacus/types/ilgs/ilgs_v1_crossreference.py
index 604ba13..ca57eb4 100644
--- a/src/isaacus/types/crossreference.py
+++ b/src/isaacus/types/ilgs/ilgs_v1_crossreference.py
@@ -1,12 +1,12 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from .span import Span
-from .._models import BaseModel
+from ..._models import BaseModel
+from .ilgs_v1_span import ILGSv1Span
-__all__ = ["Crossreference"]
+__all__ = ["ILGSv1Crossreference"]
-class Crossreference(BaseModel):
+class ILGSv1Crossreference(BaseModel):
"""A cross-reference within the document pointing to one or more segments."""
start: str
@@ -25,7 +25,7 @@ class Crossreference(BaseModel):
will be identical.
"""
- span: Span
+ span: ILGSv1Span
"""A zero-based, half-open span into the Unicode code point space of input text.
All spans are globally laminar and well-nested similar to XML—it is impossible
diff --git a/src/isaacus/types/date.py b/src/isaacus/types/ilgs/ilgs_v1_date.py
similarity index 94%
rename from src/isaacus/types/date.py
rename to src/isaacus/types/ilgs/ilgs_v1_date.py
index 5266faf..8b5e6f6 100644
--- a/src/isaacus/types/date.py
+++ b/src/isaacus/types/ilgs/ilgs_v1_date.py
@@ -3,13 +3,13 @@
from typing import List, Optional
from typing_extensions import Literal
-from .span import Span
-from .._models import BaseModel
+from ..._models import BaseModel
+from .ilgs_v1_span import ILGSv1Span
-__all__ = ["Date"]
+__all__ = ["ILGSv1Date"]
-class Date(BaseModel):
+class ILGSv1Date(BaseModel):
"""
A date identified in a document belonging to one of the following types: `creation`, `signature`, `effective`, `expiry`, `delivery`, `renewal`, `payment`, `birth`, or `death`.
@@ -63,7 +63,7 @@ class Date(BaseModel):
`{index}` is a non-negative incrementing integer starting from zero.
"""
- mentions: List[Span]
+ mentions: List[ILGSv1Span]
"""
An array of one or more spans within the document's text where the date is
mentioned.
diff --git a/src/isaacus/types/document.py b/src/isaacus/types/ilgs/ilgs_v1_document.py
similarity index 79%
rename from src/isaacus/types/document.py
rename to src/isaacus/types/ilgs/ilgs_v1_document.py
index 1ad35fa..c521ddc 100644
--- a/src/isaacus/types/document.py
+++ b/src/isaacus/types/ilgs/ilgs_v1_document.py
@@ -3,28 +3,28 @@
from typing import List, Optional
from typing_extensions import Literal
-from .date import Date
-from .span import Span
-from .term import Term
-from .email import Email
-from .quote import Quote
-from .person import Person
-from .segment import Segment
-from .website import Website
-from .._models import BaseModel
-from .location import Location
-from .id_number import IDNumber
-from .phone_number import PhoneNumber
-from .crossreference import Crossreference
-from .external_document import ExternalDocument
-
-__all__ = ["Document"]
-
-
-class Document(BaseModel):
+from ..._models import BaseModel
+from .ilgs_v1_date import ILGSv1Date
+from .ilgs_v1_span import ILGSv1Span
+from .ilgs_v1_term import ILGSv1Term
+from .ilgs_v1_email import ILGSv1Email
+from .ilgs_v1_quote import ILGSv1Quote
+from .ilgs_v1_person import ILGSv1Person
+from .ilgs_v1_segment import ILGSv1Segment
+from .ilgs_v1_website import ILGSv1Website
+from .ilgs_v1_location import ILGSv1Location
+from .ilgs_v1_id_number import ILGSv1IDNumber
+from .ilgs_v1_phone_number import ILGSv1PhoneNumber
+from .ilgs_v1_crossreference import ILGSv1Crossreference
+from .ilgs_v1_external_document import ILGSv1ExternalDocument
+
+__all__ = ["ILGSv1Document"]
+
+
+class ILGSv1Document(BaseModel):
"""The enriched document."""
- title: Optional[Span] = None
+ title: Optional[ILGSv1Span] = None
"""A zero-based, half-open span into the Unicode code point space of input text.
All spans are globally laminar and well-nested similar to XML—it is impossible
@@ -40,7 +40,7 @@ class Document(BaseModel):
code units instead of Unicode code points).
"""
- subtitle: Optional[Span] = None
+ subtitle: Optional[ILGSv1Span] = None
"""A zero-based, half-open span into the Unicode code point space of input text.
All spans are globally laminar and well-nested similar to XML—it is impossible
@@ -88,25 +88,25 @@ class Document(BaseModel):
code for federal law.
"""
- segments: List[Segment]
+ segments: List[ILGSv1Segment]
"""
An array of segments within the document representing structurally distinct
portions of its content.
"""
- crossreferences: List[Crossreference]
+ crossreferences: List[ILGSv1Crossreference]
"""
An array of cross-references within the document pointing to a single segment or
a span of segments.
"""
- locations: List[Location]
+ locations: List[ILGSv1Location]
"""An array of locations identified in the document."""
- persons: List[Person]
+ persons: List[ILGSv1Person]
"""An array of legal persons identified in the document."""
- emails: List[Email]
+ emails: List[ILGSv1Email]
"""
An array of email addresses identified in the document belonging to legal
persons.
@@ -115,14 +115,14 @@ class Document(BaseModel):
persons will not be extracted.
"""
- websites: List[Website]
+ websites: List[ILGSv1Website]
"""An array of websites identified in the document belonging to legal persons.
Websites mentioned in the document that are not attributable to legal persons
will not be extracted.
"""
- phone_numbers: List[PhoneNumber]
+ phone_numbers: List[ILGSv1PhoneNumber]
"""
An array of valid phone numbers identified in the document belonging to legal
persons.
@@ -131,7 +131,7 @@ class Document(BaseModel):
attributable to legal persons will not be extracted.
"""
- id_numbers: List[IDNumber]
+ id_numbers: List[ILGSv1IDNumber]
"""
An array of identification numbers identified in the document belonging to legal
persons.
@@ -140,16 +140,16 @@ class Document(BaseModel):
legal persons will not be extracted.
"""
- terms: List[Term]
+ terms: List[ILGSv1Term]
"""An array of terms assigned definite meanings within the document."""
- external_documents: List[ExternalDocument]
+ external_documents: List[ILGSv1ExternalDocument]
"""An array of documents identified within the document."""
- quotes: List[Quote]
+ quotes: List[ILGSv1Quote]
"""An array of quotations within the document."""
- dates: List[Date]
+ dates: List[ILGSv1Date]
"""
An array of dates identified in the document belonging to one of the following
types: `creation`, `signature`, `effective`, `expiry`, `delivery`, `renewal`,
@@ -159,10 +159,10 @@ class Document(BaseModel):
one of the supported date types are extractable.
"""
- headings: List[Span]
+ headings: List[ILGSv1Span]
"""An array of spans within the document's text constituting headings."""
- junk: List[Span]
+ junk: List[ILGSv1Span]
"""
An array of spans within the document's text constituting non-operative,
non-substantive 'junk' content such as headers, footers, page numbers, and OCR
diff --git a/src/isaacus/types/email.py b/src/isaacus/types/ilgs/ilgs_v1_email.py
similarity index 79%
rename from src/isaacus/types/email.py
rename to src/isaacus/types/ilgs/ilgs_v1_email.py
index 88a4582..0ad6c67 100644
--- a/src/isaacus/types/email.py
+++ b/src/isaacus/types/ilgs/ilgs_v1_email.py
@@ -2,13 +2,13 @@
from typing import List
-from .span import Span
-from .._models import BaseModel
+from ..._models import BaseModel
+from .ilgs_v1_span import ILGSv1Span
-__all__ = ["Email"]
+__all__ = ["ILGSv1Email"]
-class Email(BaseModel):
+class ILGSv1Email(BaseModel):
"""An email address identified in a document belonging to a legal person.
If an email address was mentioned in the document but is not attributable to a legal person, it will not be extracted.
@@ -20,7 +20,7 @@ class Email(BaseModel):
person: str
"""The unique identifier of the person that this email address belongs to."""
- mentions: List[Span]
+ mentions: List[ILGSv1Span]
"""
An array of one or more spans within the document's text where the email address
is mentioned.
diff --git a/src/isaacus/types/external_document.py b/src/isaacus/types/ilgs/ilgs_v1_external_document.py
similarity index 94%
rename from src/isaacus/types/external_document.py
rename to src/isaacus/types/ilgs/ilgs_v1_external_document.py
index 3e8582d..5668637 100644
--- a/src/isaacus/types/external_document.py
+++ b/src/isaacus/types/ilgs/ilgs_v1_external_document.py
@@ -3,13 +3,13 @@
from typing import List, Optional
from typing_extensions import Literal
-from .span import Span
-from .._models import BaseModel
+from ..._models import BaseModel
+from .ilgs_v1_span import ILGSv1Span
-__all__ = ["ExternalDocument"]
+__all__ = ["ILGSv1ExternalDocument"]
-class ExternalDocument(BaseModel):
+class ILGSv1ExternalDocument(BaseModel):
"""A document identified within another document."""
id: str
@@ -18,7 +18,7 @@ class ExternalDocument(BaseModel):
`{index}` is a non-negative incrementing integer starting from zero.
"""
- name: Span
+ name: ILGSv1Span
"""A zero-based, half-open span into the Unicode code point space of input text.
All spans are globally laminar and well-nested similar to XML—it is impossible
@@ -86,14 +86,14 @@ class ExternalDocument(BaseModel):
expressing any particular sentiment towards it.
"""
- mentions: List[Span]
+ mentions: List[ILGSv1Span]
"""
An array of one or more spans within the document's text where the external
document is mentioned by name, for example, 'the US Constitution' in 'the Second
Amendment to the US Constitution protects freedom of speech'.
"""
- pinpoints: List[Span]
+ pinpoints: List[ILGSv1Span]
"""
An array of spans within the document's text where specific parts of the
external document are referenced, for example, 'Section 2' in 'as defined in
diff --git a/src/isaacus/types/id_number.py b/src/isaacus/types/ilgs/ilgs_v1_id_number.py
similarity index 79%
rename from src/isaacus/types/id_number.py
rename to src/isaacus/types/ilgs/ilgs_v1_id_number.py
index 7e3f9c7..cfcda0a 100644
--- a/src/isaacus/types/id_number.py
+++ b/src/isaacus/types/ilgs/ilgs_v1_id_number.py
@@ -2,13 +2,13 @@
from typing import List
-from .span import Span
-from .._models import BaseModel
+from ..._models import BaseModel
+from .ilgs_v1_span import ILGSv1Span
-__all__ = ["IDNumber"]
+__all__ = ["ILGSv1IDNumber"]
-class IDNumber(BaseModel):
+class ILGSv1IDNumber(BaseModel):
"""An identification number mentioned in a document belonging to a legal person.
If an identification number was mentioned in the document but is not attributable to a legal person, it will not be extracted.
@@ -20,7 +20,7 @@ class IDNumber(BaseModel):
person: str
"""The unique identifier of the person that this identification number belongs to."""
- mentions: List[Span]
+ mentions: List[ILGSv1Span]
"""
An array of one or more spans within the document's text where the
identification number is mentioned.
diff --git a/src/isaacus/types/location.py b/src/isaacus/types/ilgs/ilgs_v1_location.py
similarity index 89%
rename from src/isaacus/types/location.py
rename to src/isaacus/types/ilgs/ilgs_v1_location.py
index 27b68eb..5444d02 100644
--- a/src/isaacus/types/location.py
+++ b/src/isaacus/types/ilgs/ilgs_v1_location.py
@@ -3,13 +3,13 @@
from typing import List, Optional
from typing_extensions import Literal
-from .span import Span
-from .._models import BaseModel
+from ..._models import BaseModel
+from .ilgs_v1_span import ILGSv1Span
-__all__ = ["Location"]
+__all__ = ["ILGSv1Location"]
-class Location(BaseModel):
+class ILGSv1Location(BaseModel):
"""A location identified within a document."""
id: str
@@ -18,7 +18,7 @@ class Location(BaseModel):
`{index}` is a non-negative incrementing integer starting from zero.
"""
- name: Span
+ name: ILGSv1Span
"""A zero-based, half-open span into the Unicode code point space of input text.
All spans are globally laminar and well-nested similar to XML—it is impossible
@@ -46,7 +46,7 @@ class Location(BaseModel):
is a non-negative incrementing integer starting from zero.
"""
- mentions: List[Span]
+ mentions: List[ILGSv1Span]
"""
An array of one or more spans within the document's text where the location is
mentioned.
diff --git a/src/isaacus/types/person.py b/src/isaacus/types/ilgs/ilgs_v1_person.py
similarity index 98%
rename from src/isaacus/types/person.py
rename to src/isaacus/types/ilgs/ilgs_v1_person.py
index 1189595..0935502 100644
--- a/src/isaacus/types/person.py
+++ b/src/isaacus/types/ilgs/ilgs_v1_person.py
@@ -3,13 +3,13 @@
from typing import List, Optional
from typing_extensions import Literal
-from .span import Span
-from .._models import BaseModel
+from ..._models import BaseModel
+from .ilgs_v1_span import ILGSv1Span
-__all__ = ["Person"]
+__all__ = ["ILGSv1Person"]
-class Person(BaseModel):
+class ILGSv1Person(BaseModel):
"""A legal person identified in a document."""
id: str
@@ -18,7 +18,7 @@ class Person(BaseModel):
is a non-negative incrementing integer starting from zero.
"""
- name: Span
+ name: ILGSv1Span
"""A zero-based, half-open span into the Unicode code point space of input text.
All spans are globally laminar and well-nested similar to XML—it is impossible
@@ -188,7 +188,7 @@ class Person(BaseModel):
is a non-negative incrementing integer starting from zero.
"""
- mentions: List[Span]
+ mentions: List[ILGSv1Span]
"""
An array of one or more spans within the document's text where the person is
mentioned.
diff --git a/src/isaacus/types/phone_number.py b/src/isaacus/types/ilgs/ilgs_v1_phone_number.py
similarity index 81%
rename from src/isaacus/types/phone_number.py
rename to src/isaacus/types/ilgs/ilgs_v1_phone_number.py
index 30dd506..bb94d00 100644
--- a/src/isaacus/types/phone_number.py
+++ b/src/isaacus/types/ilgs/ilgs_v1_phone_number.py
@@ -2,13 +2,13 @@
from typing import List
-from .span import Span
-from .._models import BaseModel
+from ..._models import BaseModel
+from .ilgs_v1_span import ILGSv1Span
-__all__ = ["PhoneNumber"]
+__all__ = ["ILGSv1PhoneNumber"]
-class PhoneNumber(BaseModel):
+class ILGSv1PhoneNumber(BaseModel):
"""A valid phone number identified in a document belonging to a legal person.
If a phone number was mentioned in the document but is not valid, possible, or attributable to a legal person, it will not be extracted.
@@ -23,7 +23,7 @@ class PhoneNumber(BaseModel):
person: str
"""The unique identifier of the person that this phone number belongs to."""
- mentions: List[Span]
+ mentions: List[ILGSv1Span]
"""
An array of one or more spans within the document's text where the phone number
is mentioned.
diff --git a/src/isaacus/types/quote.py b/src/isaacus/types/ilgs/ilgs_v1_quote.py
similarity index 91%
rename from src/isaacus/types/quote.py
rename to src/isaacus/types/ilgs/ilgs_v1_quote.py
index 735721d..bcb3b45 100644
--- a/src/isaacus/types/quote.py
+++ b/src/isaacus/types/ilgs/ilgs_v1_quote.py
@@ -2,13 +2,13 @@
from typing import Optional
-from .span import Span
-from .._models import BaseModel
+from ..._models import BaseModel
+from .ilgs_v1_span import ILGSv1Span
-__all__ = ["Quote"]
+__all__ = ["ILGSv1Quote"]
-class Quote(BaseModel):
+class ILGSv1Quote(BaseModel):
"""A quotation within a document."""
source_segment: Optional[str] = None
@@ -35,7 +35,7 @@ class Quote(BaseModel):
documents.
"""
- span: Span
+ span: ILGSv1Span
"""A zero-based, half-open span into the Unicode code point space of input text.
All spans are globally laminar and well-nested similar to XML—it is impossible
diff --git a/src/isaacus/types/segment.py b/src/isaacus/types/ilgs/ilgs_v1_segment.py
similarity index 96%
rename from src/isaacus/types/segment.py
rename to src/isaacus/types/ilgs/ilgs_v1_segment.py
index 2f13d9d..27e447c 100644
--- a/src/isaacus/types/segment.py
+++ b/src/isaacus/types/ilgs/ilgs_v1_segment.py
@@ -3,13 +3,13 @@
from typing import Optional
from typing_extensions import Literal
-from .span import Span
-from .._models import BaseModel
+from ..._models import BaseModel
+from .ilgs_v1_span import ILGSv1Span
-__all__ = ["Segment"]
+__all__ = ["ILGSv1Segment"]
-class Segment(BaseModel):
+class ILGSv1Segment(BaseModel):
"""
A segment within the document representing a structurally distinct portion of the document's content.
"""
@@ -134,7 +134,7 @@ class Segment(BaseModel):
`other` denotes content that does not fit into any of the other categories.
"""
- type_name: Optional[Span] = None
+ type_name: Optional[ILGSv1Span] = None
"""A zero-based, half-open span into the Unicode code point space of input text.
All spans are globally laminar and well-nested similar to XML—it is impossible
@@ -150,7 +150,7 @@ class Segment(BaseModel):
code units instead of Unicode code points).
"""
- code: Optional[Span] = None
+ code: Optional[ILGSv1Span] = None
"""A zero-based, half-open span into the Unicode code point space of input text.
All spans are globally laminar and well-nested similar to XML—it is impossible
@@ -166,7 +166,7 @@ class Segment(BaseModel):
code units instead of Unicode code points).
"""
- title: Optional[Span] = None
+ title: Optional[ILGSv1Span] = None
"""A zero-based, half-open span into the Unicode code point space of input text.
All spans are globally laminar and well-nested similar to XML—it is impossible
@@ -188,7 +188,7 @@ class Segment(BaseModel):
a non-negative incrementing integer starting from zero.
"""
- span: Span
+ span: ILGSv1Span
"""A zero-based, half-open span into the Unicode code point space of input text.
All spans are globally laminar and well-nested similar to XML—it is impossible
diff --git a/src/isaacus/types/span.py b/src/isaacus/types/ilgs/ilgs_v1_span.py
similarity index 92%
rename from src/isaacus/types/span.py
rename to src/isaacus/types/ilgs/ilgs_v1_span.py
index 23108eb..350bc65 100644
--- a/src/isaacus/types/span.py
+++ b/src/isaacus/types/ilgs/ilgs_v1_span.py
@@ -1,11 +1,11 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from .._models import BaseModel
+from ..._models import BaseModel
-__all__ = ["Span"]
+__all__ = ["ILGSv1Span"]
-class Span(BaseModel):
+class ILGSv1Span(BaseModel):
"""A zero-based, half-open span into the Unicode code point space of input text.
All spans are globally laminar and well-nested similar to XML—it is impossible for any two spans to partially overlap; they can only be disjoint, adjacent, or wholly nested. Spans of the exact same type (e.g., segments) will never be duplicated.
diff --git a/src/isaacus/types/term.py b/src/isaacus/types/ilgs/ilgs_v1_term.py
similarity index 91%
rename from src/isaacus/types/term.py
rename to src/isaacus/types/ilgs/ilgs_v1_term.py
index 63a88b1..73f9d0a 100644
--- a/src/isaacus/types/term.py
+++ b/src/isaacus/types/ilgs/ilgs_v1_term.py
@@ -2,13 +2,13 @@
from typing import List
-from .span import Span
-from .._models import BaseModel
+from ..._models import BaseModel
+from .ilgs_v1_span import ILGSv1Span
-__all__ = ["Term"]
+__all__ = ["ILGSv1Term"]
-class Term(BaseModel):
+class ILGSv1Term(BaseModel):
"""A term assigned a definite meaning within a document."""
id: str
@@ -17,7 +17,7 @@ class Term(BaseModel):
is a non-negative incrementing integer starting from zero.
"""
- name: Span
+ name: ILGSv1Span
"""A zero-based, half-open span into the Unicode code point space of input text.
All spans are globally laminar and well-nested similar to XML—it is impossible
@@ -33,7 +33,7 @@ class Term(BaseModel):
code units instead of Unicode code points).
"""
- meaning: Span
+ meaning: ILGSv1Span
"""A zero-based, half-open span into the Unicode code point space of input text.
All spans are globally laminar and well-nested similar to XML—it is impossible
@@ -49,7 +49,7 @@ class Term(BaseModel):
code units instead of Unicode code points).
"""
- mentions: List[Span]
+ mentions: List[ILGSv1Span]
"""
An array of spans within the document's text where the term is mentioned outside
of its definition.
diff --git a/src/isaacus/types/website.py b/src/isaacus/types/ilgs/ilgs_v1_website.py
similarity index 81%
rename from src/isaacus/types/website.py
rename to src/isaacus/types/ilgs/ilgs_v1_website.py
index 3f1d233..b98ba16 100644
--- a/src/isaacus/types/website.py
+++ b/src/isaacus/types/ilgs/ilgs_v1_website.py
@@ -2,13 +2,13 @@
from typing import List
-from .span import Span
-from .._models import BaseModel
+from ..._models import BaseModel
+from .ilgs_v1_span import ILGSv1Span
-__all__ = ["Website"]
+__all__ = ["ILGSv1Website"]
-class Website(BaseModel):
+class ILGSv1Website(BaseModel):
"""A website identified in a document belonging to a legal person.
If a website was mentioned in the document but is not attributable to a legal person, it will not be extracted.
@@ -20,7 +20,7 @@ class Website(BaseModel):
person: str
"""The unique identifier of the person that this website belongs to."""
- mentions: List[Span]
+ mentions: List[ILGSv1Span]
"""
An array of one or more spans within the document's text where the website is
mentioned (including paths and slugs which are not part of the website's
From 6ea6db6d15b754c6f2ffd5aa235d7b8abb1e3ad1 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Wed, 4 Feb 2026 04:02:43 +0000
Subject: [PATCH 03/11] feat(sdk): move ilgs structs around
---
.stats.yml | 2 +-
api.md | 34 +++++-----
src/isaacus/resources/extractions/__init__.py | 24 +++----
.../resources/extractions/extractions.py | 36 +++++-----
src/isaacus/resources/extractions/qa.py | 42 ++++++------
src/isaacus/types/enrichment_response.py | 4 +-
src/isaacus/types/extractions/__init__.py | 2 +-
.../types/extractions/qa_create_params.py | 4 +-
src/isaacus/types/ilgs/__init__.py | 28 ++++----
...v1_crossreference.py => crossreference.py} | 8 +--
.../types/ilgs/{ilgs_v1_date.py => date.py} | 8 +--
.../ilgs/{ilgs_v1_document.py => document.py} | 68 +++++++++----------
.../types/ilgs/{ilgs_v1_email.py => email.py} | 8 +--
...ernal_document.py => external_document.py} | 12 ++--
.../{ilgs_v1_id_number.py => id_number.py} | 8 +--
.../ilgs/{ilgs_v1_location.py => location.py} | 10 +--
.../ilgs/{ilgs_v1_person.py => person.py} | 10 +--
...lgs_v1_phone_number.py => phone_number.py} | 8 +--
.../types/ilgs/{ilgs_v1_quote.py => quote.py} | 8 +--
.../ilgs/{ilgs_v1_segment.py => segment.py} | 14 ++--
.../types/ilgs/{ilgs_v1_span.py => span.py} | 4 +-
.../types/ilgs/{ilgs_v1_term.py => term.py} | 12 ++--
.../ilgs/{ilgs_v1_website.py => website.py} | 8 +--
tests/api_resources/extractions/test_qa.py | 4 +-
24 files changed, 183 insertions(+), 183 deletions(-)
rename src/isaacus/types/ilgs/{ilgs_v1_crossreference.py => crossreference.py} (92%)
rename src/isaacus/types/ilgs/{ilgs_v1_date.py => date.py} (95%)
rename src/isaacus/types/ilgs/{ilgs_v1_document.py => document.py} (80%)
rename src/isaacus/types/ilgs/{ilgs_v1_email.py => email.py} (83%)
rename src/isaacus/types/ilgs/{ilgs_v1_external_document.py => external_document.py} (94%)
rename src/isaacus/types/ilgs/{ilgs_v1_id_number.py => id_number.py} (83%)
rename src/isaacus/types/ilgs/{ilgs_v1_location.py => location.py} (91%)
rename src/isaacus/types/ilgs/{ilgs_v1_person.py => person.py} (98%)
rename src/isaacus/types/ilgs/{ilgs_v1_phone_number.py => phone_number.py} (85%)
rename src/isaacus/types/ilgs/{ilgs_v1_quote.py => quote.py} (93%)
rename src/isaacus/types/ilgs/{ilgs_v1_segment.py => segment.py} (97%)
rename src/isaacus/types/ilgs/{ilgs_v1_span.py => span.py} (95%)
rename src/isaacus/types/ilgs/{ilgs_v1_term.py => term.py} (92%)
rename src/isaacus/types/ilgs/{ilgs_v1_website.py => website.py} (84%)
diff --git a/.stats.yml b/.stats.yml
index e3c6a72..a34a025 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 5
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/isaacus%2Fisaacus-fa910a5a3d1321234423bd8c042d202a64d4d956ef45847b4de358cb18e447eb.yml
openapi_spec_hash: 926b9b619c15e8570e496e11d4fb753e
-config_hash: 8608b9490f9a482b18bd8f733d2c82f6
+config_hash: d856791543087d91299c1657929917dc
diff --git a/api.md b/api.md
index 8b462e5..2e5bda7 100644
--- a/api.md
+++ b/api.md
@@ -38,7 +38,7 @@ Methods:
# Extractions
-## QA
+## Qa
Types:
@@ -62,27 +62,27 @@ Methods:
- client.enrichments.create(\*\*params) -> EnrichmentResponse
-# ILGS
+# Ilgs
-## v1
+## V1
Types:
```python
from isaacus.types.ilgs import (
- ILGSv1Crossreference,
- ILGSv1Date,
- ILGSv1Document,
- ILGSv1Email,
- ILGSv1ExternalDocument,
- ILGSv1IDNumber,
- ILGSv1Location,
- ILGSv1Person,
- ILGSv1PhoneNumber,
- ILGSv1Quote,
- ILGSv1Segment,
- ILGSv1Span,
- ILGSv1Term,
- ILGSv1Website,
+ Crossreference,
+ Date,
+ Document,
+ Email,
+ ExternalDocument,
+ IDNumber,
+ Location,
+ Person,
+ PhoneNumber,
+ Quote,
+ Segment,
+ Span,
+ Term,
+ Website,
)
```
diff --git a/src/isaacus/resources/extractions/__init__.py b/src/isaacus/resources/extractions/__init__.py
index f36d186..820c06a 100644
--- a/src/isaacus/resources/extractions/__init__.py
+++ b/src/isaacus/resources/extractions/__init__.py
@@ -1,12 +1,12 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from .qa import (
- QAResource,
- AsyncQAResource,
- QAResourceWithRawResponse,
- AsyncQAResourceWithRawResponse,
- QAResourceWithStreamingResponse,
- AsyncQAResourceWithStreamingResponse,
+ QaResource,
+ AsyncQaResource,
+ QaResourceWithRawResponse,
+ AsyncQaResourceWithRawResponse,
+ QaResourceWithStreamingResponse,
+ AsyncQaResourceWithStreamingResponse,
)
from .extractions import (
ExtractionsResource,
@@ -18,12 +18,12 @@
)
__all__ = [
- "QAResource",
- "AsyncQAResource",
- "QAResourceWithRawResponse",
- "AsyncQAResourceWithRawResponse",
- "QAResourceWithStreamingResponse",
- "AsyncQAResourceWithStreamingResponse",
+ "QaResource",
+ "AsyncQaResource",
+ "QaResourceWithRawResponse",
+ "AsyncQaResourceWithRawResponse",
+ "QaResourceWithStreamingResponse",
+ "AsyncQaResourceWithStreamingResponse",
"ExtractionsResource",
"AsyncExtractionsResource",
"ExtractionsResourceWithRawResponse",
diff --git a/src/isaacus/resources/extractions/extractions.py b/src/isaacus/resources/extractions/extractions.py
index ee0b810..a967336 100644
--- a/src/isaacus/resources/extractions/extractions.py
+++ b/src/isaacus/resources/extractions/extractions.py
@@ -3,12 +3,12 @@
from __future__ import annotations
from .qa import (
- QAResource,
- AsyncQAResource,
- QAResourceWithRawResponse,
- AsyncQAResourceWithRawResponse,
- QAResourceWithStreamingResponse,
- AsyncQAResourceWithStreamingResponse,
+ QaResource,
+ AsyncQaResource,
+ QaResourceWithRawResponse,
+ AsyncQaResourceWithRawResponse,
+ QaResourceWithStreamingResponse,
+ AsyncQaResourceWithStreamingResponse,
)
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
@@ -18,8 +18,8 @@
class ExtractionsResource(SyncAPIResource):
@cached_property
- def qa(self) -> QAResource:
- return QAResource(self._client)
+ def qa(self) -> QaResource:
+ return QaResource(self._client)
@cached_property
def with_raw_response(self) -> ExtractionsResourceWithRawResponse:
@@ -43,8 +43,8 @@ def with_streaming_response(self) -> ExtractionsResourceWithStreamingResponse:
class AsyncExtractionsResource(AsyncAPIResource):
@cached_property
- def qa(self) -> AsyncQAResource:
- return AsyncQAResource(self._client)
+ def qa(self) -> AsyncQaResource:
+ return AsyncQaResource(self._client)
@cached_property
def with_raw_response(self) -> AsyncExtractionsResourceWithRawResponse:
@@ -71,8 +71,8 @@ def __init__(self, extractions: ExtractionsResource) -> None:
self._extractions = extractions
@cached_property
- def qa(self) -> QAResourceWithRawResponse:
- return QAResourceWithRawResponse(self._extractions.qa)
+ def qa(self) -> QaResourceWithRawResponse:
+ return QaResourceWithRawResponse(self._extractions.qa)
class AsyncExtractionsResourceWithRawResponse:
@@ -80,8 +80,8 @@ def __init__(self, extractions: AsyncExtractionsResource) -> None:
self._extractions = extractions
@cached_property
- def qa(self) -> AsyncQAResourceWithRawResponse:
- return AsyncQAResourceWithRawResponse(self._extractions.qa)
+ def qa(self) -> AsyncQaResourceWithRawResponse:
+ return AsyncQaResourceWithRawResponse(self._extractions.qa)
class ExtractionsResourceWithStreamingResponse:
@@ -89,8 +89,8 @@ def __init__(self, extractions: ExtractionsResource) -> None:
self._extractions = extractions
@cached_property
- def qa(self) -> QAResourceWithStreamingResponse:
- return QAResourceWithStreamingResponse(self._extractions.qa)
+ def qa(self) -> QaResourceWithStreamingResponse:
+ return QaResourceWithStreamingResponse(self._extractions.qa)
class AsyncExtractionsResourceWithStreamingResponse:
@@ -98,5 +98,5 @@ def __init__(self, extractions: AsyncExtractionsResource) -> None:
self._extractions = extractions
@cached_property
- def qa(self) -> AsyncQAResourceWithStreamingResponse:
- return AsyncQAResourceWithStreamingResponse(self._extractions.qa)
+ def qa(self) -> AsyncQaResourceWithStreamingResponse:
+ return AsyncQaResourceWithStreamingResponse(self._extractions.qa)
diff --git a/src/isaacus/resources/extractions/qa.py b/src/isaacus/resources/extractions/qa.py
index 454f3e0..97d38df 100644
--- a/src/isaacus/resources/extractions/qa.py
+++ b/src/isaacus/resources/extractions/qa.py
@@ -21,28 +21,28 @@
from ...types.extractions import qa_create_params
from ...types.extractions.answer_extraction_response import AnswerExtractionResponse
-__all__ = ["QAResource", "AsyncQAResource"]
+__all__ = ["QaResource", "AsyncQaResource"]
-class QAResource(SyncAPIResource):
+class QaResource(SyncAPIResource):
@cached_property
- def with_raw_response(self) -> QAResourceWithRawResponse:
+ def with_raw_response(self) -> QaResourceWithRawResponse:
"""
This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/isaacus-dev/isaacus-python#accessing-raw-response-data-eg-headers
"""
- return QAResourceWithRawResponse(self)
+ return QaResourceWithRawResponse(self)
@cached_property
- def with_streaming_response(self) -> QAResourceWithStreamingResponse:
+ def with_streaming_response(self) -> QaResourceWithStreamingResponse:
"""
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
For more information, see https://www.github.com/isaacus-dev/isaacus-python#with_streaming_response
"""
- return QAResourceWithStreamingResponse(self)
+ return QaResourceWithStreamingResponse(self)
def create(
self,
@@ -115,7 +115,7 @@ def create(
"top_k": top_k,
"chunking_options": chunking_options,
},
- qa_create_params.QACreateParams,
+ qa_create_params.QaCreateParams,
),
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
@@ -124,25 +124,25 @@ def create(
)
-class AsyncQAResource(AsyncAPIResource):
+class AsyncQaResource(AsyncAPIResource):
@cached_property
- def with_raw_response(self) -> AsyncQAResourceWithRawResponse:
+ def with_raw_response(self) -> AsyncQaResourceWithRawResponse:
"""
This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/isaacus-dev/isaacus-python#accessing-raw-response-data-eg-headers
"""
- return AsyncQAResourceWithRawResponse(self)
+ return AsyncQaResourceWithRawResponse(self)
@cached_property
- def with_streaming_response(self) -> AsyncQAResourceWithStreamingResponse:
+ def with_streaming_response(self) -> AsyncQaResourceWithStreamingResponse:
"""
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
For more information, see https://www.github.com/isaacus-dev/isaacus-python#with_streaming_response
"""
- return AsyncQAResourceWithStreamingResponse(self)
+ return AsyncQaResourceWithStreamingResponse(self)
async def create(
self,
@@ -215,7 +215,7 @@ async def create(
"top_k": top_k,
"chunking_options": chunking_options,
},
- qa_create_params.QACreateParams,
+ qa_create_params.QaCreateParams,
),
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
@@ -224,8 +224,8 @@ async def create(
)
-class QAResourceWithRawResponse:
- def __init__(self, qa: QAResource) -> None:
+class QaResourceWithRawResponse:
+ def __init__(self, qa: QaResource) -> None:
self._qa = qa
self.create = to_raw_response_wrapper(
@@ -233,8 +233,8 @@ def __init__(self, qa: QAResource) -> None:
)
-class AsyncQAResourceWithRawResponse:
- def __init__(self, qa: AsyncQAResource) -> None:
+class AsyncQaResourceWithRawResponse:
+ def __init__(self, qa: AsyncQaResource) -> None:
self._qa = qa
self.create = async_to_raw_response_wrapper(
@@ -242,8 +242,8 @@ def __init__(self, qa: AsyncQAResource) -> None:
)
-class QAResourceWithStreamingResponse:
- def __init__(self, qa: QAResource) -> None:
+class QaResourceWithStreamingResponse:
+ def __init__(self, qa: QaResource) -> None:
self._qa = qa
self.create = to_streamed_response_wrapper(
@@ -251,8 +251,8 @@ def __init__(self, qa: QAResource) -> None:
)
-class AsyncQAResourceWithStreamingResponse:
- def __init__(self, qa: AsyncQAResource) -> None:
+class AsyncQaResourceWithStreamingResponse:
+ def __init__(self, qa: AsyncQaResource) -> None:
self._qa = qa
self.create = async_to_streamed_response_wrapper(
diff --git a/src/isaacus/types/enrichment_response.py b/src/isaacus/types/enrichment_response.py
index adcd7e9..6324b82 100644
--- a/src/isaacus/types/enrichment_response.py
+++ b/src/isaacus/types/enrichment_response.py
@@ -3,7 +3,7 @@
from typing import List
from .._models import BaseModel
-from .ilgs.ilgs_v1_document import ILGSv1Document
+from .ilgs.document import Document
__all__ = ["EnrichmentResponse", "Result", "Usage"]
@@ -17,7 +17,7 @@ class Result(BaseModel):
therefore, ending at the number of inputs minus `1`).
"""
- document: ILGSv1Document
+ document: Document
"""The enriched document."""
diff --git a/src/isaacus/types/extractions/__init__.py b/src/isaacus/types/extractions/__init__.py
index a23d9ed..39de7b6 100644
--- a/src/isaacus/types/extractions/__init__.py
+++ b/src/isaacus/types/extractions/__init__.py
@@ -2,5 +2,5 @@
from __future__ import annotations
-from .qa_create_params import QACreateParams as QACreateParams
+from .qa_create_params import QaCreateParams as QaCreateParams
from .answer_extraction_response import AnswerExtractionResponse as AnswerExtractionResponse
diff --git a/src/isaacus/types/extractions/qa_create_params.py b/src/isaacus/types/extractions/qa_create_params.py
index 994fc00..4e65449 100644
--- a/src/isaacus/types/extractions/qa_create_params.py
+++ b/src/isaacus/types/extractions/qa_create_params.py
@@ -7,10 +7,10 @@
from ..._types import SequenceNotStr
-__all__ = ["QACreateParams", "ChunkingOptions"]
+__all__ = ["QaCreateParams", "ChunkingOptions"]
-class QACreateParams(TypedDict, total=False):
+class QaCreateParams(TypedDict, total=False):
model: Required[Literal["kanon-answer-extractor", "kanon-answer-extractor-mini"]]
"""
The ID of the
diff --git a/src/isaacus/types/ilgs/__init__.py b/src/isaacus/types/ilgs/__init__.py
index dd6ceac..6f8d0d9 100644
--- a/src/isaacus/types/ilgs/__init__.py
+++ b/src/isaacus/types/ilgs/__init__.py
@@ -2,17 +2,17 @@
from __future__ import annotations
-from .ilgs_v1_date import ILGSv1Date as ILGSv1Date
-from .ilgs_v1_span import ILGSv1Span as ILGSv1Span
-from .ilgs_v1_term import ILGSv1Term as ILGSv1Term
-from .ilgs_v1_email import ILGSv1Email as ILGSv1Email
-from .ilgs_v1_quote import ILGSv1Quote as ILGSv1Quote
-from .ilgs_v1_person import ILGSv1Person as ILGSv1Person
-from .ilgs_v1_segment import ILGSv1Segment as ILGSv1Segment
-from .ilgs_v1_website import ILGSv1Website as ILGSv1Website
-from .ilgs_v1_document import ILGSv1Document as ILGSv1Document
-from .ilgs_v1_location import ILGSv1Location as ILGSv1Location
-from .ilgs_v1_id_number import ILGSv1IDNumber as ILGSv1IDNumber
-from .ilgs_v1_phone_number import ILGSv1PhoneNumber as ILGSv1PhoneNumber
-from .ilgs_v1_crossreference import ILGSv1Crossreference as ILGSv1Crossreference
-from .ilgs_v1_external_document import ILGSv1ExternalDocument as ILGSv1ExternalDocument
+from .date import Date as Date
+from .span import Span as Span
+from .term import Term as Term
+from .email import Email as Email
+from .quote import Quote as Quote
+from .person import Person as Person
+from .segment import Segment as Segment
+from .website import Website as Website
+from .document import Document as Document
+from .location import Location as Location
+from .id_number import IDNumber as IDNumber
+from .phone_number import PhoneNumber as PhoneNumber
+from .crossreference import Crossreference as Crossreference
+from .external_document import ExternalDocument as ExternalDocument
diff --git a/src/isaacus/types/ilgs/ilgs_v1_crossreference.py b/src/isaacus/types/ilgs/crossreference.py
similarity index 92%
rename from src/isaacus/types/ilgs/ilgs_v1_crossreference.py
rename to src/isaacus/types/ilgs/crossreference.py
index ca57eb4..8d8e4d2 100644
--- a/src/isaacus/types/ilgs/ilgs_v1_crossreference.py
+++ b/src/isaacus/types/ilgs/crossreference.py
@@ -1,12 +1,12 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+from .span import Span
from ..._models import BaseModel
-from .ilgs_v1_span import ILGSv1Span
-__all__ = ["ILGSv1Crossreference"]
+__all__ = ["Crossreference"]
-class ILGSv1Crossreference(BaseModel):
+class Crossreference(BaseModel):
"""A cross-reference within the document pointing to one or more segments."""
start: str
@@ -25,7 +25,7 @@ class ILGSv1Crossreference(BaseModel):
will be identical.
"""
- span: ILGSv1Span
+ span: Span
"""A zero-based, half-open span into the Unicode code point space of input text.
All spans are globally laminar and well-nested similar to XML—it is impossible
diff --git a/src/isaacus/types/ilgs/ilgs_v1_date.py b/src/isaacus/types/ilgs/date.py
similarity index 95%
rename from src/isaacus/types/ilgs/ilgs_v1_date.py
rename to src/isaacus/types/ilgs/date.py
index 8b5e6f6..2977398 100644
--- a/src/isaacus/types/ilgs/ilgs_v1_date.py
+++ b/src/isaacus/types/ilgs/date.py
@@ -3,13 +3,13 @@
from typing import List, Optional
from typing_extensions import Literal
+from .span import Span
from ..._models import BaseModel
-from .ilgs_v1_span import ILGSv1Span
-__all__ = ["ILGSv1Date"]
+__all__ = ["Date"]
-class ILGSv1Date(BaseModel):
+class Date(BaseModel):
"""
A date identified in a document belonging to one of the following types: `creation`, `signature`, `effective`, `expiry`, `delivery`, `renewal`, `payment`, `birth`, or `death`.
@@ -63,7 +63,7 @@ class ILGSv1Date(BaseModel):
`{index}` is a non-negative incrementing integer starting from zero.
"""
- mentions: List[ILGSv1Span]
+ mentions: List[Span]
"""
An array of one or more spans within the document's text where the date is
mentioned.
diff --git a/src/isaacus/types/ilgs/ilgs_v1_document.py b/src/isaacus/types/ilgs/document.py
similarity index 80%
rename from src/isaacus/types/ilgs/ilgs_v1_document.py
rename to src/isaacus/types/ilgs/document.py
index c521ddc..d9383fd 100644
--- a/src/isaacus/types/ilgs/ilgs_v1_document.py
+++ b/src/isaacus/types/ilgs/document.py
@@ -3,28 +3,28 @@
from typing import List, Optional
from typing_extensions import Literal
+from .date import Date
+from .span import Span
+from .term import Term
+from .email import Email
+from .quote import Quote
+from .person import Person
+from .segment import Segment
+from .website import Website
+from .location import Location
from ..._models import BaseModel
-from .ilgs_v1_date import ILGSv1Date
-from .ilgs_v1_span import ILGSv1Span
-from .ilgs_v1_term import ILGSv1Term
-from .ilgs_v1_email import ILGSv1Email
-from .ilgs_v1_quote import ILGSv1Quote
-from .ilgs_v1_person import ILGSv1Person
-from .ilgs_v1_segment import ILGSv1Segment
-from .ilgs_v1_website import ILGSv1Website
-from .ilgs_v1_location import ILGSv1Location
-from .ilgs_v1_id_number import ILGSv1IDNumber
-from .ilgs_v1_phone_number import ILGSv1PhoneNumber
-from .ilgs_v1_crossreference import ILGSv1Crossreference
-from .ilgs_v1_external_document import ILGSv1ExternalDocument
-
-__all__ = ["ILGSv1Document"]
-
-
-class ILGSv1Document(BaseModel):
+from .id_number import IDNumber
+from .phone_number import PhoneNumber
+from .crossreference import Crossreference
+from .external_document import ExternalDocument
+
+__all__ = ["Document"]
+
+
+class Document(BaseModel):
"""The enriched document."""
- title: Optional[ILGSv1Span] = None
+ title: Optional[Span] = None
"""A zero-based, half-open span into the Unicode code point space of input text.
All spans are globally laminar and well-nested similar to XML—it is impossible
@@ -40,7 +40,7 @@ class ILGSv1Document(BaseModel):
code units instead of Unicode code points).
"""
- subtitle: Optional[ILGSv1Span] = None
+ subtitle: Optional[Span] = None
"""A zero-based, half-open span into the Unicode code point space of input text.
All spans are globally laminar and well-nested similar to XML—it is impossible
@@ -88,25 +88,25 @@ class ILGSv1Document(BaseModel):
code for federal law.
"""
- segments: List[ILGSv1Segment]
+ segments: List[Segment]
"""
An array of segments within the document representing structurally distinct
portions of its content.
"""
- crossreferences: List[ILGSv1Crossreference]
+ crossreferences: List[Crossreference]
"""
An array of cross-references within the document pointing to a single segment or
a span of segments.
"""
- locations: List[ILGSv1Location]
+ locations: List[Location]
"""An array of locations identified in the document."""
- persons: List[ILGSv1Person]
+ persons: List[Person]
"""An array of legal persons identified in the document."""
- emails: List[ILGSv1Email]
+ emails: List[Email]
"""
An array of email addresses identified in the document belonging to legal
persons.
@@ -115,14 +115,14 @@ class ILGSv1Document(BaseModel):
persons will not be extracted.
"""
- websites: List[ILGSv1Website]
+ websites: List[Website]
"""An array of websites identified in the document belonging to legal persons.
Websites mentioned in the document that are not attributable to legal persons
will not be extracted.
"""
- phone_numbers: List[ILGSv1PhoneNumber]
+ phone_numbers: List[PhoneNumber]
"""
An array of valid phone numbers identified in the document belonging to legal
persons.
@@ -131,7 +131,7 @@ class ILGSv1Document(BaseModel):
attributable to legal persons will not be extracted.
"""
- id_numbers: List[ILGSv1IDNumber]
+ id_numbers: List[IDNumber]
"""
An array of identification numbers identified in the document belonging to legal
persons.
@@ -140,16 +140,16 @@ class ILGSv1Document(BaseModel):
legal persons will not be extracted.
"""
- terms: List[ILGSv1Term]
+ terms: List[Term]
"""An array of terms assigned definite meanings within the document."""
- external_documents: List[ILGSv1ExternalDocument]
+ external_documents: List[ExternalDocument]
"""An array of documents identified within the document."""
- quotes: List[ILGSv1Quote]
+ quotes: List[Quote]
"""An array of quotations within the document."""
- dates: List[ILGSv1Date]
+ dates: List[Date]
"""
An array of dates identified in the document belonging to one of the following
types: `creation`, `signature`, `effective`, `expiry`, `delivery`, `renewal`,
@@ -159,10 +159,10 @@ class ILGSv1Document(BaseModel):
one of the supported date types are extractable.
"""
- headings: List[ILGSv1Span]
+ headings: List[Span]
"""An array of spans within the document's text constituting headings."""
- junk: List[ILGSv1Span]
+ junk: List[Span]
"""
An array of spans within the document's text constituting non-operative,
non-substantive 'junk' content such as headers, footers, page numbers, and OCR
diff --git a/src/isaacus/types/ilgs/ilgs_v1_email.py b/src/isaacus/types/ilgs/email.py
similarity index 83%
rename from src/isaacus/types/ilgs/ilgs_v1_email.py
rename to src/isaacus/types/ilgs/email.py
index 0ad6c67..dfffbe7 100644
--- a/src/isaacus/types/ilgs/ilgs_v1_email.py
+++ b/src/isaacus/types/ilgs/email.py
@@ -2,13 +2,13 @@
from typing import List
+from .span import Span
from ..._models import BaseModel
-from .ilgs_v1_span import ILGSv1Span
-__all__ = ["ILGSv1Email"]
+__all__ = ["Email"]
-class ILGSv1Email(BaseModel):
+class Email(BaseModel):
"""An email address identified in a document belonging to a legal person.
If an email address was mentioned in the document but is not attributable to a legal person, it will not be extracted.
@@ -20,7 +20,7 @@ class ILGSv1Email(BaseModel):
person: str
"""The unique identifier of the person that this email address belongs to."""
- mentions: List[ILGSv1Span]
+ mentions: List[Span]
"""
An array of one or more spans within the document's text where the email address
is mentioned.
diff --git a/src/isaacus/types/ilgs/ilgs_v1_external_document.py b/src/isaacus/types/ilgs/external_document.py
similarity index 94%
rename from src/isaacus/types/ilgs/ilgs_v1_external_document.py
rename to src/isaacus/types/ilgs/external_document.py
index 5668637..e6e0cbb 100644
--- a/src/isaacus/types/ilgs/ilgs_v1_external_document.py
+++ b/src/isaacus/types/ilgs/external_document.py
@@ -3,13 +3,13 @@
from typing import List, Optional
from typing_extensions import Literal
+from .span import Span
from ..._models import BaseModel
-from .ilgs_v1_span import ILGSv1Span
-__all__ = ["ILGSv1ExternalDocument"]
+__all__ = ["ExternalDocument"]
-class ILGSv1ExternalDocument(BaseModel):
+class ExternalDocument(BaseModel):
"""A document identified within another document."""
id: str
@@ -18,7 +18,7 @@ class ILGSv1ExternalDocument(BaseModel):
`{index}` is a non-negative incrementing integer starting from zero.
"""
- name: ILGSv1Span
+ name: Span
"""A zero-based, half-open span into the Unicode code point space of input text.
All spans are globally laminar and well-nested similar to XML—it is impossible
@@ -86,14 +86,14 @@ class ILGSv1ExternalDocument(BaseModel):
expressing any particular sentiment towards it.
"""
- mentions: List[ILGSv1Span]
+ mentions: List[Span]
"""
An array of one or more spans within the document's text where the external
document is mentioned by name, for example, 'the US Constitution' in 'the Second
Amendment to the US Constitution protects freedom of speech'.
"""
- pinpoints: List[ILGSv1Span]
+ pinpoints: List[Span]
"""
An array of spans within the document's text where specific parts of the
external document are referenced, for example, 'Section 2' in 'as defined in
diff --git a/src/isaacus/types/ilgs/ilgs_v1_id_number.py b/src/isaacus/types/ilgs/id_number.py
similarity index 83%
rename from src/isaacus/types/ilgs/ilgs_v1_id_number.py
rename to src/isaacus/types/ilgs/id_number.py
index cfcda0a..23d18dd 100644
--- a/src/isaacus/types/ilgs/ilgs_v1_id_number.py
+++ b/src/isaacus/types/ilgs/id_number.py
@@ -2,13 +2,13 @@
from typing import List
+from .span import Span
from ..._models import BaseModel
-from .ilgs_v1_span import ILGSv1Span
-__all__ = ["ILGSv1IDNumber"]
+__all__ = ["IDNumber"]
-class ILGSv1IDNumber(BaseModel):
+class IDNumber(BaseModel):
"""An identification number mentioned in a document belonging to a legal person.
If an identification number was mentioned in the document but is not attributable to a legal person, it will not be extracted.
@@ -20,7 +20,7 @@ class ILGSv1IDNumber(BaseModel):
person: str
"""The unique identifier of the person that this identification number belongs to."""
- mentions: List[ILGSv1Span]
+ mentions: List[Span]
"""
An array of one or more spans within the document's text where the
identification number is mentioned.
diff --git a/src/isaacus/types/ilgs/ilgs_v1_location.py b/src/isaacus/types/ilgs/location.py
similarity index 91%
rename from src/isaacus/types/ilgs/ilgs_v1_location.py
rename to src/isaacus/types/ilgs/location.py
index 5444d02..45b6620 100644
--- a/src/isaacus/types/ilgs/ilgs_v1_location.py
+++ b/src/isaacus/types/ilgs/location.py
@@ -3,13 +3,13 @@
from typing import List, Optional
from typing_extensions import Literal
+from .span import Span
from ..._models import BaseModel
-from .ilgs_v1_span import ILGSv1Span
-__all__ = ["ILGSv1Location"]
+__all__ = ["Location"]
-class ILGSv1Location(BaseModel):
+class Location(BaseModel):
"""A location identified within a document."""
id: str
@@ -18,7 +18,7 @@ class ILGSv1Location(BaseModel):
`{index}` is a non-negative incrementing integer starting from zero.
"""
- name: ILGSv1Span
+ name: Span
"""A zero-based, half-open span into the Unicode code point space of input text.
All spans are globally laminar and well-nested similar to XML—it is impossible
@@ -46,7 +46,7 @@ class ILGSv1Location(BaseModel):
is a non-negative incrementing integer starting from zero.
"""
- mentions: List[ILGSv1Span]
+ mentions: List[Span]
"""
An array of one or more spans within the document's text where the location is
mentioned.
diff --git a/src/isaacus/types/ilgs/ilgs_v1_person.py b/src/isaacus/types/ilgs/person.py
similarity index 98%
rename from src/isaacus/types/ilgs/ilgs_v1_person.py
rename to src/isaacus/types/ilgs/person.py
index 0935502..c6ef228 100644
--- a/src/isaacus/types/ilgs/ilgs_v1_person.py
+++ b/src/isaacus/types/ilgs/person.py
@@ -3,13 +3,13 @@
from typing import List, Optional
from typing_extensions import Literal
+from .span import Span
from ..._models import BaseModel
-from .ilgs_v1_span import ILGSv1Span
-__all__ = ["ILGSv1Person"]
+__all__ = ["Person"]
-class ILGSv1Person(BaseModel):
+class Person(BaseModel):
"""A legal person identified in a document."""
id: str
@@ -18,7 +18,7 @@ class ILGSv1Person(BaseModel):
is a non-negative incrementing integer starting from zero.
"""
- name: ILGSv1Span
+ name: Span
"""A zero-based, half-open span into the Unicode code point space of input text.
All spans are globally laminar and well-nested similar to XML—it is impossible
@@ -188,7 +188,7 @@ class ILGSv1Person(BaseModel):
is a non-negative incrementing integer starting from zero.
"""
- mentions: List[ILGSv1Span]
+ mentions: List[Span]
"""
An array of one or more spans within the document's text where the person is
mentioned.
diff --git a/src/isaacus/types/ilgs/ilgs_v1_phone_number.py b/src/isaacus/types/ilgs/phone_number.py
similarity index 85%
rename from src/isaacus/types/ilgs/ilgs_v1_phone_number.py
rename to src/isaacus/types/ilgs/phone_number.py
index bb94d00..a224c2b 100644
--- a/src/isaacus/types/ilgs/ilgs_v1_phone_number.py
+++ b/src/isaacus/types/ilgs/phone_number.py
@@ -2,13 +2,13 @@
from typing import List
+from .span import Span
from ..._models import BaseModel
-from .ilgs_v1_span import ILGSv1Span
-__all__ = ["ILGSv1PhoneNumber"]
+__all__ = ["PhoneNumber"]
-class ILGSv1PhoneNumber(BaseModel):
+class PhoneNumber(BaseModel):
"""A valid phone number identified in a document belonging to a legal person.
If a phone number was mentioned in the document but is not valid, possible, or attributable to a legal person, it will not be extracted.
@@ -23,7 +23,7 @@ class ILGSv1PhoneNumber(BaseModel):
person: str
"""The unique identifier of the person that this phone number belongs to."""
- mentions: List[ILGSv1Span]
+ mentions: List[Span]
"""
An array of one or more spans within the document's text where the phone number
is mentioned.
diff --git a/src/isaacus/types/ilgs/ilgs_v1_quote.py b/src/isaacus/types/ilgs/quote.py
similarity index 93%
rename from src/isaacus/types/ilgs/ilgs_v1_quote.py
rename to src/isaacus/types/ilgs/quote.py
index bcb3b45..5368c94 100644
--- a/src/isaacus/types/ilgs/ilgs_v1_quote.py
+++ b/src/isaacus/types/ilgs/quote.py
@@ -2,13 +2,13 @@
from typing import Optional
+from .span import Span
from ..._models import BaseModel
-from .ilgs_v1_span import ILGSv1Span
-__all__ = ["ILGSv1Quote"]
+__all__ = ["Quote"]
-class ILGSv1Quote(BaseModel):
+class Quote(BaseModel):
"""A quotation within a document."""
source_segment: Optional[str] = None
@@ -35,7 +35,7 @@ class ILGSv1Quote(BaseModel):
documents.
"""
- span: ILGSv1Span
+ span: Span
"""A zero-based, half-open span into the Unicode code point space of input text.
All spans are globally laminar and well-nested similar to XML—it is impossible
diff --git a/src/isaacus/types/ilgs/ilgs_v1_segment.py b/src/isaacus/types/ilgs/segment.py
similarity index 97%
rename from src/isaacus/types/ilgs/ilgs_v1_segment.py
rename to src/isaacus/types/ilgs/segment.py
index 27e447c..6a19b08 100644
--- a/src/isaacus/types/ilgs/ilgs_v1_segment.py
+++ b/src/isaacus/types/ilgs/segment.py
@@ -3,13 +3,13 @@
from typing import Optional
from typing_extensions import Literal
+from .span import Span
from ..._models import BaseModel
-from .ilgs_v1_span import ILGSv1Span
-__all__ = ["ILGSv1Segment"]
+__all__ = ["Segment"]
-class ILGSv1Segment(BaseModel):
+class Segment(BaseModel):
"""
A segment within the document representing a structurally distinct portion of the document's content.
"""
@@ -134,7 +134,7 @@ class ILGSv1Segment(BaseModel):
`other` denotes content that does not fit into any of the other categories.
"""
- type_name: Optional[ILGSv1Span] = None
+ type_name: Optional[Span] = None
"""A zero-based, half-open span into the Unicode code point space of input text.
All spans are globally laminar and well-nested similar to XML—it is impossible
@@ -150,7 +150,7 @@ class ILGSv1Segment(BaseModel):
code units instead of Unicode code points).
"""
- code: Optional[ILGSv1Span] = None
+ code: Optional[Span] = None
"""A zero-based, half-open span into the Unicode code point space of input text.
All spans are globally laminar and well-nested similar to XML—it is impossible
@@ -166,7 +166,7 @@ class ILGSv1Segment(BaseModel):
code units instead of Unicode code points).
"""
- title: Optional[ILGSv1Span] = None
+ title: Optional[Span] = None
"""A zero-based, half-open span into the Unicode code point space of input text.
All spans are globally laminar and well-nested similar to XML—it is impossible
@@ -188,7 +188,7 @@ class ILGSv1Segment(BaseModel):
a non-negative incrementing integer starting from zero.
"""
- span: ILGSv1Span
+ span: Span
"""A zero-based, half-open span into the Unicode code point space of input text.
All spans are globally laminar and well-nested similar to XML—it is impossible
diff --git a/src/isaacus/types/ilgs/ilgs_v1_span.py b/src/isaacus/types/ilgs/span.py
similarity index 95%
rename from src/isaacus/types/ilgs/ilgs_v1_span.py
rename to src/isaacus/types/ilgs/span.py
index 350bc65..327c94d 100644
--- a/src/isaacus/types/ilgs/ilgs_v1_span.py
+++ b/src/isaacus/types/ilgs/span.py
@@ -2,10 +2,10 @@
from ..._models import BaseModel
-__all__ = ["ILGSv1Span"]
+__all__ = ["Span"]
-class ILGSv1Span(BaseModel):
+class Span(BaseModel):
"""A zero-based, half-open span into the Unicode code point space of input text.
All spans are globally laminar and well-nested similar to XML—it is impossible for any two spans to partially overlap; they can only be disjoint, adjacent, or wholly nested. Spans of the exact same type (e.g., segments) will never be duplicated.
diff --git a/src/isaacus/types/ilgs/ilgs_v1_term.py b/src/isaacus/types/ilgs/term.py
similarity index 92%
rename from src/isaacus/types/ilgs/ilgs_v1_term.py
rename to src/isaacus/types/ilgs/term.py
index 73f9d0a..4ceb2f0 100644
--- a/src/isaacus/types/ilgs/ilgs_v1_term.py
+++ b/src/isaacus/types/ilgs/term.py
@@ -2,13 +2,13 @@
from typing import List
+from .span import Span
from ..._models import BaseModel
-from .ilgs_v1_span import ILGSv1Span
-__all__ = ["ILGSv1Term"]
+__all__ = ["Term"]
-class ILGSv1Term(BaseModel):
+class Term(BaseModel):
"""A term assigned a definite meaning within a document."""
id: str
@@ -17,7 +17,7 @@ class ILGSv1Term(BaseModel):
is a non-negative incrementing integer starting from zero.
"""
- name: ILGSv1Span
+ name: Span
"""A zero-based, half-open span into the Unicode code point space of input text.
All spans are globally laminar and well-nested similar to XML—it is impossible
@@ -33,7 +33,7 @@ class ILGSv1Term(BaseModel):
code units instead of Unicode code points).
"""
- meaning: ILGSv1Span
+ meaning: Span
"""A zero-based, half-open span into the Unicode code point space of input text.
All spans are globally laminar and well-nested similar to XML—it is impossible
@@ -49,7 +49,7 @@ class ILGSv1Term(BaseModel):
code units instead of Unicode code points).
"""
- mentions: List[ILGSv1Span]
+ mentions: List[Span]
"""
An array of spans within the document's text where the term is mentioned outside
of its definition.
diff --git a/src/isaacus/types/ilgs/ilgs_v1_website.py b/src/isaacus/types/ilgs/website.py
similarity index 84%
rename from src/isaacus/types/ilgs/ilgs_v1_website.py
rename to src/isaacus/types/ilgs/website.py
index b98ba16..e6e5099 100644
--- a/src/isaacus/types/ilgs/ilgs_v1_website.py
+++ b/src/isaacus/types/ilgs/website.py
@@ -2,13 +2,13 @@
from typing import List
+from .span import Span
from ..._models import BaseModel
-from .ilgs_v1_span import ILGSv1Span
-__all__ = ["ILGSv1Website"]
+__all__ = ["Website"]
-class ILGSv1Website(BaseModel):
+class Website(BaseModel):
"""A website identified in a document belonging to a legal person.
If a website was mentioned in the document but is not attributable to a legal person, it will not be extracted.
@@ -20,7 +20,7 @@ class ILGSv1Website(BaseModel):
person: str
"""The unique identifier of the person that this website belongs to."""
- mentions: List[ILGSv1Span]
+ mentions: List[Span]
"""
An array of one or more spans within the document's text where the website is
mentioned (including paths and slugs which are not part of the website's
diff --git a/tests/api_resources/extractions/test_qa.py b/tests/api_resources/extractions/test_qa.py
index 9aa7ecb..c4bf706 100644
--- a/tests/api_resources/extractions/test_qa.py
+++ b/tests/api_resources/extractions/test_qa.py
@@ -14,7 +14,7 @@
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
-class TestQA:
+class TestQa:
parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
@pytest.mark.skip(reason="Prism tests are disabled")
@@ -83,7 +83,7 @@ def test_streaming_response_create(self, client: Isaacus) -> None:
assert cast(Any, response.is_closed) is True
-class TestAsyncQA:
+class TestAsyncQa:
parametrize = pytest.mark.parametrize(
"async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
)
From d3068e38f718f52cc9b46dc6e60efa5dc911f10a Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Wed, 4 Feb 2026 04:06:29 +0000
Subject: [PATCH 04/11] feat(sdk): move ilgs structs around
---
.stats.yml | 2 +-
api.md | 6 ++----
src/isaacus/types/__init__.py | 14 ++++++++++++++
src/isaacus/types/{ilgs => }/crossreference.py | 2 +-
src/isaacus/types/{ilgs => }/date.py | 2 +-
src/isaacus/types/{ilgs => }/document.py | 2 +-
src/isaacus/types/{ilgs => }/email.py | 2 +-
src/isaacus/types/enrichment_response.py | 2 +-
.../types/{ilgs => }/external_document.py | 2 +-
src/isaacus/types/{ilgs => }/id_number.py | 2 +-
src/isaacus/types/ilgs/__init__.py | 18 ------------------
src/isaacus/types/{ilgs => }/location.py | 2 +-
src/isaacus/types/{ilgs => }/person.py | 2 +-
src/isaacus/types/{ilgs => }/phone_number.py | 2 +-
src/isaacus/types/{ilgs => }/quote.py | 2 +-
src/isaacus/types/{ilgs => }/segment.py | 2 +-
src/isaacus/types/{ilgs => }/span.py | 2 +-
src/isaacus/types/{ilgs => }/term.py | 2 +-
src/isaacus/types/{ilgs => }/website.py | 2 +-
19 files changed, 32 insertions(+), 38 deletions(-)
rename src/isaacus/types/{ilgs => }/crossreference.py (97%)
rename src/isaacus/types/{ilgs => }/date.py (98%)
rename src/isaacus/types/{ilgs => }/document.py (99%)
rename src/isaacus/types/{ilgs => }/email.py (95%)
rename src/isaacus/types/{ilgs => }/external_document.py (99%)
rename src/isaacus/types/{ilgs => }/id_number.py (95%)
delete mode 100644 src/isaacus/types/ilgs/__init__.py
rename src/isaacus/types/{ilgs => }/location.py (98%)
rename src/isaacus/types/{ilgs => }/person.py (99%)
rename src/isaacus/types/{ilgs => }/phone_number.py (96%)
rename src/isaacus/types/{ilgs => }/quote.py (98%)
rename src/isaacus/types/{ilgs => }/segment.py (99%)
rename src/isaacus/types/{ilgs => }/span.py (97%)
rename src/isaacus/types/{ilgs => }/term.py (98%)
rename src/isaacus/types/{ilgs => }/website.py (95%)
diff --git a/.stats.yml b/.stats.yml
index a34a025..b972712 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 5
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/isaacus%2Fisaacus-fa910a5a3d1321234423bd8c042d202a64d4d956ef45847b4de358cb18e447eb.yml
openapi_spec_hash: 926b9b619c15e8570e496e11d4fb753e
-config_hash: d856791543087d91299c1657929917dc
+config_hash: b9cecef13213c698c51e03d64fe70185
diff --git a/api.md b/api.md
index 2e5bda7..5bf9b9c 100644
--- a/api.md
+++ b/api.md
@@ -62,14 +62,12 @@ Methods:
- client.enrichments.create(\*\*params) -> EnrichmentResponse
-# Ilgs
-
-## V1
+# IlgsV1
Types:
```python
-from isaacus.types.ilgs import (
+from isaacus.types import (
Crossreference,
Date,
Document,
diff --git a/src/isaacus/types/__init__.py b/src/isaacus/types/__init__.py
index f1751e9..22f2d74 100644
--- a/src/isaacus/types/__init__.py
+++ b/src/isaacus/types/__init__.py
@@ -2,6 +2,20 @@
from __future__ import annotations
+from .date import Date as Date
+from .span import Span as Span
+from .term import Term as Term
+from .email import Email as Email
+from .quote import Quote as Quote
+from .person import Person as Person
+from .segment import Segment as Segment
+from .website import Website as Website
+from .document import Document as Document
+from .location import Location as Location
+from .id_number import IDNumber as IDNumber
+from .phone_number import PhoneNumber as PhoneNumber
+from .crossreference import Crossreference as Crossreference
+from .external_document import ExternalDocument as ExternalDocument
from .embedding_response import EmbeddingResponse as EmbeddingResponse
from .reranking_response import RerankingResponse as RerankingResponse
from .enrichment_response import EnrichmentResponse as EnrichmentResponse
diff --git a/src/isaacus/types/ilgs/crossreference.py b/src/isaacus/types/crossreference.py
similarity index 97%
rename from src/isaacus/types/ilgs/crossreference.py
rename to src/isaacus/types/crossreference.py
index 8d8e4d2..604ba13 100644
--- a/src/isaacus/types/ilgs/crossreference.py
+++ b/src/isaacus/types/crossreference.py
@@ -1,7 +1,7 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from .span import Span
-from ..._models import BaseModel
+from .._models import BaseModel
__all__ = ["Crossreference"]
diff --git a/src/isaacus/types/ilgs/date.py b/src/isaacus/types/date.py
similarity index 98%
rename from src/isaacus/types/ilgs/date.py
rename to src/isaacus/types/date.py
index 2977398..5266faf 100644
--- a/src/isaacus/types/ilgs/date.py
+++ b/src/isaacus/types/date.py
@@ -4,7 +4,7 @@
from typing_extensions import Literal
from .span import Span
-from ..._models import BaseModel
+from .._models import BaseModel
__all__ = ["Date"]
diff --git a/src/isaacus/types/ilgs/document.py b/src/isaacus/types/document.py
similarity index 99%
rename from src/isaacus/types/ilgs/document.py
rename to src/isaacus/types/document.py
index d9383fd..1ad35fa 100644
--- a/src/isaacus/types/ilgs/document.py
+++ b/src/isaacus/types/document.py
@@ -11,8 +11,8 @@
from .person import Person
from .segment import Segment
from .website import Website
+from .._models import BaseModel
from .location import Location
-from ..._models import BaseModel
from .id_number import IDNumber
from .phone_number import PhoneNumber
from .crossreference import Crossreference
diff --git a/src/isaacus/types/ilgs/email.py b/src/isaacus/types/email.py
similarity index 95%
rename from src/isaacus/types/ilgs/email.py
rename to src/isaacus/types/email.py
index dfffbe7..88a4582 100644
--- a/src/isaacus/types/ilgs/email.py
+++ b/src/isaacus/types/email.py
@@ -3,7 +3,7 @@
from typing import List
from .span import Span
-from ..._models import BaseModel
+from .._models import BaseModel
__all__ = ["Email"]
diff --git a/src/isaacus/types/enrichment_response.py b/src/isaacus/types/enrichment_response.py
index 6324b82..9e1c420 100644
--- a/src/isaacus/types/enrichment_response.py
+++ b/src/isaacus/types/enrichment_response.py
@@ -3,7 +3,7 @@
from typing import List
from .._models import BaseModel
-from .ilgs.document import Document
+from .document import Document
__all__ = ["EnrichmentResponse", "Result", "Usage"]
diff --git a/src/isaacus/types/ilgs/external_document.py b/src/isaacus/types/external_document.py
similarity index 99%
rename from src/isaacus/types/ilgs/external_document.py
rename to src/isaacus/types/external_document.py
index e6e0cbb..3e8582d 100644
--- a/src/isaacus/types/ilgs/external_document.py
+++ b/src/isaacus/types/external_document.py
@@ -4,7 +4,7 @@
from typing_extensions import Literal
from .span import Span
-from ..._models import BaseModel
+from .._models import BaseModel
__all__ = ["ExternalDocument"]
diff --git a/src/isaacus/types/ilgs/id_number.py b/src/isaacus/types/id_number.py
similarity index 95%
rename from src/isaacus/types/ilgs/id_number.py
rename to src/isaacus/types/id_number.py
index 23d18dd..7e3f9c7 100644
--- a/src/isaacus/types/ilgs/id_number.py
+++ b/src/isaacus/types/id_number.py
@@ -3,7 +3,7 @@
from typing import List
from .span import Span
-from ..._models import BaseModel
+from .._models import BaseModel
__all__ = ["IDNumber"]
diff --git a/src/isaacus/types/ilgs/__init__.py b/src/isaacus/types/ilgs/__init__.py
deleted file mode 100644
index 6f8d0d9..0000000
--- a/src/isaacus/types/ilgs/__init__.py
+++ /dev/null
@@ -1,18 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from __future__ import annotations
-
-from .date import Date as Date
-from .span import Span as Span
-from .term import Term as Term
-from .email import Email as Email
-from .quote import Quote as Quote
-from .person import Person as Person
-from .segment import Segment as Segment
-from .website import Website as Website
-from .document import Document as Document
-from .location import Location as Location
-from .id_number import IDNumber as IDNumber
-from .phone_number import PhoneNumber as PhoneNumber
-from .crossreference import Crossreference as Crossreference
-from .external_document import ExternalDocument as ExternalDocument
diff --git a/src/isaacus/types/ilgs/location.py b/src/isaacus/types/location.py
similarity index 98%
rename from src/isaacus/types/ilgs/location.py
rename to src/isaacus/types/location.py
index 45b6620..27b68eb 100644
--- a/src/isaacus/types/ilgs/location.py
+++ b/src/isaacus/types/location.py
@@ -4,7 +4,7 @@
from typing_extensions import Literal
from .span import Span
-from ..._models import BaseModel
+from .._models import BaseModel
__all__ = ["Location"]
diff --git a/src/isaacus/types/ilgs/person.py b/src/isaacus/types/person.py
similarity index 99%
rename from src/isaacus/types/ilgs/person.py
rename to src/isaacus/types/person.py
index c6ef228..1189595 100644
--- a/src/isaacus/types/ilgs/person.py
+++ b/src/isaacus/types/person.py
@@ -4,7 +4,7 @@
from typing_extensions import Literal
from .span import Span
-from ..._models import BaseModel
+from .._models import BaseModel
__all__ = ["Person"]
diff --git a/src/isaacus/types/ilgs/phone_number.py b/src/isaacus/types/phone_number.py
similarity index 96%
rename from src/isaacus/types/ilgs/phone_number.py
rename to src/isaacus/types/phone_number.py
index a224c2b..30dd506 100644
--- a/src/isaacus/types/ilgs/phone_number.py
+++ b/src/isaacus/types/phone_number.py
@@ -3,7 +3,7 @@
from typing import List
from .span import Span
-from ..._models import BaseModel
+from .._models import BaseModel
__all__ = ["PhoneNumber"]
diff --git a/src/isaacus/types/ilgs/quote.py b/src/isaacus/types/quote.py
similarity index 98%
rename from src/isaacus/types/ilgs/quote.py
rename to src/isaacus/types/quote.py
index 5368c94..735721d 100644
--- a/src/isaacus/types/ilgs/quote.py
+++ b/src/isaacus/types/quote.py
@@ -3,7 +3,7 @@
from typing import Optional
from .span import Span
-from ..._models import BaseModel
+from .._models import BaseModel
__all__ = ["Quote"]
diff --git a/src/isaacus/types/ilgs/segment.py b/src/isaacus/types/segment.py
similarity index 99%
rename from src/isaacus/types/ilgs/segment.py
rename to src/isaacus/types/segment.py
index 6a19b08..2f13d9d 100644
--- a/src/isaacus/types/ilgs/segment.py
+++ b/src/isaacus/types/segment.py
@@ -4,7 +4,7 @@
from typing_extensions import Literal
from .span import Span
-from ..._models import BaseModel
+from .._models import BaseModel
__all__ = ["Segment"]
diff --git a/src/isaacus/types/ilgs/span.py b/src/isaacus/types/span.py
similarity index 97%
rename from src/isaacus/types/ilgs/span.py
rename to src/isaacus/types/span.py
index 327c94d..23108eb 100644
--- a/src/isaacus/types/ilgs/span.py
+++ b/src/isaacus/types/span.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from ..._models import BaseModel
+from .._models import BaseModel
__all__ = ["Span"]
diff --git a/src/isaacus/types/ilgs/term.py b/src/isaacus/types/term.py
similarity index 98%
rename from src/isaacus/types/ilgs/term.py
rename to src/isaacus/types/term.py
index 4ceb2f0..63a88b1 100644
--- a/src/isaacus/types/ilgs/term.py
+++ b/src/isaacus/types/term.py
@@ -3,7 +3,7 @@
from typing import List
from .span import Span
-from ..._models import BaseModel
+from .._models import BaseModel
__all__ = ["Term"]
diff --git a/src/isaacus/types/ilgs/website.py b/src/isaacus/types/website.py
similarity index 95%
rename from src/isaacus/types/ilgs/website.py
rename to src/isaacus/types/website.py
index e6e5099..3f1d233 100644
--- a/src/isaacus/types/ilgs/website.py
+++ b/src/isaacus/types/website.py
@@ -3,7 +3,7 @@
from typing import List
from .span import Span
-from ..._models import BaseModel
+from .._models import BaseModel
__all__ = ["Website"]
From 920e2bbf07e7aea58fabbd6b31ecd96050c43957 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Wed, 4 Feb 2026 04:16:24 +0000
Subject: [PATCH 05/11] feat(sdk): move ilgs structs around
---
.stats.yml | 2 +-
api.md | 10 +++--
src/isaacus/resources/extractions/__init__.py | 24 +++++------
.../resources/extractions/extractions.py | 36 ++++++++--------
src/isaacus/resources/extractions/qa.py | 42 +++++++++----------
src/isaacus/types/__init__.py | 14 -------
src/isaacus/types/enrichment_response.py | 2 +-
src/isaacus/types/extractions/__init__.py | 2 +-
.../types/extractions/qa_create_params.py | 4 +-
src/isaacus/types/ilgs/__init__.py | 3 ++
src/isaacus/types/ilgs/v1/__init__.py | 18 ++++++++
.../types/{ => ilgs/v1}/crossreference.py | 2 +-
src/isaacus/types/{ => ilgs/v1}/date.py | 2 +-
src/isaacus/types/{ => ilgs/v1}/document.py | 2 +-
src/isaacus/types/{ => ilgs/v1}/email.py | 2 +-
.../types/{ => ilgs/v1}/external_document.py | 2 +-
src/isaacus/types/{ => ilgs/v1}/id_number.py | 2 +-
src/isaacus/types/{ => ilgs/v1}/location.py | 2 +-
src/isaacus/types/{ => ilgs/v1}/person.py | 2 +-
.../types/{ => ilgs/v1}/phone_number.py | 2 +-
src/isaacus/types/{ => ilgs/v1}/quote.py | 2 +-
src/isaacus/types/{ => ilgs/v1}/segment.py | 2 +-
src/isaacus/types/{ => ilgs/v1}/span.py | 2 +-
src/isaacus/types/{ => ilgs/v1}/term.py | 2 +-
src/isaacus/types/{ => ilgs/v1}/website.py | 2 +-
tests/api_resources/extractions/test_qa.py | 4 +-
26 files changed, 100 insertions(+), 89 deletions(-)
create mode 100644 src/isaacus/types/ilgs/__init__.py
create mode 100644 src/isaacus/types/ilgs/v1/__init__.py
rename src/isaacus/types/{ => ilgs/v1}/crossreference.py (97%)
rename src/isaacus/types/{ => ilgs/v1}/date.py (98%)
rename src/isaacus/types/{ => ilgs/v1}/document.py (99%)
rename src/isaacus/types/{ => ilgs/v1}/email.py (95%)
rename src/isaacus/types/{ => ilgs/v1}/external_document.py (99%)
rename src/isaacus/types/{ => ilgs/v1}/id_number.py (95%)
rename src/isaacus/types/{ => ilgs/v1}/location.py (98%)
rename src/isaacus/types/{ => ilgs/v1}/person.py (99%)
rename src/isaacus/types/{ => ilgs/v1}/phone_number.py (96%)
rename src/isaacus/types/{ => ilgs/v1}/quote.py (98%)
rename src/isaacus/types/{ => ilgs/v1}/segment.py (99%)
rename src/isaacus/types/{ => ilgs/v1}/span.py (97%)
rename src/isaacus/types/{ => ilgs/v1}/term.py (98%)
rename src/isaacus/types/{ => ilgs/v1}/website.py (95%)
diff --git a/.stats.yml b/.stats.yml
index b972712..5fccd53 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 5
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/isaacus%2Fisaacus-fa910a5a3d1321234423bd8c042d202a64d4d956ef45847b4de358cb18e447eb.yml
openapi_spec_hash: 926b9b619c15e8570e496e11d4fb753e
-config_hash: b9cecef13213c698c51e03d64fe70185
+config_hash: 7b8cddc2fa896f9ab05e6b05055c7f27
diff --git a/api.md b/api.md
index 5bf9b9c..c4c5055 100644
--- a/api.md
+++ b/api.md
@@ -38,7 +38,7 @@ Methods:
# Extractions
-## Qa
+## QA
Types:
@@ -62,12 +62,16 @@ Methods:
- client.enrichments.create(\*\*params) -> EnrichmentResponse
-# IlgsV1
+# ILGS
+
+## v1
+
+### v1
Types:
```python
-from isaacus.types import (
+from isaacus.types.ilgs.v1 import (
Crossreference,
Date,
Document,
diff --git a/src/isaacus/resources/extractions/__init__.py b/src/isaacus/resources/extractions/__init__.py
index 820c06a..f36d186 100644
--- a/src/isaacus/resources/extractions/__init__.py
+++ b/src/isaacus/resources/extractions/__init__.py
@@ -1,12 +1,12 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from .qa import (
- QaResource,
- AsyncQaResource,
- QaResourceWithRawResponse,
- AsyncQaResourceWithRawResponse,
- QaResourceWithStreamingResponse,
- AsyncQaResourceWithStreamingResponse,
+ QAResource,
+ AsyncQAResource,
+ QAResourceWithRawResponse,
+ AsyncQAResourceWithRawResponse,
+ QAResourceWithStreamingResponse,
+ AsyncQAResourceWithStreamingResponse,
)
from .extractions import (
ExtractionsResource,
@@ -18,12 +18,12 @@
)
__all__ = [
- "QaResource",
- "AsyncQaResource",
- "QaResourceWithRawResponse",
- "AsyncQaResourceWithRawResponse",
- "QaResourceWithStreamingResponse",
- "AsyncQaResourceWithStreamingResponse",
+ "QAResource",
+ "AsyncQAResource",
+ "QAResourceWithRawResponse",
+ "AsyncQAResourceWithRawResponse",
+ "QAResourceWithStreamingResponse",
+ "AsyncQAResourceWithStreamingResponse",
"ExtractionsResource",
"AsyncExtractionsResource",
"ExtractionsResourceWithRawResponse",
diff --git a/src/isaacus/resources/extractions/extractions.py b/src/isaacus/resources/extractions/extractions.py
index a967336..ee0b810 100644
--- a/src/isaacus/resources/extractions/extractions.py
+++ b/src/isaacus/resources/extractions/extractions.py
@@ -3,12 +3,12 @@
from __future__ import annotations
from .qa import (
- QaResource,
- AsyncQaResource,
- QaResourceWithRawResponse,
- AsyncQaResourceWithRawResponse,
- QaResourceWithStreamingResponse,
- AsyncQaResourceWithStreamingResponse,
+ QAResource,
+ AsyncQAResource,
+ QAResourceWithRawResponse,
+ AsyncQAResourceWithRawResponse,
+ QAResourceWithStreamingResponse,
+ AsyncQAResourceWithStreamingResponse,
)
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
@@ -18,8 +18,8 @@
class ExtractionsResource(SyncAPIResource):
@cached_property
- def qa(self) -> QaResource:
- return QaResource(self._client)
+ def qa(self) -> QAResource:
+ return QAResource(self._client)
@cached_property
def with_raw_response(self) -> ExtractionsResourceWithRawResponse:
@@ -43,8 +43,8 @@ def with_streaming_response(self) -> ExtractionsResourceWithStreamingResponse:
class AsyncExtractionsResource(AsyncAPIResource):
@cached_property
- def qa(self) -> AsyncQaResource:
- return AsyncQaResource(self._client)
+ def qa(self) -> AsyncQAResource:
+ return AsyncQAResource(self._client)
@cached_property
def with_raw_response(self) -> AsyncExtractionsResourceWithRawResponse:
@@ -71,8 +71,8 @@ def __init__(self, extractions: ExtractionsResource) -> None:
self._extractions = extractions
@cached_property
- def qa(self) -> QaResourceWithRawResponse:
- return QaResourceWithRawResponse(self._extractions.qa)
+ def qa(self) -> QAResourceWithRawResponse:
+ return QAResourceWithRawResponse(self._extractions.qa)
class AsyncExtractionsResourceWithRawResponse:
@@ -80,8 +80,8 @@ def __init__(self, extractions: AsyncExtractionsResource) -> None:
self._extractions = extractions
@cached_property
- def qa(self) -> AsyncQaResourceWithRawResponse:
- return AsyncQaResourceWithRawResponse(self._extractions.qa)
+ def qa(self) -> AsyncQAResourceWithRawResponse:
+ return AsyncQAResourceWithRawResponse(self._extractions.qa)
class ExtractionsResourceWithStreamingResponse:
@@ -89,8 +89,8 @@ def __init__(self, extractions: ExtractionsResource) -> None:
self._extractions = extractions
@cached_property
- def qa(self) -> QaResourceWithStreamingResponse:
- return QaResourceWithStreamingResponse(self._extractions.qa)
+ def qa(self) -> QAResourceWithStreamingResponse:
+ return QAResourceWithStreamingResponse(self._extractions.qa)
class AsyncExtractionsResourceWithStreamingResponse:
@@ -98,5 +98,5 @@ def __init__(self, extractions: AsyncExtractionsResource) -> None:
self._extractions = extractions
@cached_property
- def qa(self) -> AsyncQaResourceWithStreamingResponse:
- return AsyncQaResourceWithStreamingResponse(self._extractions.qa)
+ def qa(self) -> AsyncQAResourceWithStreamingResponse:
+ return AsyncQAResourceWithStreamingResponse(self._extractions.qa)
diff --git a/src/isaacus/resources/extractions/qa.py b/src/isaacus/resources/extractions/qa.py
index 97d38df..454f3e0 100644
--- a/src/isaacus/resources/extractions/qa.py
+++ b/src/isaacus/resources/extractions/qa.py
@@ -21,28 +21,28 @@
from ...types.extractions import qa_create_params
from ...types.extractions.answer_extraction_response import AnswerExtractionResponse
-__all__ = ["QaResource", "AsyncQaResource"]
+__all__ = ["QAResource", "AsyncQAResource"]
-class QaResource(SyncAPIResource):
+class QAResource(SyncAPIResource):
@cached_property
- def with_raw_response(self) -> QaResourceWithRawResponse:
+ def with_raw_response(self) -> QAResourceWithRawResponse:
"""
This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/isaacus-dev/isaacus-python#accessing-raw-response-data-eg-headers
"""
- return QaResourceWithRawResponse(self)
+ return QAResourceWithRawResponse(self)
@cached_property
- def with_streaming_response(self) -> QaResourceWithStreamingResponse:
+ def with_streaming_response(self) -> QAResourceWithStreamingResponse:
"""
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
For more information, see https://www.github.com/isaacus-dev/isaacus-python#with_streaming_response
"""
- return QaResourceWithStreamingResponse(self)
+ return QAResourceWithStreamingResponse(self)
def create(
self,
@@ -115,7 +115,7 @@ def create(
"top_k": top_k,
"chunking_options": chunking_options,
},
- qa_create_params.QaCreateParams,
+ qa_create_params.QACreateParams,
),
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
@@ -124,25 +124,25 @@ def create(
)
-class AsyncQaResource(AsyncAPIResource):
+class AsyncQAResource(AsyncAPIResource):
@cached_property
- def with_raw_response(self) -> AsyncQaResourceWithRawResponse:
+ def with_raw_response(self) -> AsyncQAResourceWithRawResponse:
"""
This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/isaacus-dev/isaacus-python#accessing-raw-response-data-eg-headers
"""
- return AsyncQaResourceWithRawResponse(self)
+ return AsyncQAResourceWithRawResponse(self)
@cached_property
- def with_streaming_response(self) -> AsyncQaResourceWithStreamingResponse:
+ def with_streaming_response(self) -> AsyncQAResourceWithStreamingResponse:
"""
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
For more information, see https://www.github.com/isaacus-dev/isaacus-python#with_streaming_response
"""
- return AsyncQaResourceWithStreamingResponse(self)
+ return AsyncQAResourceWithStreamingResponse(self)
async def create(
self,
@@ -215,7 +215,7 @@ async def create(
"top_k": top_k,
"chunking_options": chunking_options,
},
- qa_create_params.QaCreateParams,
+ qa_create_params.QACreateParams,
),
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
@@ -224,8 +224,8 @@ async def create(
)
-class QaResourceWithRawResponse:
- def __init__(self, qa: QaResource) -> None:
+class QAResourceWithRawResponse:
+ def __init__(self, qa: QAResource) -> None:
self._qa = qa
self.create = to_raw_response_wrapper(
@@ -233,8 +233,8 @@ def __init__(self, qa: QaResource) -> None:
)
-class AsyncQaResourceWithRawResponse:
- def __init__(self, qa: AsyncQaResource) -> None:
+class AsyncQAResourceWithRawResponse:
+ def __init__(self, qa: AsyncQAResource) -> None:
self._qa = qa
self.create = async_to_raw_response_wrapper(
@@ -242,8 +242,8 @@ def __init__(self, qa: AsyncQaResource) -> None:
)
-class QaResourceWithStreamingResponse:
- def __init__(self, qa: QaResource) -> None:
+class QAResourceWithStreamingResponse:
+ def __init__(self, qa: QAResource) -> None:
self._qa = qa
self.create = to_streamed_response_wrapper(
@@ -251,8 +251,8 @@ def __init__(self, qa: QaResource) -> None:
)
-class AsyncQaResourceWithStreamingResponse:
- def __init__(self, qa: AsyncQaResource) -> None:
+class AsyncQAResourceWithStreamingResponse:
+ def __init__(self, qa: AsyncQAResource) -> None:
self._qa = qa
self.create = async_to_streamed_response_wrapper(
diff --git a/src/isaacus/types/__init__.py b/src/isaacus/types/__init__.py
index 22f2d74..f1751e9 100644
--- a/src/isaacus/types/__init__.py
+++ b/src/isaacus/types/__init__.py
@@ -2,20 +2,6 @@
from __future__ import annotations
-from .date import Date as Date
-from .span import Span as Span
-from .term import Term as Term
-from .email import Email as Email
-from .quote import Quote as Quote
-from .person import Person as Person
-from .segment import Segment as Segment
-from .website import Website as Website
-from .document import Document as Document
-from .location import Location as Location
-from .id_number import IDNumber as IDNumber
-from .phone_number import PhoneNumber as PhoneNumber
-from .crossreference import Crossreference as Crossreference
-from .external_document import ExternalDocument as ExternalDocument
from .embedding_response import EmbeddingResponse as EmbeddingResponse
from .reranking_response import RerankingResponse as RerankingResponse
from .enrichment_response import EnrichmentResponse as EnrichmentResponse
diff --git a/src/isaacus/types/enrichment_response.py b/src/isaacus/types/enrichment_response.py
index 9e1c420..809bcf4 100644
--- a/src/isaacus/types/enrichment_response.py
+++ b/src/isaacus/types/enrichment_response.py
@@ -3,7 +3,7 @@
from typing import List
from .._models import BaseModel
-from .document import Document
+from .ilgs.v1.document import Document
__all__ = ["EnrichmentResponse", "Result", "Usage"]
diff --git a/src/isaacus/types/extractions/__init__.py b/src/isaacus/types/extractions/__init__.py
index 39de7b6..a23d9ed 100644
--- a/src/isaacus/types/extractions/__init__.py
+++ b/src/isaacus/types/extractions/__init__.py
@@ -2,5 +2,5 @@
from __future__ import annotations
-from .qa_create_params import QaCreateParams as QaCreateParams
+from .qa_create_params import QACreateParams as QACreateParams
from .answer_extraction_response import AnswerExtractionResponse as AnswerExtractionResponse
diff --git a/src/isaacus/types/extractions/qa_create_params.py b/src/isaacus/types/extractions/qa_create_params.py
index 4e65449..994fc00 100644
--- a/src/isaacus/types/extractions/qa_create_params.py
+++ b/src/isaacus/types/extractions/qa_create_params.py
@@ -7,10 +7,10 @@
from ..._types import SequenceNotStr
-__all__ = ["QaCreateParams", "ChunkingOptions"]
+__all__ = ["QACreateParams", "ChunkingOptions"]
-class QaCreateParams(TypedDict, total=False):
+class QACreateParams(TypedDict, total=False):
model: Required[Literal["kanon-answer-extractor", "kanon-answer-extractor-mini"]]
"""
The ID of the
diff --git a/src/isaacus/types/ilgs/__init__.py b/src/isaacus/types/ilgs/__init__.py
new file mode 100644
index 0000000..f8ee8b1
--- /dev/null
+++ b/src/isaacus/types/ilgs/__init__.py
@@ -0,0 +1,3 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
diff --git a/src/isaacus/types/ilgs/v1/__init__.py b/src/isaacus/types/ilgs/v1/__init__.py
new file mode 100644
index 0000000..6f8d0d9
--- /dev/null
+++ b/src/isaacus/types/ilgs/v1/__init__.py
@@ -0,0 +1,18 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from .date import Date as Date
+from .span import Span as Span
+from .term import Term as Term
+from .email import Email as Email
+from .quote import Quote as Quote
+from .person import Person as Person
+from .segment import Segment as Segment
+from .website import Website as Website
+from .document import Document as Document
+from .location import Location as Location
+from .id_number import IDNumber as IDNumber
+from .phone_number import PhoneNumber as PhoneNumber
+from .crossreference import Crossreference as Crossreference
+from .external_document import ExternalDocument as ExternalDocument
diff --git a/src/isaacus/types/crossreference.py b/src/isaacus/types/ilgs/v1/crossreference.py
similarity index 97%
rename from src/isaacus/types/crossreference.py
rename to src/isaacus/types/ilgs/v1/crossreference.py
index 604ba13..e515b52 100644
--- a/src/isaacus/types/crossreference.py
+++ b/src/isaacus/types/ilgs/v1/crossreference.py
@@ -1,7 +1,7 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from .span import Span
-from .._models import BaseModel
+from ...._models import BaseModel
__all__ = ["Crossreference"]
diff --git a/src/isaacus/types/date.py b/src/isaacus/types/ilgs/v1/date.py
similarity index 98%
rename from src/isaacus/types/date.py
rename to src/isaacus/types/ilgs/v1/date.py
index 5266faf..7208b4b 100644
--- a/src/isaacus/types/date.py
+++ b/src/isaacus/types/ilgs/v1/date.py
@@ -4,7 +4,7 @@
from typing_extensions import Literal
from .span import Span
-from .._models import BaseModel
+from ...._models import BaseModel
__all__ = ["Date"]
diff --git a/src/isaacus/types/document.py b/src/isaacus/types/ilgs/v1/document.py
similarity index 99%
rename from src/isaacus/types/document.py
rename to src/isaacus/types/ilgs/v1/document.py
index 1ad35fa..ca4ce7e 100644
--- a/src/isaacus/types/document.py
+++ b/src/isaacus/types/ilgs/v1/document.py
@@ -11,9 +11,9 @@
from .person import Person
from .segment import Segment
from .website import Website
-from .._models import BaseModel
from .location import Location
from .id_number import IDNumber
+from ...._models import BaseModel
from .phone_number import PhoneNumber
from .crossreference import Crossreference
from .external_document import ExternalDocument
diff --git a/src/isaacus/types/email.py b/src/isaacus/types/ilgs/v1/email.py
similarity index 95%
rename from src/isaacus/types/email.py
rename to src/isaacus/types/ilgs/v1/email.py
index 88a4582..7183531 100644
--- a/src/isaacus/types/email.py
+++ b/src/isaacus/types/ilgs/v1/email.py
@@ -3,7 +3,7 @@
from typing import List
from .span import Span
-from .._models import BaseModel
+from ...._models import BaseModel
__all__ = ["Email"]
diff --git a/src/isaacus/types/external_document.py b/src/isaacus/types/ilgs/v1/external_document.py
similarity index 99%
rename from src/isaacus/types/external_document.py
rename to src/isaacus/types/ilgs/v1/external_document.py
index 3e8582d..8f2b135 100644
--- a/src/isaacus/types/external_document.py
+++ b/src/isaacus/types/ilgs/v1/external_document.py
@@ -4,7 +4,7 @@
from typing_extensions import Literal
from .span import Span
-from .._models import BaseModel
+from ...._models import BaseModel
__all__ = ["ExternalDocument"]
diff --git a/src/isaacus/types/id_number.py b/src/isaacus/types/ilgs/v1/id_number.py
similarity index 95%
rename from src/isaacus/types/id_number.py
rename to src/isaacus/types/ilgs/v1/id_number.py
index 7e3f9c7..52ae0b7 100644
--- a/src/isaacus/types/id_number.py
+++ b/src/isaacus/types/ilgs/v1/id_number.py
@@ -3,7 +3,7 @@
from typing import List
from .span import Span
-from .._models import BaseModel
+from ...._models import BaseModel
__all__ = ["IDNumber"]
diff --git a/src/isaacus/types/location.py b/src/isaacus/types/ilgs/v1/location.py
similarity index 98%
rename from src/isaacus/types/location.py
rename to src/isaacus/types/ilgs/v1/location.py
index 27b68eb..6f4bbd1 100644
--- a/src/isaacus/types/location.py
+++ b/src/isaacus/types/ilgs/v1/location.py
@@ -4,7 +4,7 @@
from typing_extensions import Literal
from .span import Span
-from .._models import BaseModel
+from ...._models import BaseModel
__all__ = ["Location"]
diff --git a/src/isaacus/types/person.py b/src/isaacus/types/ilgs/v1/person.py
similarity index 99%
rename from src/isaacus/types/person.py
rename to src/isaacus/types/ilgs/v1/person.py
index 1189595..42384a7 100644
--- a/src/isaacus/types/person.py
+++ b/src/isaacus/types/ilgs/v1/person.py
@@ -4,7 +4,7 @@
from typing_extensions import Literal
from .span import Span
-from .._models import BaseModel
+from ...._models import BaseModel
__all__ = ["Person"]
diff --git a/src/isaacus/types/phone_number.py b/src/isaacus/types/ilgs/v1/phone_number.py
similarity index 96%
rename from src/isaacus/types/phone_number.py
rename to src/isaacus/types/ilgs/v1/phone_number.py
index 30dd506..53b79e3 100644
--- a/src/isaacus/types/phone_number.py
+++ b/src/isaacus/types/ilgs/v1/phone_number.py
@@ -3,7 +3,7 @@
from typing import List
from .span import Span
-from .._models import BaseModel
+from ...._models import BaseModel
__all__ = ["PhoneNumber"]
diff --git a/src/isaacus/types/quote.py b/src/isaacus/types/ilgs/v1/quote.py
similarity index 98%
rename from src/isaacus/types/quote.py
rename to src/isaacus/types/ilgs/v1/quote.py
index 735721d..3bcaad9 100644
--- a/src/isaacus/types/quote.py
+++ b/src/isaacus/types/ilgs/v1/quote.py
@@ -3,7 +3,7 @@
from typing import Optional
from .span import Span
-from .._models import BaseModel
+from ...._models import BaseModel
__all__ = ["Quote"]
diff --git a/src/isaacus/types/segment.py b/src/isaacus/types/ilgs/v1/segment.py
similarity index 99%
rename from src/isaacus/types/segment.py
rename to src/isaacus/types/ilgs/v1/segment.py
index 2f13d9d..fe9ba54 100644
--- a/src/isaacus/types/segment.py
+++ b/src/isaacus/types/ilgs/v1/segment.py
@@ -4,7 +4,7 @@
from typing_extensions import Literal
from .span import Span
-from .._models import BaseModel
+from ...._models import BaseModel
__all__ = ["Segment"]
diff --git a/src/isaacus/types/span.py b/src/isaacus/types/ilgs/v1/span.py
similarity index 97%
rename from src/isaacus/types/span.py
rename to src/isaacus/types/ilgs/v1/span.py
index 23108eb..2289f04 100644
--- a/src/isaacus/types/span.py
+++ b/src/isaacus/types/ilgs/v1/span.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from .._models import BaseModel
+from ...._models import BaseModel
__all__ = ["Span"]
diff --git a/src/isaacus/types/term.py b/src/isaacus/types/ilgs/v1/term.py
similarity index 98%
rename from src/isaacus/types/term.py
rename to src/isaacus/types/ilgs/v1/term.py
index 63a88b1..7b34272 100644
--- a/src/isaacus/types/term.py
+++ b/src/isaacus/types/ilgs/v1/term.py
@@ -3,7 +3,7 @@
from typing import List
from .span import Span
-from .._models import BaseModel
+from ...._models import BaseModel
__all__ = ["Term"]
diff --git a/src/isaacus/types/website.py b/src/isaacus/types/ilgs/v1/website.py
similarity index 95%
rename from src/isaacus/types/website.py
rename to src/isaacus/types/ilgs/v1/website.py
index 3f1d233..3b3baac 100644
--- a/src/isaacus/types/website.py
+++ b/src/isaacus/types/ilgs/v1/website.py
@@ -3,7 +3,7 @@
from typing import List
from .span import Span
-from .._models import BaseModel
+from ...._models import BaseModel
__all__ = ["Website"]
diff --git a/tests/api_resources/extractions/test_qa.py b/tests/api_resources/extractions/test_qa.py
index c4bf706..9aa7ecb 100644
--- a/tests/api_resources/extractions/test_qa.py
+++ b/tests/api_resources/extractions/test_qa.py
@@ -14,7 +14,7 @@
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
-class TestQa:
+class TestQA:
parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
@pytest.mark.skip(reason="Prism tests are disabled")
@@ -83,7 +83,7 @@ def test_streaming_response_create(self, client: Isaacus) -> None:
assert cast(Any, response.is_closed) is True
-class TestAsyncQa:
+class TestAsyncQA:
parametrize = pytest.mark.parametrize(
"async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
)
From 873f1a49d107be25de7b515b4796f2090e3885bf Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Wed, 4 Feb 2026 04:25:06 +0000
Subject: [PATCH 06/11] feat(sdk): demote other models
---
.stats.yml | 2 +-
api.md | 19 +-
src/isaacus/types/enrichment_response.py | 4 +-
src/isaacus/types/ilgs/__init__.py | 2 +
src/isaacus/types/ilgs/ilgs_v1_document.py | 1563 +++++++++++++++++
src/isaacus/types/ilgs/v1/__init__.py | 18 -
src/isaacus/types/ilgs/v1/crossreference.py | 42 -
src/isaacus/types/ilgs/v1/date.py | 70 -
src/isaacus/types/ilgs/v1/document.py | 172 --
src/isaacus/types/ilgs/v1/email.py | 27 -
.../types/ilgs/v1/external_document.py | 101 --
src/isaacus/types/ilgs/v1/id_number.py | 27 -
src/isaacus/types/ilgs/v1/location.py | 53 -
src/isaacus/types/ilgs/v1/person.py | 195 --
src/isaacus/types/ilgs/v1/phone_number.py | 30 -
src/isaacus/types/ilgs/v1/quote.py | 52 -
src/isaacus/types/ilgs/v1/segment.py | 205 ---
src/isaacus/types/ilgs/v1/span.py | 28 -
src/isaacus/types/ilgs/v1/term.py | 59 -
src/isaacus/types/ilgs/v1/website.py | 28 -
20 files changed, 1569 insertions(+), 1128 deletions(-)
create mode 100644 src/isaacus/types/ilgs/ilgs_v1_document.py
delete mode 100644 src/isaacus/types/ilgs/v1/__init__.py
delete mode 100644 src/isaacus/types/ilgs/v1/crossreference.py
delete mode 100644 src/isaacus/types/ilgs/v1/date.py
delete mode 100644 src/isaacus/types/ilgs/v1/document.py
delete mode 100644 src/isaacus/types/ilgs/v1/email.py
delete mode 100644 src/isaacus/types/ilgs/v1/external_document.py
delete mode 100644 src/isaacus/types/ilgs/v1/id_number.py
delete mode 100644 src/isaacus/types/ilgs/v1/location.py
delete mode 100644 src/isaacus/types/ilgs/v1/person.py
delete mode 100644 src/isaacus/types/ilgs/v1/phone_number.py
delete mode 100644 src/isaacus/types/ilgs/v1/quote.py
delete mode 100644 src/isaacus/types/ilgs/v1/segment.py
delete mode 100644 src/isaacus/types/ilgs/v1/span.py
delete mode 100644 src/isaacus/types/ilgs/v1/term.py
delete mode 100644 src/isaacus/types/ilgs/v1/website.py
diff --git a/.stats.yml b/.stats.yml
index 5fccd53..0bad860 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 5
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/isaacus%2Fisaacus-fa910a5a3d1321234423bd8c042d202a64d4d956ef45847b4de358cb18e447eb.yml
openapi_spec_hash: 926b9b619c15e8570e496e11d4fb753e
-config_hash: 7b8cddc2fa896f9ab05e6b05055c7f27
+config_hash: 67e3b91c6b2d2d5377f56bc8d2e8c93e
diff --git a/api.md b/api.md
index c4c5055..c0c03e3 100644
--- a/api.md
+++ b/api.md
@@ -66,25 +66,8 @@ Methods:
## v1
-### v1
-
Types:
```python
-from isaacus.types.ilgs.v1 import (
- Crossreference,
- Date,
- Document,
- Email,
- ExternalDocument,
- IDNumber,
- Location,
- Person,
- PhoneNumber,
- Quote,
- Segment,
- Span,
- Term,
- Website,
-)
+from isaacus.types.ilgs import ILGSv1Document
```
diff --git a/src/isaacus/types/enrichment_response.py b/src/isaacus/types/enrichment_response.py
index 809bcf4..adcd7e9 100644
--- a/src/isaacus/types/enrichment_response.py
+++ b/src/isaacus/types/enrichment_response.py
@@ -3,7 +3,7 @@
from typing import List
from .._models import BaseModel
-from .ilgs.v1.document import Document
+from .ilgs.ilgs_v1_document import ILGSv1Document
__all__ = ["EnrichmentResponse", "Result", "Usage"]
@@ -17,7 +17,7 @@ class Result(BaseModel):
therefore, ending at the number of inputs minus `1`).
"""
- document: Document
+ document: ILGSv1Document
"""The enriched document."""
diff --git a/src/isaacus/types/ilgs/__init__.py b/src/isaacus/types/ilgs/__init__.py
index f8ee8b1..da6c9a0 100644
--- a/src/isaacus/types/ilgs/__init__.py
+++ b/src/isaacus/types/ilgs/__init__.py
@@ -1,3 +1,5 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from __future__ import annotations
+
+from .ilgs_v1_document import ILGSv1Document as ILGSv1Document
diff --git a/src/isaacus/types/ilgs/ilgs_v1_document.py b/src/isaacus/types/ilgs/ilgs_v1_document.py
new file mode 100644
index 0000000..5862619
--- /dev/null
+++ b/src/isaacus/types/ilgs/ilgs_v1_document.py
@@ -0,0 +1,1563 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List, Optional
+from typing_extensions import Literal
+
+from ..._models import BaseModel
+
+__all__ = [
+ "ILGSv1Document",
+ "Title",
+ "Subtitle",
+ "Segment",
+ "SegmentTypeName",
+ "SegmentCode",
+ "SegmentTitle",
+ "SegmentSpan",
+ "Crossreference",
+ "CrossreferenceSpan",
+ "Location",
+ "LocationName",
+ "LocationMention",
+ "Person",
+ "PersonName",
+ "PersonMention",
+ "Email",
+ "EmailMention",
+ "Website",
+ "WebsiteMention",
+ "PhoneNumber",
+ "PhoneNumberMention",
+ "IDNumber",
+ "IDNumberMention",
+ "Term",
+ "TermName",
+ "TermMeaning",
+ "TermMention",
+ "ExternalDocument",
+ "ExternalDocumentName",
+ "ExternalDocumentMention",
+ "ExternalDocumentPinpoint",
+ "Quote",
+ "QuoteSpan",
+ "Date",
+ "DateMention",
+ "Heading",
+ "Junk",
+]
+
+
+class Title(BaseModel):
+ """A zero-based, half-open span into the Unicode code point space of input text.
+
+ All spans are globally laminar and well-nested similar to XML—it is impossible for any two spans to partially overlap; they can only be disjoint, adjacent, or wholly nested. Spans of the exact same type (e.g., segments) will never be duplicated.
+
+ A span cannot be empty and will never start or end at whitespace.
+
+ Note that, when using programming languages other than Python (which uses zero-based, half-open, Unicode code point-spaced string indexing), indices may need to be translated accordingly (for example, JavaScript slices into UTF-16 code units instead of Unicode code points).
+ """
+
+ start: int
+ """
+ The zero-based start index of the half-open span of Unicode code points in the
+ input text.
+ """
+
+ end: int
+ """
+ The zero-based end index of the half-open span (i.e., the end is exclusive) of
+ Unicode code points in the input text.
+ """
+
+
+class Subtitle(BaseModel):
+ """A zero-based, half-open span into the Unicode code point space of input text.
+
+ All spans are globally laminar and well-nested similar to XML—it is impossible for any two spans to partially overlap; they can only be disjoint, adjacent, or wholly nested. Spans of the exact same type (e.g., segments) will never be duplicated.
+
+ A span cannot be empty and will never start or end at whitespace.
+
+ Note that, when using programming languages other than Python (which uses zero-based, half-open, Unicode code point-spaced string indexing), indices may need to be translated accordingly (for example, JavaScript slices into UTF-16 code units instead of Unicode code points).
+ """
+
+ start: int
+ """
+ The zero-based start index of the half-open span of Unicode code points in the
+ input text.
+ """
+
+ end: int
+ """
+ The zero-based end index of the half-open span (i.e., the end is exclusive) of
+ Unicode code points in the input text.
+ """
+
+
+class SegmentTypeName(BaseModel):
+ """A zero-based, half-open span into the Unicode code point space of input text.
+
+ All spans are globally laminar and well-nested similar to XML—it is impossible for any two spans to partially overlap; they can only be disjoint, adjacent, or wholly nested. Spans of the exact same type (e.g., segments) will never be duplicated.
+
+ A span cannot be empty and will never start or end at whitespace.
+
+ Note that, when using programming languages other than Python (which uses zero-based, half-open, Unicode code point-spaced string indexing), indices may need to be translated accordingly (for example, JavaScript slices into UTF-16 code units instead of Unicode code points).
+ """
+
+ start: int
+ """
+ The zero-based start index of the half-open span of Unicode code points in the
+ input text.
+ """
+
+ end: int
+ """
+ The zero-based end index of the half-open span (i.e., the end is exclusive) of
+ Unicode code points in the input text.
+ """
+
+
+class SegmentCode(BaseModel):
+ """A zero-based, half-open span into the Unicode code point space of input text.
+
+ All spans are globally laminar and well-nested similar to XML—it is impossible for any two spans to partially overlap; they can only be disjoint, adjacent, or wholly nested. Spans of the exact same type (e.g., segments) will never be duplicated.
+
+ A span cannot be empty and will never start or end at whitespace.
+
+ Note that, when using programming languages other than Python (which uses zero-based, half-open, Unicode code point-spaced string indexing), indices may need to be translated accordingly (for example, JavaScript slices into UTF-16 code units instead of Unicode code points).
+ """
+
+ start: int
+ """
+ The zero-based start index of the half-open span of Unicode code points in the
+ input text.
+ """
+
+ end: int
+ """
+ The zero-based end index of the half-open span (i.e., the end is exclusive) of
+ Unicode code points in the input text.
+ """
+
+
+class SegmentTitle(BaseModel):
+ """A zero-based, half-open span into the Unicode code point space of input text.
+
+ All spans are globally laminar and well-nested similar to XML—it is impossible for any two spans to partially overlap; they can only be disjoint, adjacent, or wholly nested. Spans of the exact same type (e.g., segments) will never be duplicated.
+
+ A span cannot be empty and will never start or end at whitespace.
+
+ Note that, when using programming languages other than Python (which uses zero-based, half-open, Unicode code point-spaced string indexing), indices may need to be translated accordingly (for example, JavaScript slices into UTF-16 code units instead of Unicode code points).
+ """
+
+ start: int
+ """
+ The zero-based start index of the half-open span of Unicode code points in the
+ input text.
+ """
+
+ end: int
+ """
+ The zero-based end index of the half-open span (i.e., the end is exclusive) of
+ Unicode code points in the input text.
+ """
+
+
+class SegmentSpan(BaseModel):
+ """A zero-based, half-open span into the Unicode code point space of input text.
+
+ All spans are globally laminar and well-nested similar to XML—it is impossible for any two spans to partially overlap; they can only be disjoint, adjacent, or wholly nested. Spans of the exact same type (e.g., segments) will never be duplicated.
+
+ A span cannot be empty and will never start or end at whitespace.
+
+ Note that, when using programming languages other than Python (which uses zero-based, half-open, Unicode code point-spaced string indexing), indices may need to be translated accordingly (for example, JavaScript slices into UTF-16 code units instead of Unicode code points).
+ """
+
+ start: int
+ """
+ The zero-based start index of the half-open span of Unicode code points in the
+ input text.
+ """
+
+ end: int
+ """
+ The zero-based end index of the half-open span (i.e., the end is exclusive) of
+ Unicode code points in the input text.
+ """
+
+
+class Segment(BaseModel):
+ """
+ A segment within the document representing a structurally distinct portion of the document's content.
+ """
+
+ id: str
+ """
+ The unique identifier of the segment in the format `seg:{index}` where `{index}`
+ is a non-negative incrementing integer starting from zero.
+ """
+
+ kind: Literal["container", "unit", "item", "figure"]
+ """
+ The structural 'kind' of the segment, being one of `container`, `unit`, `item`,
+ or `figure`.
+
+ A `container` is a structural or semantic grouping of content such as a chapter.
+ It can contain segments of any kind or none at all.
+
+ A `unit` is a single syntactically independent unit of text such as a paragraph.
+ It can only contain `item`s and `figure`s.
+
+ An `item` is a syntactically subordinate unit of text such as an item in a
+ run-in list. It can only contain other `item`s. Note that an `item` is
+ conceptually distinct from a list item—it is perfectly possible to encounter
+ list items that are syntactically independent of their surrounding items just as
+ it is possible to encounter dependent clauses that do not appear as part of a
+ list.
+
+ A `figure` is a visually structured or tabular unit of content such as a
+ diagram, equation, or table. It cannot contain segments.
+ """
+
+ type: Optional[
+ Literal[
+ "title",
+ "book",
+ "part",
+ "chapter",
+ "subchapter",
+ "division",
+ "subdivision",
+ "subpart",
+ "subtitle",
+ "table_of_contents",
+ "article",
+ "section",
+ "regulation",
+ "rule",
+ "clause",
+ "paragraph",
+ "subarticle",
+ "subsection",
+ "subregulation",
+ "subrule",
+ "subclause",
+ "subparagraph",
+ "item",
+ "subitem",
+ "point",
+ "indent",
+ "schedule",
+ "annex",
+ "appendix",
+ "exhibit",
+ "recital",
+ "signature",
+ "note",
+ "figure",
+ "table",
+ "formula",
+ ]
+ ] = None
+ """
+ The addressable 'type' of the segment within the document's referential scheme
+ and hierarchy, whether defined explicitly (e.g., by headings, such as
+ 'Section 2. Definitions'), implicitly (e.g., by way of reference, such as 'as
+ defined in Section 2'), or by convention (e.g., [42] in a judgment often denotes
+ a `paragraph`, independent provisions in statute are often `section`s, etc.). If
+ the type is not known or not applicable, it will be set to `null`.
+
+ Note that, although many segment types may coincide with syntactic constructs,
+ they should be thought of purely as distinct formal citable units. Most
+ paragraphs (in the syntactic sense) will not have the `paragraph` type, for
+ example. That type is reserved for segments that would formally be cited as a
+ 'Paragraph' within the document's referential scheme.
+
+ The following types are currently supported: `title`, `book`, `part`, `chapter`,
+ `subchapter`, `division`, `subdivision`, `subpart`, `subtitle`,
+ `table_of_contents`, `article`, `section`, `regulation`, `rule`, `clause`,
+ `paragraph`, `subarticle`, `subsection`, `subregulation`, `subrule`,
+ `subclause`, `subparagraph`, `item`, `subitem`, `point`, `indent`, `schedule`,
+ `annex`, `appendix`, `exhibit`, `recital`, `signature`, `note`, `figure`,
+ `table`, and `formula`.
+
+ The `title`, `book`, `part`, `chapter`, `subchapter`, `division`, `subdivision`,
+ `subpart`, `subtitle`, and `table_of_contents` types are exclusive to the
+ `container` kind.
+
+ The `figure` kind only supports the `figure`, `table`, and `formula` types, all
+ of which are exclusive to it.
+ """
+
+ category: Literal["front_matter", "scope", "main", "annotation", "back_matter", "other"]
+ """
+ The functional 'category' of the segment within the document, being one of
+ `front_matter`, `scope`, `main`, `annotation`, `back_matter`, or `other`.
+
+ `front_matter` denotes non-operative contextualizing content occurring at the
+ start of a document such as a preamble or recitals.
+
+ `scope` denotes operative content defining the application or interpretation of
+ a document such as definition sections and governing law clauses.
+
+ `main` denotes operative, non-scopal content.
+
+ `annotation` denotes non-operative annotative content providing explanatory or
+ referential information such as commentary, footnotes, and endnotes.
+
+ `back_matter` denotes non-operative contextualizing content occurring at the end
+ of a document such as authority statements.
+
+ `other` denotes content that does not fit into any of the other categories.
+ """
+
+ type_name: Optional[SegmentTypeName] = None
+ """A zero-based, half-open span into the Unicode code point space of input text.
+
+ All spans are globally laminar and well-nested similar to XML—it is impossible
+ for any two spans to partially overlap; they can only be disjoint, adjacent, or
+ wholly nested. Spans of the exact same type (e.g., segments) will never be
+ duplicated.
+
+ A span cannot be empty and will never start or end at whitespace.
+
+ Note that, when using programming languages other than Python (which uses
+ zero-based, half-open, Unicode code point-spaced string indexing), indices may
+ need to be translated accordingly (for example, JavaScript slices into UTF-16
+ code units instead of Unicode code points).
+ """
+
+ code: Optional[SegmentCode] = None
+ """A zero-based, half-open span into the Unicode code point space of input text.
+
+ All spans are globally laminar and well-nested similar to XML—it is impossible
+ for any two spans to partially overlap; they can only be disjoint, adjacent, or
+ wholly nested. Spans of the exact same type (e.g., segments) will never be
+ duplicated.
+
+ A span cannot be empty and will never start or end at whitespace.
+
+ Note that, when using programming languages other than Python (which uses
+ zero-based, half-open, Unicode code point-spaced string indexing), indices may
+ need to be translated accordingly (for example, JavaScript slices into UTF-16
+ code units instead of Unicode code points).
+ """
+
+ title: Optional[SegmentTitle] = None
+ """A zero-based, half-open span into the Unicode code point space of input text.
+
+ All spans are globally laminar and well-nested similar to XML—it is impossible
+ for any two spans to partially overlap; they can only be disjoint, adjacent, or
+ wholly nested. Spans of the exact same type (e.g., segments) will never be
+ duplicated.
+
+ A span cannot be empty and will never start or end at whitespace.
+
+ Note that, when using programming languages other than Python (which uses
+ zero-based, half-open, Unicode code point-spaced string indexing), indices may
+ need to be translated accordingly (for example, JavaScript slices into UTF-16
+ code units instead of Unicode code points).
+ """
+
+ parent: Optional[str] = None
+ """
+ A unique identifier for a segment in the format `seg:{index}` where `{index}` is
+ a non-negative incrementing integer starting from zero.
+ """
+
+ span: SegmentSpan
+ """A zero-based, half-open span into the Unicode code point space of input text.
+
+ All spans are globally laminar and well-nested similar to XML—it is impossible
+ for any two spans to partially overlap; they can only be disjoint, adjacent, or
+ wholly nested. Spans of the exact same type (e.g., segments) will never be
+ duplicated.
+
+ A span cannot be empty and will never start or end at whitespace.
+
+ Note that, when using programming languages other than Python (which uses
+ zero-based, half-open, Unicode code point-spaced string indexing), indices may
+ need to be translated accordingly (for example, JavaScript slices into UTF-16
+ code units instead of Unicode code points).
+ """
+
+
+class CrossreferenceSpan(BaseModel):
+ """A zero-based, half-open span into the Unicode code point space of input text.
+
+ All spans are globally laminar and well-nested similar to XML—it is impossible for any two spans to partially overlap; they can only be disjoint, adjacent, or wholly nested. Spans of the exact same type (e.g., segments) will never be duplicated.
+
+ A span cannot be empty and will never start or end at whitespace.
+
+ Note that, when using programming languages other than Python (which uses zero-based, half-open, Unicode code point-spaced string indexing), indices may need to be translated accordingly (for example, JavaScript slices into UTF-16 code units instead of Unicode code points).
+ """
+
+ start: int
+ """
+ The zero-based start index of the half-open span of Unicode code points in the
+ input text.
+ """
+
+ end: int
+ """
+ The zero-based end index of the half-open span (i.e., the end is exclusive) of
+ Unicode code points in the input text.
+ """
+
+
+class Crossreference(BaseModel):
+ """A cross-reference within the document pointing to one or more segments."""
+
+ start: str
+ """
+ The unique identifier of the earliest segment in the span of segments being
+ cross-referenced with ties broken in favor of the least-nested (i.e., largest)
+ segment. If the cross-reference points to a single segment, `start` and `end`
+ will be identical.
+ """
+
+ end: str
+ """
+ The unique identifier of the latest segment in the span of segments being
+ cross-referenced with ties broken in favor of the least-nested (i.e., largest)
+ segment. If the cross-reference points to a single segment, `start` and `end`
+ will be identical.
+ """
+
+ span: CrossreferenceSpan
+ """A zero-based, half-open span into the Unicode code point space of input text.
+
+ All spans are globally laminar and well-nested similar to XML—it is impossible
+ for any two spans to partially overlap; they can only be disjoint, adjacent, or
+ wholly nested. Spans of the exact same type (e.g., segments) will never be
+ duplicated.
+
+ A span cannot be empty and will never start or end at whitespace.
+
+ Note that, when using programming languages other than Python (which uses
+ zero-based, half-open, Unicode code point-spaced string indexing), indices may
+ need to be translated accordingly (for example, JavaScript slices into UTF-16
+ code units instead of Unicode code points).
+ """
+
+
+class LocationName(BaseModel):
+ """A zero-based, half-open span into the Unicode code point space of input text.
+
+ All spans are globally laminar and well-nested similar to XML—it is impossible for any two spans to partially overlap; they can only be disjoint, adjacent, or wholly nested. Spans of the exact same type (e.g., segments) will never be duplicated.
+
+ A span cannot be empty and will never start or end at whitespace.
+
+ Note that, when using programming languages other than Python (which uses zero-based, half-open, Unicode code point-spaced string indexing), indices may need to be translated accordingly (for example, JavaScript slices into UTF-16 code units instead of Unicode code points).
+ """
+
+ start: int
+ """
+ The zero-based start index of the half-open span of Unicode code points in the
+ input text.
+ """
+
+ end: int
+ """
+ The zero-based end index of the half-open span (i.e., the end is exclusive) of
+ Unicode code points in the input text.
+ """
+
+
+class LocationMention(BaseModel):
+ """A zero-based, half-open span into the Unicode code point space of input text.
+
+ All spans are globally laminar and well-nested similar to XML—it is impossible for any two spans to partially overlap; they can only be disjoint, adjacent, or wholly nested. Spans of the exact same type (e.g., segments) will never be duplicated.
+
+ A span cannot be empty and will never start or end at whitespace.
+
+ Note that, when using programming languages other than Python (which uses zero-based, half-open, Unicode code point-spaced string indexing), indices may need to be translated accordingly (for example, JavaScript slices into UTF-16 code units instead of Unicode code points).
+ """
+
+ start: int
+ """
+ The zero-based start index of the half-open span of Unicode code points in the
+ input text.
+ """
+
+ end: int
+ """
+ The zero-based end index of the half-open span (i.e., the end is exclusive) of
+ Unicode code points in the input text.
+ """
+
+
+class Location(BaseModel):
+ """A location identified within a document."""
+
+ id: str
+ """
+ The unique identifier of the location in the format `loc:{index}` where
+ `{index}` is a non-negative incrementing integer starting from zero.
+ """
+
+ name: LocationName
+ """A zero-based, half-open span into the Unicode code point space of input text.
+
+ All spans are globally laminar and well-nested similar to XML—it is impossible
+ for any two spans to partially overlap; they can only be disjoint, adjacent, or
+ wholly nested. Spans of the exact same type (e.g., segments) will never be
+ duplicated.
+
+ A span cannot be empty and will never start or end at whitespace.
+
+ Note that, when using programming languages other than Python (which uses
+ zero-based, half-open, Unicode code point-spaced string indexing), indices may
+ need to be translated accordingly (for example, JavaScript slices into UTF-16
+ code units instead of Unicode code points).
+ """
+
+ type: Literal["country", "state", "city", "address", "other"]
+ """
+ The type of the location, being one of `country`, `state`, `city`, `address`, or
+ `other`.
+ """
+
+ parent: Optional[str] = None
+ """
+ A unique identifier for a location in the format `loc:{index}` where `{index}`
+ is a non-negative incrementing integer starting from zero.
+ """
+
+ mentions: List[LocationMention]
+ """
+ An array of one or more spans within the document's text where the location is
+ mentioned.
+ """
+
+
+class PersonName(BaseModel):
+ """A zero-based, half-open span into the Unicode code point space of input text.
+
+ All spans are globally laminar and well-nested similar to XML—it is impossible for any two spans to partially overlap; they can only be disjoint, adjacent, or wholly nested. Spans of the exact same type (e.g., segments) will never be duplicated.
+
+ A span cannot be empty and will never start or end at whitespace.
+
+ Note that, when using programming languages other than Python (which uses zero-based, half-open, Unicode code point-spaced string indexing), indices may need to be translated accordingly (for example, JavaScript slices into UTF-16 code units instead of Unicode code points).
+ """
+
+ start: int
+ """
+ The zero-based start index of the half-open span of Unicode code points in the
+ input text.
+ """
+
+ end: int
+ """
+ The zero-based end index of the half-open span (i.e., the end is exclusive) of
+ Unicode code points in the input text.
+ """
+
+
+class PersonMention(BaseModel):
+ """A zero-based, half-open span into the Unicode code point space of input text.
+
+ All spans are globally laminar and well-nested similar to XML—it is impossible for any two spans to partially overlap; they can only be disjoint, adjacent, or wholly nested. Spans of the exact same type (e.g., segments) will never be duplicated.
+
+ A span cannot be empty and will never start or end at whitespace.
+
+ Note that, when using programming languages other than Python (which uses zero-based, half-open, Unicode code point-spaced string indexing), indices may need to be translated accordingly (for example, JavaScript slices into UTF-16 code units instead of Unicode code points).
+ """
+
+ start: int
+ """
+ The zero-based start index of the half-open span of Unicode code points in the
+ input text.
+ """
+
+ end: int
+ """
+ The zero-based end index of the half-open span (i.e., the end is exclusive) of
+ Unicode code points in the input text.
+ """
+
+
+class Person(BaseModel):
+ """A legal person identified in a document."""
+
+ id: str
+ """
+ The unique identifier of the person in the format `per:{index}` where `{index}`
+ is a non-negative incrementing integer starting from zero.
+ """
+
+ name: PersonName
+ """A zero-based, half-open span into the Unicode code point space of input text.
+
+ All spans are globally laminar and well-nested similar to XML—it is impossible
+ for any two spans to partially overlap; they can only be disjoint, adjacent, or
+ wholly nested. Spans of the exact same type (e.g., segments) will never be
+ duplicated.
+
+ A span cannot be empty and will never start or end at whitespace.
+
+ Note that, when using programming languages other than Python (which uses
+ zero-based, half-open, Unicode code point-spaced string indexing), indices may
+ need to be translated accordingly (for example, JavaScript slices into UTF-16
+ code units instead of Unicode code points).
+ """
+
+ type: Literal["natural", "corporate", "politic"]
+ """
+ The legal entity type of the person, being one of `natural`, `corporate`, or
+ `politic`.
+
+ `natural` denotes a human being in their capacity as a natural legal person,
+ including when representing unincorporated entities such as partnerships and
+ trusts.
+
+ `corporate` denotes a body corporate such as a company, incorporated
+ partnership, or statutory corporation.
+
+ `politic` denotes a body politic such as a court, state, government, or
+ intergovernmental organization.
+ """
+
+ role: Literal[
+ "plaintiff",
+ "petitioner",
+ "applicant",
+ "appellant",
+ "appellee",
+ "claimant",
+ "complainant",
+ "defendant",
+ "respondent",
+ "prior_authority",
+ "prosecutor",
+ "defense_counsel",
+ "amicus",
+ "intervener",
+ "borrower",
+ "lender",
+ "guarantor",
+ "lessee",
+ "lessor",
+ "employer",
+ "employee",
+ "licensor",
+ "licensee",
+ "franchisor",
+ "franchisee",
+ "buyer",
+ "seller",
+ "contractor",
+ "shareholder",
+ "joint_venturer",
+ "investor",
+ "insurer",
+ "insured",
+ "enacting_authority",
+ "empowered_authority",
+ "settlor",
+ "trustee",
+ "beneficiary",
+ "debater",
+ "director",
+ "governing_jurisdiction",
+ "clerk",
+ "witness",
+ "other",
+ "non_party",
+ ]
+ """The role of the person in relation to the subject of the document.
+
+ The following roles are currently supported: | | | | ------------------------ |
+ ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+ | | `plaintiff` | A party initiating the case that is the subject of the
+ document. | | `petitioner` | A party initiating the petition that is the subject
+ of the document. | | `applicant` | A party initiating the application that is
+ the subject of the document. | | `appellant` | A party appealing the decision
+ that is the subject of the document. | | `appellee` | A party responding to the
+ appeal that is the subject of the document if they are explicitly referred to as
+ an 'appellee'. | | `claimant` | A party making a claim in the case that is the
+ subject of the document. | | `complainant` | A party making a complaint in the
+ case that is the subject of the document. | | `defendant` | A party defending
+ against the case that is the subject of the document. | | `respondent` | A party
+ responding to the petition, appeal, or application that is the subject of the
+ document. | | `prior_authority` | An authority (e.g., judge, tribunal, court)
+ that made a prior decision in the case that is the subject of the document. Both
+ individual judges and courts should be annotated with this role where
+ applicable. This is not to be used for authorities cited as precedent, only for
+ those that made prior decisions in the same case. | | `prosecutor` | A lawyer
+ prosecuting the case that is the subject of the document. | | `defense_counsel`
+ | A lawyer defending the case that is the subject of the document. | | `amicus`
+ | A party filing an amicus curiae brief in the case that is the subject of the
+ document. | | `intervener` | A party attempting to or that has intervened in the
+ case that is the subject of the document. | | `borrower` | A party borrowing
+ money or other assets under the agreement that is the subject of the document,
+ including 'mortgagors' and 'debtors'. | | `lender` | A party lending money or
+ other assets under the agreement that is the subject of the document, including
+ 'mortgagees' and 'creditors'. | | `guarantor` | A party guaranteeing obligations
+ under the agreement that is the subject of the document, including 'sureties'. |
+ | `lessee` | A party leasing goods or services under the agreement that is the
+ subject of the document, including 'tenants'. | | `lessor` | A party leasing
+ goods or services under the agreement that is the subject of the document,
+ including 'landlords'. | | `employer` | A party employing personnel under the
+ agreement that is the subject of the document. | | `employee` | A party employed
+ under the agreement that is the subject of the document. | | `licensor` | A
+ party licensing intellectual property or other rights under the agreement that
+ are the subject of the document. | | `licensee` | A party licensed to use
+ intellectual property or other rights under the agreement that are the subject
+ of the document. | | `franchisor` | A party granting a franchise under the
+ agreement that is the subject of the document. | | `franchisee` | A party
+ granted a franchise under the agreement that is the subject of the document. | |
+ `buyer` | A party purchasing goods or services under the agreement that is the
+ subject of the document, including 'purchasers', 'customers', and 'clients'. | |
+ `seller` | A party selling or providing goods or services under the agreement
+ that is the subject of the document, including 'Vendors', 'Suppliers', and
+ 'Service Providers' (where such parties are actually providing goods or services
+ under the agreement). | | `contractor` | A party contracted to perform work or
+ services under the agreement that is the subject of the document, including
+ 'consultants'. | | `shareholder` | A party holding shares or equity under the
+ agreement that is the subject of the document. | | `joint_venturer` | A party
+ participating in a joint venture under the agreement that is the subject of the
+ document. | | `investor` | A party investing money or assets under the agreement
+ that is the subject of the document. | | `insurer` | A party providing insurance
+ under the agreement that is the subject of the document. | | `insured` | A party
+ insured under the agreement that is the subject of the document. | | `settlor` |
+ A party establishing the trust that is the subject of the document. | |
+ `trustee` | A party managing the trust that is the subject of the document. | |
+ `beneficiary` | A party benefiting from the trust that is the subject of the
+ document. | | `enacting_authority` | An authority (e.g., legislature, regulator,
+ Minister/Secretary, President/Prime Minister, tribunal, court, judge) giving
+ legal effect to or authorizing the document. All relevant individuals and bodies
+ should be annotated with this role where applicable. | | `empowered_authority` |
+ An authority (e.g., government agency, regulator, Minister/Secretary,
+ President/Prime Minister, tribunal, court) empowered by the document to carry
+ out functions or duties. | | `debater` | A person participating in the debate
+ that is the subject of the document. | | `governing_jurisdiction` | The
+ jurisdiction whose laws govern the document. | | `director` | A director or
+ other officer of a corporate legal person mentioned in the document. | | `clerk`
+ | A clerk, notary, or other official certifying, witnessing, filing, recording,
+ registering, or otherwise administering the document. | | `witness` | A witness
+ witnessing the signing of the document, or whose testimony is part of the case
+ that is the subject of the document. | | `other` | A party to the case,
+ agreement, legislation, or regulation that is the subject of the document that
+ does not fit into any of the other roles. | | `non_party` | A legal person
+ mentioned in the document that is not a party to the case, agreement,
+ legislation, or regulation that is the subject of the document. |
+ """
+
+ parent: Optional[str] = None
+ """
+ A unique identifier for a legal person in the format `per:{index}` where
+ `{index}` is a non-negative incrementing integer starting from zero.
+ """
+
+ residence: Optional[str] = None
+ """
+ A unique identifier for a location in the format `loc:{index}` where `{index}`
+ is a non-negative incrementing integer starting from zero.
+ """
+
+ mentions: List[PersonMention]
+ """
+ An array of one or more spans within the document's text where the person is
+ mentioned.
+ """
+
+
+class EmailMention(BaseModel):
+ """A zero-based, half-open span into the Unicode code point space of input text.
+
+ All spans are globally laminar and well-nested similar to XML—it is impossible for any two spans to partially overlap; they can only be disjoint, adjacent, or wholly nested. Spans of the exact same type (e.g., segments) will never be duplicated.
+
+ A span cannot be empty and will never start or end at whitespace.
+
+ Note that, when using programming languages other than Python (which uses zero-based, half-open, Unicode code point-spaced string indexing), indices may need to be translated accordingly (for example, JavaScript slices into UTF-16 code units instead of Unicode code points).
+ """
+
+ start: int
+ """
+ The zero-based start index of the half-open span of Unicode code points in the
+ input text.
+ """
+
+ end: int
+ """
+ The zero-based end index of the half-open span (i.e., the end is exclusive) of
+ Unicode code points in the input text.
+ """
+
+
+class Email(BaseModel):
+ """An email address identified in a document belonging to a legal person.
+
+ If an email address was mentioned in the document but is not attributable to a legal person, it will not be extracted.
+ """
+
+ address: str
+ """The normalized email address."""
+
+ person: str
+ """The unique identifier of the person that this email address belongs to."""
+
+ mentions: List[EmailMention]
+ """
+ An array of one or more spans within the document's text where the email address
+ is mentioned.
+ """
+
+
+class WebsiteMention(BaseModel):
+ """A zero-based, half-open span into the Unicode code point space of input text.
+
+ All spans are globally laminar and well-nested similar to XML—it is impossible for any two spans to partially overlap; they can only be disjoint, adjacent, or wholly nested. Spans of the exact same type (e.g., segments) will never be duplicated.
+
+ A span cannot be empty and will never start or end at whitespace.
+
+ Note that, when using programming languages other than Python (which uses zero-based, half-open, Unicode code point-spaced string indexing), indices may need to be translated accordingly (for example, JavaScript slices into UTF-16 code units instead of Unicode code points).
+ """
+
+ start: int
+ """
+ The zero-based start index of the half-open span of Unicode code points in the
+ input text.
+ """
+
+ end: int
+ """
+ The zero-based end index of the half-open span (i.e., the end is exclusive) of
+ Unicode code points in the input text.
+ """
+
+
+class Website(BaseModel):
+ """A website identified in a document belonging to a legal person.
+
+ If a website was mentioned in the document but is not attributable to a legal person, it will not be extracted.
+ """
+
+ url: str
+ """The normalized URL of the website in the form `https://{host}/`."""
+
+ person: str
+ """The unique identifier of the person that this website belongs to."""
+
+ mentions: List[WebsiteMention]
+ """
+ An array of one or more spans within the document's text where the website is
+ mentioned (including paths and slugs which are not part of the website's
+ normalized URL).
+ """
+
+
+class PhoneNumberMention(BaseModel):
+ """A zero-based, half-open span into the Unicode code point space of input text.
+
+ All spans are globally laminar and well-nested similar to XML—it is impossible for any two spans to partially overlap; they can only be disjoint, adjacent, or wholly nested. Spans of the exact same type (e.g., segments) will never be duplicated.
+
+ A span cannot be empty and will never start or end at whitespace.
+
+ Note that, when using programming languages other than Python (which uses zero-based, half-open, Unicode code point-spaced string indexing), indices may need to be translated accordingly (for example, JavaScript slices into UTF-16 code units instead of Unicode code points).
+ """
+
+ start: int
+ """
+ The zero-based start index of the half-open span of Unicode code points in the
+ input text.
+ """
+
+ end: int
+ """
+ The zero-based end index of the half-open span (i.e., the end is exclusive) of
+ Unicode code points in the input text.
+ """
+
+
+class PhoneNumber(BaseModel):
+ """A valid phone number identified in a document belonging to a legal person.
+
+ If a phone number was mentioned in the document but is not valid, possible, or attributable to a legal person, it will not be extracted.
+ """
+
+ number: str
+ """
+ The normalized phone number in E.123 international notation conforming with
+ local conventions on the use of spaces and hyphens as separators.
+ """
+
+ person: str
+ """The unique identifier of the person that this phone number belongs to."""
+
+ mentions: List[PhoneNumberMention]
+ """
+ An array of one or more spans within the document's text where the phone number
+ is mentioned.
+ """
+
+
+class IDNumberMention(BaseModel):
+ """A zero-based, half-open span into the Unicode code point space of input text.
+
+ All spans are globally laminar and well-nested similar to XML—it is impossible for any two spans to partially overlap; they can only be disjoint, adjacent, or wholly nested. Spans of the exact same type (e.g., segments) will never be duplicated.
+
+ A span cannot be empty and will never start or end at whitespace.
+
+ Note that, when using programming languages other than Python (which uses zero-based, half-open, Unicode code point-spaced string indexing), indices may need to be translated accordingly (for example, JavaScript slices into UTF-16 code units instead of Unicode code points).
+ """
+
+ start: int
+ """
+ The zero-based start index of the half-open span of Unicode code points in the
+ input text.
+ """
+
+ end: int
+ """
+ The zero-based end index of the half-open span (i.e., the end is exclusive) of
+ Unicode code points in the input text.
+ """
+
+
+class IDNumber(BaseModel):
+ """An identification number mentioned in a document belonging to a legal person.
+
+ If an identification number was mentioned in the document but is not attributable to a legal person, it will not be extracted.
+ """
+
+ number: str
+ """The identification number."""
+
+ person: str
+ """The unique identifier of the person that this identification number belongs to."""
+
+ mentions: List[IDNumberMention]
+ """
+ An array of one or more spans within the document's text where the
+ identification number is mentioned.
+ """
+
+
+class TermName(BaseModel):
+ """A zero-based, half-open span into the Unicode code point space of input text.
+
+ All spans are globally laminar and well-nested similar to XML—it is impossible for any two spans to partially overlap; they can only be disjoint, adjacent, or wholly nested. Spans of the exact same type (e.g., segments) will never be duplicated.
+
+ A span cannot be empty and will never start or end at whitespace.
+
+ Note that, when using programming languages other than Python (which uses zero-based, half-open, Unicode code point-spaced string indexing), indices may need to be translated accordingly (for example, JavaScript slices into UTF-16 code units instead of Unicode code points).
+ """
+
+ start: int
+ """
+ The zero-based start index of the half-open span of Unicode code points in the
+ input text.
+ """
+
+ end: int
+ """
+ The zero-based end index of the half-open span (i.e., the end is exclusive) of
+ Unicode code points in the input text.
+ """
+
+
+class TermMeaning(BaseModel):
+ """A zero-based, half-open span into the Unicode code point space of input text.
+
+ All spans are globally laminar and well-nested similar to XML—it is impossible for any two spans to partially overlap; they can only be disjoint, adjacent, or wholly nested. Spans of the exact same type (e.g., segments) will never be duplicated.
+
+ A span cannot be empty and will never start or end at whitespace.
+
+ Note that, when using programming languages other than Python (which uses zero-based, half-open, Unicode code point-spaced string indexing), indices may need to be translated accordingly (for example, JavaScript slices into UTF-16 code units instead of Unicode code points).
+ """
+
+ start: int
+ """
+ The zero-based start index of the half-open span of Unicode code points in the
+ input text.
+ """
+
+ end: int
+ """
+ The zero-based end index of the half-open span (i.e., the end is exclusive) of
+ Unicode code points in the input text.
+ """
+
+
+class TermMention(BaseModel):
+ """A zero-based, half-open span into the Unicode code point space of input text.
+
+ All spans are globally laminar and well-nested similar to XML—it is impossible for any two spans to partially overlap; they can only be disjoint, adjacent, or wholly nested. Spans of the exact same type (e.g., segments) will never be duplicated.
+
+ A span cannot be empty and will never start or end at whitespace.
+
+ Note that, when using programming languages other than Python (which uses zero-based, half-open, Unicode code point-spaced string indexing), indices may need to be translated accordingly (for example, JavaScript slices into UTF-16 code units instead of Unicode code points).
+ """
+
+ start: int
+ """
+ The zero-based start index of the half-open span of Unicode code points in the
+ input text.
+ """
+
+ end: int
+ """
+ The zero-based end index of the half-open span (i.e., the end is exclusive) of
+ Unicode code points in the input text.
+ """
+
+
+class Term(BaseModel):
+ """A term assigned a definite meaning within a document."""
+
+ id: str
+ """
+ The unique identifier of the term in the format `term:{index}` where `{index}`
+ is a non-negative incrementing integer starting from zero.
+ """
+
+ name: TermName
+ """A zero-based, half-open span into the Unicode code point space of input text.
+
+ All spans are globally laminar and well-nested similar to XML—it is impossible
+ for any two spans to partially overlap; they can only be disjoint, adjacent, or
+ wholly nested. Spans of the exact same type (e.g., segments) will never be
+ duplicated.
+
+ A span cannot be empty and will never start or end at whitespace.
+
+ Note that, when using programming languages other than Python (which uses
+ zero-based, half-open, Unicode code point-spaced string indexing), indices may
+ need to be translated accordingly (for example, JavaScript slices into UTF-16
+ code units instead of Unicode code points).
+ """
+
+ meaning: TermMeaning
+ """A zero-based, half-open span into the Unicode code point space of input text.
+
+ All spans are globally laminar and well-nested similar to XML—it is impossible
+ for any two spans to partially overlap; they can only be disjoint, adjacent, or
+ wholly nested. Spans of the exact same type (e.g., segments) will never be
+ duplicated.
+
+ A span cannot be empty and will never start or end at whitespace.
+
+ Note that, when using programming languages other than Python (which uses
+ zero-based, half-open, Unicode code point-spaced string indexing), indices may
+ need to be translated accordingly (for example, JavaScript slices into UTF-16
+ code units instead of Unicode code points).
+ """
+
+ mentions: List[TermMention]
+ """
+ An array of spans within the document's text where the term is mentioned outside
+ of its definition.
+
+ It is possible for the term to have no mentions if, outside of its definition,
+ it is never referred to in the document.
+ """
+
+
+class ExternalDocumentName(BaseModel):
+ """A zero-based, half-open span into the Unicode code point space of input text.
+
+ All spans are globally laminar and well-nested similar to XML—it is impossible for any two spans to partially overlap; they can only be disjoint, adjacent, or wholly nested. Spans of the exact same type (e.g., segments) will never be duplicated.
+
+ A span cannot be empty and will never start or end at whitespace.
+
+ Note that, when using programming languages other than Python (which uses zero-based, half-open, Unicode code point-spaced string indexing), indices may need to be translated accordingly (for example, JavaScript slices into UTF-16 code units instead of Unicode code points).
+ """
+
+ start: int
+ """
+ The zero-based start index of the half-open span of Unicode code points in the
+ input text.
+ """
+
+ end: int
+ """
+ The zero-based end index of the half-open span (i.e., the end is exclusive) of
+ Unicode code points in the input text.
+ """
+
+
+class ExternalDocumentMention(BaseModel):
+ """A zero-based, half-open span into the Unicode code point space of input text.
+
+ All spans are globally laminar and well-nested similar to XML—it is impossible for any two spans to partially overlap; they can only be disjoint, adjacent, or wholly nested. Spans of the exact same type (e.g., segments) will never be duplicated.
+
+ A span cannot be empty and will never start or end at whitespace.
+
+ Note that, when using programming languages other than Python (which uses zero-based, half-open, Unicode code point-spaced string indexing), indices may need to be translated accordingly (for example, JavaScript slices into UTF-16 code units instead of Unicode code points).
+ """
+
+ start: int
+ """
+ The zero-based start index of the half-open span of Unicode code points in the
+ input text.
+ """
+
+ end: int
+ """
+ The zero-based end index of the half-open span (i.e., the end is exclusive) of
+ Unicode code points in the input text.
+ """
+
+
+class ExternalDocumentPinpoint(BaseModel):
+ """A zero-based, half-open span into the Unicode code point space of input text.
+
+ All spans are globally laminar and well-nested similar to XML—it is impossible for any two spans to partially overlap; they can only be disjoint, adjacent, or wholly nested. Spans of the exact same type (e.g., segments) will never be duplicated.
+
+ A span cannot be empty and will never start or end at whitespace.
+
+ Note that, when using programming languages other than Python (which uses zero-based, half-open, Unicode code point-spaced string indexing), indices may need to be translated accordingly (for example, JavaScript slices into UTF-16 code units instead of Unicode code points).
+ """
+
+ start: int
+ """
+ The zero-based start index of the half-open span of Unicode code points in the
+ input text.
+ """
+
+ end: int
+ """
+ The zero-based end index of the half-open span (i.e., the end is exclusive) of
+ Unicode code points in the input text.
+ """
+
+
+class ExternalDocument(BaseModel):
+ """A document identified within another document."""
+
+ id: str
+ """
+ The unique identifier of the external document in the format `exd:{index}` where
+ `{index}` is a non-negative incrementing integer starting from zero.
+ """
+
+ name: ExternalDocumentName
+ """A zero-based, half-open span into the Unicode code point space of input text.
+
+ All spans are globally laminar and well-nested similar to XML—it is impossible
+ for any two spans to partially overlap; they can only be disjoint, adjacent, or
+ wholly nested. Spans of the exact same type (e.g., segments) will never be
+ duplicated.
+
+ A span cannot be empty and will never start or end at whitespace.
+
+ Note that, when using programming languages other than Python (which uses
+ zero-based, half-open, Unicode code point-spaced string indexing), indices may
+ need to be translated accordingly (for example, JavaScript slices into UTF-16
+ code units instead of Unicode code points).
+ """
+
+ type: Literal["statute", "regulation", "decision", "contract", "other"]
+ """
+ The type of the external document, being one of `statute`, `regulation`,
+ `decision`, `contract`, or `other`.
+
+ `statute` denotes primary legislation such as acts, bills, codes, and
+ constitutions.
+
+ `regulation` denotes secondary legislation such as rules, statutory instruments,
+ and ordinances.
+
+ `decision` denotes judicial or quasi-judicial decisions such as court judgments,
+ judicial opinions, and tribunal rulings.
+
+ `other` is used for all other types of legal documents that do not fit into any
+ of the predefined types.
+ """
+
+ jurisdiction: Optional[str] = None
+ """
+ A jurisdiction code representing a country (via an initial country code) and,
+ optionally, a subdivision within that country (via a subsequent subdivision code
+ prefixed by a hyphen).
+
+ All 249 ISO 3166-1 alpha-2 country codes are representable in addition to
+ special `INT` and `EU` codes for international and European Union law,
+ respectively.
+
+ All 5,046 ISO 3166-2 codes are also representable in addition to a special `FED`
+ code for federal law.
+ """
+
+ reception: Literal["positive", "mixed", "negative", "neutral"]
+ """
+ The sentiment of the document towards the external document, being one of
+ `positive`, `mixed`, `negative`, or `neutral`.
+
+ `positive` indicates that the document expresses a favorable view of the
+ external document whether by endorsing or approving it.
+
+ `mixed` indicates that the document expresses both favorable and unfavorable
+ views of the external document, for example, by affirming parts of it and
+ disapproving others.
+
+ `negative` indicates that the document expresses an unfavorable view of the
+ external document whether by criticizing, repealing, overruling, or explicitly
+ contradicting it.
+
+ `neutral` indicates that the document references the external document without
+ expressing any particular sentiment towards it.
+ """
+
+ mentions: List[ExternalDocumentMention]
+ """
+ An array of one or more spans within the document's text where the external
+ document is mentioned by name, for example, 'the US Constitution' in 'the Second
+ Amendment to the US Constitution protects freedom of speech'.
+ """
+
+ pinpoints: List[ExternalDocumentPinpoint]
+ """
+ An array of spans within the document's text where specific parts of the
+ external document are referenced, for example, 'Section 2' in 'as defined in
+ Section 2 of the US Constitution'.
+ """
+
+
+class QuoteSpan(BaseModel):
+ """A zero-based, half-open span into the Unicode code point space of input text.
+
+ All spans are globally laminar and well-nested similar to XML—it is impossible for any two spans to partially overlap; they can only be disjoint, adjacent, or wholly nested. Spans of the exact same type (e.g., segments) will never be duplicated.
+
+ A span cannot be empty and will never start or end at whitespace.
+
+ Note that, when using programming languages other than Python (which uses zero-based, half-open, Unicode code point-spaced string indexing), indices may need to be translated accordingly (for example, JavaScript slices into UTF-16 code units instead of Unicode code points).
+ """
+
+ start: int
+ """
+ The zero-based start index of the half-open span of Unicode code points in the
+ input text.
+ """
+
+ end: int
+ """
+ The zero-based end index of the half-open span (i.e., the end is exclusive) of
+ Unicode code points in the input text.
+ """
+
+
+class Quote(BaseModel):
+ """A quotation within a document."""
+
+ source_segment: Optional[str] = None
+ """
+ A unique identifier for a segment in the format `seg:{index}` where `{index}` is
+ a non-negative incrementing integer starting from zero.
+ """
+
+ source_document: Optional[str] = None
+ """
+ A unique identifier for an external document in the format `exd:{index}` where
+ `{index}` is a non-negative incrementing integer starting from zero.
+ """
+
+ source_person: Optional[str] = None
+ """
+ A unique identifier for a legal person in the format `per:{index}` where
+ `{index}` is a non-negative incrementing integer starting from zero.
+ """
+
+ amending: bool
+ """
+ Whether the quote is being used to amend or modify content, typically in other
+ documents.
+ """
+
+ span: QuoteSpan
+ """A zero-based, half-open span into the Unicode code point space of input text.
+
+ All spans are globally laminar and well-nested similar to XML—it is impossible
+ for any two spans to partially overlap; they can only be disjoint, adjacent, or
+ wholly nested. Spans of the exact same type (e.g., segments) will never be
+ duplicated.
+
+ A span cannot be empty and will never start or end at whitespace.
+
+ Note that, when using programming languages other than Python (which uses
+ zero-based, half-open, Unicode code point-spaced string indexing), indices may
+ need to be translated accordingly (for example, JavaScript slices into UTF-16
+ code units instead of Unicode code points).
+ """
+
+
+class DateMention(BaseModel):
+ """A zero-based, half-open span into the Unicode code point space of input text.
+
+ All spans are globally laminar and well-nested similar to XML—it is impossible for any two spans to partially overlap; they can only be disjoint, adjacent, or wholly nested. Spans of the exact same type (e.g., segments) will never be duplicated.
+
+ A span cannot be empty and will never start or end at whitespace.
+
+ Note that, when using programming languages other than Python (which uses zero-based, half-open, Unicode code point-spaced string indexing), indices may need to be translated accordingly (for example, JavaScript slices into UTF-16 code units instead of Unicode code points).
+ """
+
+ start: int
+ """
+ The zero-based start index of the half-open span of Unicode code points in the
+ input text.
+ """
+
+ end: int
+ """
+ The zero-based end index of the half-open span (i.e., the end is exclusive) of
+ Unicode code points in the input text.
+ """
+
+
+class Date(BaseModel):
+ """
+ A date identified in a document belonging to one of the following types: `creation`, `signature`, `effective`, `expiry`, `delivery`, `renewal`, `payment`, `birth`, or `death`.
+
+ Only Gregorian dates between the years 1000 and 9999 (inclusive) fitting into one of the supported date types are extractable.
+ """
+
+ value: str
+ """The date in ISO 8601 format (YYYY-MM-DD)."""
+
+ type: Literal["creation", "signature", "effective", "expiry", "delivery", "renewal", "payment", "birth", "death"]
+ """
+ The type of the date, being one of `creation`, `signature`, `effective`,
+ `expiry`, `delivery`, `renewal`, `payment`, `birth`, or `death`. If a date is
+ mentioned in a document that does not fit into a supported type, it will not be
+ extracted.
+
+ `creation` denotes the date the document was created. There may only be one
+ `creation` date per document.
+
+ `signature` denotes the date the document was signed.
+
+ `effective` denotes the date when the document or a part thereof comes into
+ effect (e.g., commencement or enactment dates).
+
+ `expiry` denotes the date when the document or a part thereof is no longer in
+ effect.
+
+ `delivery` denotes the date when goods or services are to be delivered under the
+ document.
+
+ `renewal` denotes the date when one or more of the document's terms are to be
+ renewed.
+
+ `payment` denotes the date when payment is to be made under the document.
+
+ `birth` denotes the birth date of a natural person or establishment (e.g.,
+ incorporation) date of a non-natural legal person identified in the document.
+ There can only be one `birth` date linked to a single person and all `birth`
+ dates must be linked to a person. A person's `birth` date will never be after
+ their `death` date.
+
+ `death` denotes the death date of a natural person or dissolution date of a
+ non-natural legal person identified in the document. There can only be one
+ `death` date linked to a single person and all `death` dates must be linked to a
+ person. A person's `death` date will never be before their `birth` date.
+ """
+
+ person: Optional[str] = None
+ """
+ A unique identifier for a legal person in the format `per:{index}` where
+ `{index}` is a non-negative incrementing integer starting from zero.
+ """
+
+ mentions: List[DateMention]
+ """
+ An array of one or more spans within the document's text where the date is
+ mentioned.
+ """
+
+
+class Heading(BaseModel):
+ """A zero-based, half-open span into the Unicode code point space of input text.
+
+ All spans are globally laminar and well-nested similar to XML—it is impossible for any two spans to partially overlap; they can only be disjoint, adjacent, or wholly nested. Spans of the exact same type (e.g., segments) will never be duplicated.
+
+ A span cannot be empty and will never start or end at whitespace.
+
+ Note that, when using programming languages other than Python (which uses zero-based, half-open, Unicode code point-spaced string indexing), indices may need to be translated accordingly (for example, JavaScript slices into UTF-16 code units instead of Unicode code points).
+ """
+
+ start: int
+ """
+ The zero-based start index of the half-open span of Unicode code points in the
+ input text.
+ """
+
+ end: int
+ """
+ The zero-based end index of the half-open span (i.e., the end is exclusive) of
+ Unicode code points in the input text.
+ """
+
+
+class Junk(BaseModel):
+ """A zero-based, half-open span into the Unicode code point space of input text.
+
+ All spans are globally laminar and well-nested similar to XML—it is impossible for any two spans to partially overlap; they can only be disjoint, adjacent, or wholly nested. Spans of the exact same type (e.g., segments) will never be duplicated.
+
+ A span cannot be empty and will never start or end at whitespace.
+
+ Note that, when using programming languages other than Python (which uses zero-based, half-open, Unicode code point-spaced string indexing), indices may need to be translated accordingly (for example, JavaScript slices into UTF-16 code units instead of Unicode code points).
+ """
+
+ start: int
+ """
+ The zero-based start index of the half-open span of Unicode code points in the
+ input text.
+ """
+
+ end: int
+ """
+ The zero-based end index of the half-open span (i.e., the end is exclusive) of
+ Unicode code points in the input text.
+ """
+
+
+class ILGSv1Document(BaseModel):
+ """The enriched document."""
+
+ title: Optional[Title] = None
+ """A zero-based, half-open span into the Unicode code point space of input text.
+
+ All spans are globally laminar and well-nested similar to XML—it is impossible
+ for any two spans to partially overlap; they can only be disjoint, adjacent, or
+ wholly nested. Spans of the exact same type (e.g., segments) will never be
+ duplicated.
+
+ A span cannot be empty and will never start or end at whitespace.
+
+ Note that, when using programming languages other than Python (which uses
+ zero-based, half-open, Unicode code point-spaced string indexing), indices may
+ need to be translated accordingly (for example, JavaScript slices into UTF-16
+ code units instead of Unicode code points).
+ """
+
+ subtitle: Optional[Subtitle] = None
+ """A zero-based, half-open span into the Unicode code point space of input text.
+
+ All spans are globally laminar and well-nested similar to XML—it is impossible
+ for any two spans to partially overlap; they can only be disjoint, adjacent, or
+ wholly nested. Spans of the exact same type (e.g., segments) will never be
+ duplicated.
+
+ A span cannot be empty and will never start or end at whitespace.
+
+ Note that, when using programming languages other than Python (which uses
+ zero-based, half-open, Unicode code point-spaced string indexing), indices may
+ need to be translated accordingly (for example, JavaScript slices into UTF-16
+ code units instead of Unicode code points).
+ """
+
+ type: Literal["statute", "regulation", "decision", "contract", "other"]
+ """
+ The type of the document, being one of `statute`, `regulation`, `decision`,
+ `contract`, or `other`.
+
+ `statute` denotes primary legislation such as acts, bills, codes, and
+ constitutions.
+
+ `regulation` denotes secondary legislation such as rules, statutory instruments,
+ and ordinances.
+
+ `decision` denotes judicial or quasi-judicial decisions such as court judgments,
+ judicial opinions, and tribunal rulings.
+
+ `other` is used for all other types of legal documents that do not fit into any
+ of the predefined types.
+ """
+
+ jurisdiction: Optional[str] = None
+ """
+ A jurisdiction code representing a country (via an initial country code) and,
+ optionally, a subdivision within that country (via a subsequent subdivision code
+ prefixed by a hyphen).
+
+ All 249 ISO 3166-1 alpha-2 country codes are representable in addition to
+ special `INT` and `EU` codes for international and European Union law,
+ respectively.
+
+ All 5,046 ISO 3166-2 codes are also representable in addition to a special `FED`
+ code for federal law.
+ """
+
+ segments: List[Segment]
+ """
+ An array of segments within the document representing structurally distinct
+ portions of its content.
+ """
+
+ crossreferences: List[Crossreference]
+ """
+ An array of cross-references within the document pointing to a single segment or
+ a span of segments.
+ """
+
+ locations: List[Location]
+ """An array of locations identified in the document."""
+
+ persons: List[Person]
+ """An array of legal persons identified in the document."""
+
+ emails: List[Email]
+ """
+ An array of email addresses identified in the document belonging to legal
+ persons.
+
+ Email addresses mentioned in the document that are not attributable to legal
+ persons will not be extracted.
+ """
+
+ websites: List[Website]
+ """An array of websites identified in the document belonging to legal persons.
+
+ Websites mentioned in the document that are not attributable to legal persons
+ will not be extracted.
+ """
+
+ phone_numbers: List[PhoneNumber]
+ """
+ An array of valid phone numbers identified in the document belonging to legal
+ persons.
+
+ Phone numbers mentioned in the document that are not valid, possible, or
+ attributable to legal persons will not be extracted.
+ """
+
+ id_numbers: List[IDNumber]
+ """
+ An array of identification numbers identified in the document belonging to legal
+ persons.
+
+ Identification numbers mentioned in the document that are not attributable to
+ legal persons will not be extracted.
+ """
+
+ terms: List[Term]
+ """An array of terms assigned definite meanings within the document."""
+
+ external_documents: List[ExternalDocument]
+ """An array of documents identified within the document."""
+
+ quotes: List[Quote]
+ """An array of quotations within the document."""
+
+ dates: List[Date]
+ """
+ An array of dates identified in the document belonging to one of the following
+ types: `creation`, `signature`, `effective`, `expiry`, `delivery`, `renewal`,
+ `payment`, `birth`, or `death`.
+
+ Only Gregorian dates between the years 1000 and 9999 (inclusive) fitting into
+ one of the supported date types are extractable.
+ """
+
+ headings: List[Heading]
+ """An array of spans within the document's text constituting headings."""
+
+ junk: List[Junk]
+ """
+ An array of spans within the document's text constituting non-operative,
+ non-substantive 'junk' content such as headers, footers, page numbers, and OCR
+ artifacts.
+ """
+
+ version: Literal["ilgs@1"]
diff --git a/src/isaacus/types/ilgs/v1/__init__.py b/src/isaacus/types/ilgs/v1/__init__.py
deleted file mode 100644
index 6f8d0d9..0000000
--- a/src/isaacus/types/ilgs/v1/__init__.py
+++ /dev/null
@@ -1,18 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from __future__ import annotations
-
-from .date import Date as Date
-from .span import Span as Span
-from .term import Term as Term
-from .email import Email as Email
-from .quote import Quote as Quote
-from .person import Person as Person
-from .segment import Segment as Segment
-from .website import Website as Website
-from .document import Document as Document
-from .location import Location as Location
-from .id_number import IDNumber as IDNumber
-from .phone_number import PhoneNumber as PhoneNumber
-from .crossreference import Crossreference as Crossreference
-from .external_document import ExternalDocument as ExternalDocument
diff --git a/src/isaacus/types/ilgs/v1/crossreference.py b/src/isaacus/types/ilgs/v1/crossreference.py
deleted file mode 100644
index e515b52..0000000
--- a/src/isaacus/types/ilgs/v1/crossreference.py
+++ /dev/null
@@ -1,42 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from .span import Span
-from ...._models import BaseModel
-
-__all__ = ["Crossreference"]
-
-
-class Crossreference(BaseModel):
- """A cross-reference within the document pointing to one or more segments."""
-
- start: str
- """
- The unique identifier of the earliest segment in the span of segments being
- cross-referenced with ties broken in favor of the least-nested (i.e., largest)
- segment. If the cross-reference points to a single segment, `start` and `end`
- will be identical.
- """
-
- end: str
- """
- The unique identifier of the latest segment in the span of segments being
- cross-referenced with ties broken in favor of the least-nested (i.e., largest)
- segment. If the cross-reference points to a single segment, `start` and `end`
- will be identical.
- """
-
- span: Span
- """A zero-based, half-open span into the Unicode code point space of input text.
-
- All spans are globally laminar and well-nested similar to XML—it is impossible
- for any two spans to partially overlap; they can only be disjoint, adjacent, or
- wholly nested. Spans of the exact same type (e.g., segments) will never be
- duplicated.
-
- A span cannot be empty and will never start or end at whitespace.
-
- Note that, when using programming languages other than Python (which uses
- zero-based, half-open, Unicode code point-spaced string indexing), indices may
- need to be translated accordingly (for example, JavaScript slices into UTF-16
- code units instead of Unicode code points).
- """
diff --git a/src/isaacus/types/ilgs/v1/date.py b/src/isaacus/types/ilgs/v1/date.py
deleted file mode 100644
index 7208b4b..0000000
--- a/src/isaacus/types/ilgs/v1/date.py
+++ /dev/null
@@ -1,70 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import List, Optional
-from typing_extensions import Literal
-
-from .span import Span
-from ...._models import BaseModel
-
-__all__ = ["Date"]
-
-
-class Date(BaseModel):
- """
- A date identified in a document belonging to one of the following types: `creation`, `signature`, `effective`, `expiry`, `delivery`, `renewal`, `payment`, `birth`, or `death`.
-
- Only Gregorian dates between the years 1000 and 9999 (inclusive) fitting into one of the supported date types are extractable.
- """
-
- value: str
- """The date in ISO 8601 format (YYYY-MM-DD)."""
-
- type: Literal["creation", "signature", "effective", "expiry", "delivery", "renewal", "payment", "birth", "death"]
- """
- The type of the date, being one of `creation`, `signature`, `effective`,
- `expiry`, `delivery`, `renewal`, `payment`, `birth`, or `death`. If a date is
- mentioned in a document that does not fit into a supported type, it will not be
- extracted.
-
- `creation` denotes the date the document was created. There may only be one
- `creation` date per document.
-
- `signature` denotes the date the document was signed.
-
- `effective` denotes the date when the document or a part thereof comes into
- effect (e.g., commencement or enactment dates).
-
- `expiry` denotes the date when the document or a part thereof is no longer in
- effect.
-
- `delivery` denotes the date when goods or services are to be delivered under the
- document.
-
- `renewal` denotes the date when one or more of the document's terms are to be
- renewed.
-
- `payment` denotes the date when payment is to be made under the document.
-
- `birth` denotes the birth date of a natural person or establishment (e.g.,
- incorporation) date of a non-natural legal person identified in the document.
- There can only be one `birth` date linked to a single person and all `birth`
- dates must be linked to a person. A person's `birth` date will never be after
- their `death` date.
-
- `death` denotes the death date of a natural person or dissolution date of a
- non-natural legal person identified in the document. There can only be one
- `death` date linked to a single person and all `death` dates must be linked to a
- person. A person's `death` date will never be before their `birth` date.
- """
-
- person: Optional[str] = None
- """
- A unique identifier for a legal person in the format `per:{index}` where
- `{index}` is a non-negative incrementing integer starting from zero.
- """
-
- mentions: List[Span]
- """
- An array of one or more spans within the document's text where the date is
- mentioned.
- """
diff --git a/src/isaacus/types/ilgs/v1/document.py b/src/isaacus/types/ilgs/v1/document.py
deleted file mode 100644
index ca4ce7e..0000000
--- a/src/isaacus/types/ilgs/v1/document.py
+++ /dev/null
@@ -1,172 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import List, Optional
-from typing_extensions import Literal
-
-from .date import Date
-from .span import Span
-from .term import Term
-from .email import Email
-from .quote import Quote
-from .person import Person
-from .segment import Segment
-from .website import Website
-from .location import Location
-from .id_number import IDNumber
-from ...._models import BaseModel
-from .phone_number import PhoneNumber
-from .crossreference import Crossreference
-from .external_document import ExternalDocument
-
-__all__ = ["Document"]
-
-
-class Document(BaseModel):
- """The enriched document."""
-
- title: Optional[Span] = None
- """A zero-based, half-open span into the Unicode code point space of input text.
-
- All spans are globally laminar and well-nested similar to XML—it is impossible
- for any two spans to partially overlap; they can only be disjoint, adjacent, or
- wholly nested. Spans of the exact same type (e.g., segments) will never be
- duplicated.
-
- A span cannot be empty and will never start or end at whitespace.
-
- Note that, when using programming languages other than Python (which uses
- zero-based, half-open, Unicode code point-spaced string indexing), indices may
- need to be translated accordingly (for example, JavaScript slices into UTF-16
- code units instead of Unicode code points).
- """
-
- subtitle: Optional[Span] = None
- """A zero-based, half-open span into the Unicode code point space of input text.
-
- All spans are globally laminar and well-nested similar to XML—it is impossible
- for any two spans to partially overlap; they can only be disjoint, adjacent, or
- wholly nested. Spans of the exact same type (e.g., segments) will never be
- duplicated.
-
- A span cannot be empty and will never start or end at whitespace.
-
- Note that, when using programming languages other than Python (which uses
- zero-based, half-open, Unicode code point-spaced string indexing), indices may
- need to be translated accordingly (for example, JavaScript slices into UTF-16
- code units instead of Unicode code points).
- """
-
- type: Literal["statute", "regulation", "decision", "contract", "other"]
- """
- The type of the document, being one of `statute`, `regulation`, `decision`,
- `contract`, or `other`.
-
- `statute` denotes primary legislation such as acts, bills, codes, and
- constitutions.
-
- `regulation` denotes secondary legislation such as rules, statutory instruments,
- and ordinances.
-
- `decision` denotes judicial or quasi-judicial decisions such as court judgments,
- judicial opinions, and tribunal rulings.
-
- `other` is used for all other types of legal documents that do not fit into any
- of the predefined types.
- """
-
- jurisdiction: Optional[str] = None
- """
- A jurisdiction code representing a country (via an initial country code) and,
- optionally, a subdivision within that country (via a subsequent subdivision code
- prefixed by a hyphen).
-
- All 249 ISO 3166-1 alpha-2 country codes are representable in addition to
- special `INT` and `EU` codes for international and European Union law,
- respectively.
-
- All 5,046 ISO 3166-2 codes are also representable in addition to a special `FED`
- code for federal law.
- """
-
- segments: List[Segment]
- """
- An array of segments within the document representing structurally distinct
- portions of its content.
- """
-
- crossreferences: List[Crossreference]
- """
- An array of cross-references within the document pointing to a single segment or
- a span of segments.
- """
-
- locations: List[Location]
- """An array of locations identified in the document."""
-
- persons: List[Person]
- """An array of legal persons identified in the document."""
-
- emails: List[Email]
- """
- An array of email addresses identified in the document belonging to legal
- persons.
-
- Email addresses mentioned in the document that are not attributable to legal
- persons will not be extracted.
- """
-
- websites: List[Website]
- """An array of websites identified in the document belonging to legal persons.
-
- Websites mentioned in the document that are not attributable to legal persons
- will not be extracted.
- """
-
- phone_numbers: List[PhoneNumber]
- """
- An array of valid phone numbers identified in the document belonging to legal
- persons.
-
- Phone numbers mentioned in the document that are not valid, possible, or
- attributable to legal persons will not be extracted.
- """
-
- id_numbers: List[IDNumber]
- """
- An array of identification numbers identified in the document belonging to legal
- persons.
-
- Identification numbers mentioned in the document that are not attributable to
- legal persons will not be extracted.
- """
-
- terms: List[Term]
- """An array of terms assigned definite meanings within the document."""
-
- external_documents: List[ExternalDocument]
- """An array of documents identified within the document."""
-
- quotes: List[Quote]
- """An array of quotations within the document."""
-
- dates: List[Date]
- """
- An array of dates identified in the document belonging to one of the following
- types: `creation`, `signature`, `effective`, `expiry`, `delivery`, `renewal`,
- `payment`, `birth`, or `death`.
-
- Only Gregorian dates between the years 1000 and 9999 (inclusive) fitting into
- one of the supported date types are extractable.
- """
-
- headings: List[Span]
- """An array of spans within the document's text constituting headings."""
-
- junk: List[Span]
- """
- An array of spans within the document's text constituting non-operative,
- non-substantive 'junk' content such as headers, footers, page numbers, and OCR
- artifacts.
- """
-
- version: Literal["ilgs@1"]
diff --git a/src/isaacus/types/ilgs/v1/email.py b/src/isaacus/types/ilgs/v1/email.py
deleted file mode 100644
index 7183531..0000000
--- a/src/isaacus/types/ilgs/v1/email.py
+++ /dev/null
@@ -1,27 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import List
-
-from .span import Span
-from ...._models import BaseModel
-
-__all__ = ["Email"]
-
-
-class Email(BaseModel):
- """An email address identified in a document belonging to a legal person.
-
- If an email address was mentioned in the document but is not attributable to a legal person, it will not be extracted.
- """
-
- address: str
- """The normalized email address."""
-
- person: str
- """The unique identifier of the person that this email address belongs to."""
-
- mentions: List[Span]
- """
- An array of one or more spans within the document's text where the email address
- is mentioned.
- """
diff --git a/src/isaacus/types/ilgs/v1/external_document.py b/src/isaacus/types/ilgs/v1/external_document.py
deleted file mode 100644
index 8f2b135..0000000
--- a/src/isaacus/types/ilgs/v1/external_document.py
+++ /dev/null
@@ -1,101 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import List, Optional
-from typing_extensions import Literal
-
-from .span import Span
-from ...._models import BaseModel
-
-__all__ = ["ExternalDocument"]
-
-
-class ExternalDocument(BaseModel):
- """A document identified within another document."""
-
- id: str
- """
- The unique identifier of the external document in the format `exd:{index}` where
- `{index}` is a non-negative incrementing integer starting from zero.
- """
-
- name: Span
- """A zero-based, half-open span into the Unicode code point space of input text.
-
- All spans are globally laminar and well-nested similar to XML—it is impossible
- for any two spans to partially overlap; they can only be disjoint, adjacent, or
- wholly nested. Spans of the exact same type (e.g., segments) will never be
- duplicated.
-
- A span cannot be empty and will never start or end at whitespace.
-
- Note that, when using programming languages other than Python (which uses
- zero-based, half-open, Unicode code point-spaced string indexing), indices may
- need to be translated accordingly (for example, JavaScript slices into UTF-16
- code units instead of Unicode code points).
- """
-
- type: Literal["statute", "regulation", "decision", "contract", "other"]
- """
- The type of the external document, being one of `statute`, `regulation`,
- `decision`, `contract`, or `other`.
-
- `statute` denotes primary legislation such as acts, bills, codes, and
- constitutions.
-
- `regulation` denotes secondary legislation such as rules, statutory instruments,
- and ordinances.
-
- `decision` denotes judicial or quasi-judicial decisions such as court judgments,
- judicial opinions, and tribunal rulings.
-
- `other` is used for all other types of legal documents that do not fit into any
- of the predefined types.
- """
-
- jurisdiction: Optional[str] = None
- """
- A jurisdiction code representing a country (via an initial country code) and,
- optionally, a subdivision within that country (via a subsequent subdivision code
- prefixed by a hyphen).
-
- All 249 ISO 3166-1 alpha-2 country codes are representable in addition to
- special `INT` and `EU` codes for international and European Union law,
- respectively.
-
- All 5,046 ISO 3166-2 codes are also representable in addition to a special `FED`
- code for federal law.
- """
-
- reception: Literal["positive", "mixed", "negative", "neutral"]
- """
- The sentiment of the document towards the external document, being one of
- `positive`, `mixed`, `negative`, or `neutral`.
-
- `positive` indicates that the document expresses a favorable view of the
- external document whether by endorsing or approving it.
-
- `mixed` indicates that the document expresses both favorable and unfavorable
- views of the external document, for example, by affirming parts of it and
- disapproving others.
-
- `negative` indicates that the document expresses an unfavorable view of the
- external document whether by criticizing, repealing, overruling, or explicitly
- contradicting it.
-
- `neutral` indicates that the document references the external document without
- expressing any particular sentiment towards it.
- """
-
- mentions: List[Span]
- """
- An array of one or more spans within the document's text where the external
- document is mentioned by name, for example, 'the US Constitution' in 'the Second
- Amendment to the US Constitution protects freedom of speech'.
- """
-
- pinpoints: List[Span]
- """
- An array of spans within the document's text where specific parts of the
- external document are referenced, for example, 'Section 2' in 'as defined in
- Section 2 of the US Constitution'.
- """
diff --git a/src/isaacus/types/ilgs/v1/id_number.py b/src/isaacus/types/ilgs/v1/id_number.py
deleted file mode 100644
index 52ae0b7..0000000
--- a/src/isaacus/types/ilgs/v1/id_number.py
+++ /dev/null
@@ -1,27 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import List
-
-from .span import Span
-from ...._models import BaseModel
-
-__all__ = ["IDNumber"]
-
-
-class IDNumber(BaseModel):
- """An identification number mentioned in a document belonging to a legal person.
-
- If an identification number was mentioned in the document but is not attributable to a legal person, it will not be extracted.
- """
-
- number: str
- """The identification number."""
-
- person: str
- """The unique identifier of the person that this identification number belongs to."""
-
- mentions: List[Span]
- """
- An array of one or more spans within the document's text where the
- identification number is mentioned.
- """
diff --git a/src/isaacus/types/ilgs/v1/location.py b/src/isaacus/types/ilgs/v1/location.py
deleted file mode 100644
index 6f4bbd1..0000000
--- a/src/isaacus/types/ilgs/v1/location.py
+++ /dev/null
@@ -1,53 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import List, Optional
-from typing_extensions import Literal
-
-from .span import Span
-from ...._models import BaseModel
-
-__all__ = ["Location"]
-
-
-class Location(BaseModel):
- """A location identified within a document."""
-
- id: str
- """
- The unique identifier of the location in the format `loc:{index}` where
- `{index}` is a non-negative incrementing integer starting from zero.
- """
-
- name: Span
- """A zero-based, half-open span into the Unicode code point space of input text.
-
- All spans are globally laminar and well-nested similar to XML—it is impossible
- for any two spans to partially overlap; they can only be disjoint, adjacent, or
- wholly nested. Spans of the exact same type (e.g., segments) will never be
- duplicated.
-
- A span cannot be empty and will never start or end at whitespace.
-
- Note that, when using programming languages other than Python (which uses
- zero-based, half-open, Unicode code point-spaced string indexing), indices may
- need to be translated accordingly (for example, JavaScript slices into UTF-16
- code units instead of Unicode code points).
- """
-
- type: Literal["country", "state", "city", "address", "other"]
- """
- The type of the location, being one of `country`, `state`, `city`, `address`, or
- `other`.
- """
-
- parent: Optional[str] = None
- """
- A unique identifier for a location in the format `loc:{index}` where `{index}`
- is a non-negative incrementing integer starting from zero.
- """
-
- mentions: List[Span]
- """
- An array of one or more spans within the document's text where the location is
- mentioned.
- """
diff --git a/src/isaacus/types/ilgs/v1/person.py b/src/isaacus/types/ilgs/v1/person.py
deleted file mode 100644
index 42384a7..0000000
--- a/src/isaacus/types/ilgs/v1/person.py
+++ /dev/null
@@ -1,195 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import List, Optional
-from typing_extensions import Literal
-
-from .span import Span
-from ...._models import BaseModel
-
-__all__ = ["Person"]
-
-
-class Person(BaseModel):
- """A legal person identified in a document."""
-
- id: str
- """
- The unique identifier of the person in the format `per:{index}` where `{index}`
- is a non-negative incrementing integer starting from zero.
- """
-
- name: Span
- """A zero-based, half-open span into the Unicode code point space of input text.
-
- All spans are globally laminar and well-nested similar to XML—it is impossible
- for any two spans to partially overlap; they can only be disjoint, adjacent, or
- wholly nested. Spans of the exact same type (e.g., segments) will never be
- duplicated.
-
- A span cannot be empty and will never start or end at whitespace.
-
- Note that, when using programming languages other than Python (which uses
- zero-based, half-open, Unicode code point-spaced string indexing), indices may
- need to be translated accordingly (for example, JavaScript slices into UTF-16
- code units instead of Unicode code points).
- """
-
- type: Literal["natural", "corporate", "politic"]
- """
- The legal entity type of the person, being one of `natural`, `corporate`, or
- `politic`.
-
- `natural` denotes a human being in their capacity as a natural legal person,
- including when representing unincorporated entities such as partnerships and
- trusts.
-
- `corporate` denotes a body corporate such as a company, incorporated
- partnership, or statutory corporation.
-
- `politic` denotes a body politic such as a court, state, government, or
- intergovernmental organization.
- """
-
- role: Literal[
- "plaintiff",
- "petitioner",
- "applicant",
- "appellant",
- "appellee",
- "claimant",
- "complainant",
- "defendant",
- "respondent",
- "prior_authority",
- "prosecutor",
- "defense_counsel",
- "amicus",
- "intervener",
- "borrower",
- "lender",
- "guarantor",
- "lessee",
- "lessor",
- "employer",
- "employee",
- "licensor",
- "licensee",
- "franchisor",
- "franchisee",
- "buyer",
- "seller",
- "contractor",
- "shareholder",
- "joint_venturer",
- "investor",
- "insurer",
- "insured",
- "enacting_authority",
- "empowered_authority",
- "settlor",
- "trustee",
- "beneficiary",
- "debater",
- "director",
- "governing_jurisdiction",
- "clerk",
- "witness",
- "other",
- "non_party",
- ]
- """The role of the person in relation to the subject of the document.
-
- The following roles are currently supported: | | | | ------------------------ |
- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- | | `plaintiff` | A party initiating the case that is the subject of the
- document. | | `petitioner` | A party initiating the petition that is the subject
- of the document. | | `applicant` | A party initiating the application that is
- the subject of the document. | | `appellant` | A party appealing the decision
- that is the subject of the document. | | `appellee` | A party responding to the
- appeal that is the subject of the document if they are explicitly referred to as
- an 'appellee'. | | `claimant` | A party making a claim in the case that is the
- subject of the document. | | `complainant` | A party making a complaint in the
- case that is the subject of the document. | | `defendant` | A party defending
- against the case that is the subject of the document. | | `respondent` | A party
- responding to the petition, appeal, or application that is the subject of the
- document. | | `prior_authority` | An authority (e.g., judge, tribunal, court)
- that made a prior decision in the case that is the subject of the document. Both
- individual judges and courts should be annotated with this role where
- applicable. This is not to be used for authorities cited as precedent, only for
- those that made prior decisions in the same case. | | `prosecutor` | A lawyer
- prosecuting the case that is the subject of the document. | | `defense_counsel`
- | A lawyer defending the case that is the subject of the document. | | `amicus`
- | A party filing an amicus curiae brief in the case that is the subject of the
- document. | | `intervener` | A party attempting to or that has intervened in the
- case that is the subject of the document. | | `borrower` | A party borrowing
- money or other assets under the agreement that is the subject of the document,
- including 'mortgagors' and 'debtors'. | | `lender` | A party lending money or
- other assets under the agreement that is the subject of the document, including
- 'mortgagees' and 'creditors'. | | `guarantor` | A party guaranteeing obligations
- under the agreement that is the subject of the document, including 'sureties'. |
- | `lessee` | A party leasing goods or services under the agreement that is the
- subject of the document, including 'tenants'. | | `lessor` | A party leasing
- goods or services under the agreement that is the subject of the document,
- including 'landlords'. | | `employer` | A party employing personnel under the
- agreement that is the subject of the document. | | `employee` | A party employed
- under the agreement that is the subject of the document. | | `licensor` | A
- party licensing intellectual property or other rights under the agreement that
- are the subject of the document. | | `licensee` | A party licensed to use
- intellectual property or other rights under the agreement that are the subject
- of the document. | | `franchisor` | A party granting a franchise under the
- agreement that is the subject of the document. | | `franchisee` | A party
- granted a franchise under the agreement that is the subject of the document. | |
- `buyer` | A party purchasing goods or services under the agreement that is the
- subject of the document, including 'purchasers', 'customers', and 'clients'. | |
- `seller` | A party selling or providing goods or services under the agreement
- that is the subject of the document, including 'Vendors', 'Suppliers', and
- 'Service Providers' (where such parties are actually providing goods or services
- under the agreement). | | `contractor` | A party contracted to perform work or
- services under the agreement that is the subject of the document, including
- 'consultants'. | | `shareholder` | A party holding shares or equity under the
- agreement that is the subject of the document. | | `joint_venturer` | A party
- participating in a joint venture under the agreement that is the subject of the
- document. | | `investor` | A party investing money or assets under the agreement
- that is the subject of the document. | | `insurer` | A party providing insurance
- under the agreement that is the subject of the document. | | `insured` | A party
- insured under the agreement that is the subject of the document. | | `settlor` |
- A party establishing the trust that is the subject of the document. | |
- `trustee` | A party managing the trust that is the subject of the document. | |
- `beneficiary` | A party benefiting from the trust that is the subject of the
- document. | | `enacting_authority` | An authority (e.g., legislature, regulator,
- Minister/Secretary, President/Prime Minister, tribunal, court, judge) giving
- legal effect to or authorizing the document. All relevant individuals and bodies
- should be annotated with this role where applicable. | | `empowered_authority` |
- An authority (e.g., government agency, regulator, Minister/Secretary,
- President/Prime Minister, tribunal, court) empowered by the document to carry
- out functions or duties. | | `debater` | A person participating in the debate
- that is the subject of the document. | | `governing_jurisdiction` | The
- jurisdiction whose laws govern the document. | | `director` | A director or
- other officer of a corporate legal person mentioned in the document. | | `clerk`
- | A clerk, notary, or other official certifying, witnessing, filing, recording,
- registering, or otherwise administering the document. | | `witness` | A witness
- witnessing the signing of the document, or whose testimony is part of the case
- that is the subject of the document. | | `other` | A party to the case,
- agreement, legislation, or regulation that is the subject of the document that
- does not fit into any of the other roles. | | `non_party` | A legal person
- mentioned in the document that is not a party to the case, agreement,
- legislation, or regulation that is the subject of the document. |
- """
-
- parent: Optional[str] = None
- """
- A unique identifier for a legal person in the format `per:{index}` where
- `{index}` is a non-negative incrementing integer starting from zero.
- """
-
- residence: Optional[str] = None
- """
- A unique identifier for a location in the format `loc:{index}` where `{index}`
- is a non-negative incrementing integer starting from zero.
- """
-
- mentions: List[Span]
- """
- An array of one or more spans within the document's text where the person is
- mentioned.
- """
diff --git a/src/isaacus/types/ilgs/v1/phone_number.py b/src/isaacus/types/ilgs/v1/phone_number.py
deleted file mode 100644
index 53b79e3..0000000
--- a/src/isaacus/types/ilgs/v1/phone_number.py
+++ /dev/null
@@ -1,30 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import List
-
-from .span import Span
-from ...._models import BaseModel
-
-__all__ = ["PhoneNumber"]
-
-
-class PhoneNumber(BaseModel):
- """A valid phone number identified in a document belonging to a legal person.
-
- If a phone number was mentioned in the document but is not valid, possible, or attributable to a legal person, it will not be extracted.
- """
-
- number: str
- """
- The normalized phone number in E.123 international notation conforming with
- local conventions on the use of spaces and hyphens as separators.
- """
-
- person: str
- """The unique identifier of the person that this phone number belongs to."""
-
- mentions: List[Span]
- """
- An array of one or more spans within the document's text where the phone number
- is mentioned.
- """
diff --git a/src/isaacus/types/ilgs/v1/quote.py b/src/isaacus/types/ilgs/v1/quote.py
deleted file mode 100644
index 3bcaad9..0000000
--- a/src/isaacus/types/ilgs/v1/quote.py
+++ /dev/null
@@ -1,52 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import Optional
-
-from .span import Span
-from ...._models import BaseModel
-
-__all__ = ["Quote"]
-
-
-class Quote(BaseModel):
- """A quotation within a document."""
-
- source_segment: Optional[str] = None
- """
- A unique identifier for a segment in the format `seg:{index}` where `{index}` is
- a non-negative incrementing integer starting from zero.
- """
-
- source_document: Optional[str] = None
- """
- A unique identifier for an external document in the format `exd:{index}` where
- `{index}` is a non-negative incrementing integer starting from zero.
- """
-
- source_person: Optional[str] = None
- """
- A unique identifier for a legal person in the format `per:{index}` where
- `{index}` is a non-negative incrementing integer starting from zero.
- """
-
- amending: bool
- """
- Whether the quote is being used to amend or modify content, typically in other
- documents.
- """
-
- span: Span
- """A zero-based, half-open span into the Unicode code point space of input text.
-
- All spans are globally laminar and well-nested similar to XML—it is impossible
- for any two spans to partially overlap; they can only be disjoint, adjacent, or
- wholly nested. Spans of the exact same type (e.g., segments) will never be
- duplicated.
-
- A span cannot be empty and will never start or end at whitespace.
-
- Note that, when using programming languages other than Python (which uses
- zero-based, half-open, Unicode code point-spaced string indexing), indices may
- need to be translated accordingly (for example, JavaScript slices into UTF-16
- code units instead of Unicode code points).
- """
diff --git a/src/isaacus/types/ilgs/v1/segment.py b/src/isaacus/types/ilgs/v1/segment.py
deleted file mode 100644
index fe9ba54..0000000
--- a/src/isaacus/types/ilgs/v1/segment.py
+++ /dev/null
@@ -1,205 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import Optional
-from typing_extensions import Literal
-
-from .span import Span
-from ...._models import BaseModel
-
-__all__ = ["Segment"]
-
-
-class Segment(BaseModel):
- """
- A segment within the document representing a structurally distinct portion of the document's content.
- """
-
- id: str
- """
- The unique identifier of the segment in the format `seg:{index}` where `{index}`
- is a non-negative incrementing integer starting from zero.
- """
-
- kind: Literal["container", "unit", "item", "figure"]
- """
- The structural 'kind' of the segment, being one of `container`, `unit`, `item`,
- or `figure`.
-
- A `container` is a structural or semantic grouping of content such as a chapter.
- It can contain segments of any kind or none at all.
-
- A `unit` is a single syntactically independent unit of text such as a paragraph.
- It can only contain `item`s and `figure`s.
-
- An `item` is a syntactically subordinate unit of text such as an item in a
- run-in list. It can only contain other `item`s. Note that an `item` is
- conceptually distinct from a list item—it is perfectly possible to encounter
- list items that are syntactically independent of their surrounding items just as
- it is possible to encounter dependent clauses that do not appear as part of a
- list.
-
- A `figure` is a visually structured or tabular unit of content such as a
- diagram, equation, or table. It cannot contain segments.
- """
-
- type: Optional[
- Literal[
- "title",
- "book",
- "part",
- "chapter",
- "subchapter",
- "division",
- "subdivision",
- "subpart",
- "subtitle",
- "table_of_contents",
- "article",
- "section",
- "regulation",
- "rule",
- "clause",
- "paragraph",
- "subarticle",
- "subsection",
- "subregulation",
- "subrule",
- "subclause",
- "subparagraph",
- "item",
- "subitem",
- "point",
- "indent",
- "schedule",
- "annex",
- "appendix",
- "exhibit",
- "recital",
- "signature",
- "note",
- "figure",
- "table",
- "formula",
- ]
- ] = None
- """
- The addressable 'type' of the segment within the document's referential scheme
- and hierarchy, whether defined explicitly (e.g., by headings, such as
- 'Section 2. Definitions'), implicitly (e.g., by way of reference, such as 'as
- defined in Section 2'), or by convention (e.g., [42] in a judgment often denotes
- a `paragraph`, independent provisions in statute are often `section`s, etc.). If
- the type is not known or not applicable, it will be set to `null`.
-
- Note that, although many segment types may coincide with syntactic constructs,
- they should be thought of purely as distinct formal citable units. Most
- paragraphs (in the syntactic sense) will not have the `paragraph` type, for
- example. That type is reserved for segments that would formally be cited as a
- 'Paragraph' within the document's referential scheme.
-
- The following types are currently supported: `title`, `book`, `part`, `chapter`,
- `subchapter`, `division`, `subdivision`, `subpart`, `subtitle`,
- `table_of_contents`, `article`, `section`, `regulation`, `rule`, `clause`,
- `paragraph`, `subarticle`, `subsection`, `subregulation`, `subrule`,
- `subclause`, `subparagraph`, `item`, `subitem`, `point`, `indent`, `schedule`,
- `annex`, `appendix`, `exhibit`, `recital`, `signature`, `note`, `figure`,
- `table`, and `formula`.
-
- The `title`, `book`, `part`, `chapter`, `subchapter`, `division`, `subdivision`,
- `subpart`, `subtitle`, and `table_of_contents` types are exclusive to the
- `container` kind.
-
- The `figure` kind only supports the `figure`, `table`, and `formula` types, all
- of which are exclusive to it.
- """
-
- category: Literal["front_matter", "scope", "main", "annotation", "back_matter", "other"]
- """
- The functional 'category' of the segment within the document, being one of
- `front_matter`, `scope`, `main`, `annotation`, `back_matter`, or `other`.
-
- `front_matter` denotes non-operative contextualizing content occurring at the
- start of a document such as a preamble or recitals.
-
- `scope` denotes operative content defining the application or interpretation of
- a document such as definition sections and governing law clauses.
-
- `main` denotes operative, non-scopal content.
-
- `annotation` denotes non-operative annotative content providing explanatory or
- referential information such as commentary, footnotes, and endnotes.
-
- `back_matter` denotes non-operative contextualizing content occurring at the end
- of a document such as authority statements.
-
- `other` denotes content that does not fit into any of the other categories.
- """
-
- type_name: Optional[Span] = None
- """A zero-based, half-open span into the Unicode code point space of input text.
-
- All spans are globally laminar and well-nested similar to XML—it is impossible
- for any two spans to partially overlap; they can only be disjoint, adjacent, or
- wholly nested. Spans of the exact same type (e.g., segments) will never be
- duplicated.
-
- A span cannot be empty and will never start or end at whitespace.
-
- Note that, when using programming languages other than Python (which uses
- zero-based, half-open, Unicode code point-spaced string indexing), indices may
- need to be translated accordingly (for example, JavaScript slices into UTF-16
- code units instead of Unicode code points).
- """
-
- code: Optional[Span] = None
- """A zero-based, half-open span into the Unicode code point space of input text.
-
- All spans are globally laminar and well-nested similar to XML—it is impossible
- for any two spans to partially overlap; they can only be disjoint, adjacent, or
- wholly nested. Spans of the exact same type (e.g., segments) will never be
- duplicated.
-
- A span cannot be empty and will never start or end at whitespace.
-
- Note that, when using programming languages other than Python (which uses
- zero-based, half-open, Unicode code point-spaced string indexing), indices may
- need to be translated accordingly (for example, JavaScript slices into UTF-16
- code units instead of Unicode code points).
- """
-
- title: Optional[Span] = None
- """A zero-based, half-open span into the Unicode code point space of input text.
-
- All spans are globally laminar and well-nested similar to XML—it is impossible
- for any two spans to partially overlap; they can only be disjoint, adjacent, or
- wholly nested. Spans of the exact same type (e.g., segments) will never be
- duplicated.
-
- A span cannot be empty and will never start or end at whitespace.
-
- Note that, when using programming languages other than Python (which uses
- zero-based, half-open, Unicode code point-spaced string indexing), indices may
- need to be translated accordingly (for example, JavaScript slices into UTF-16
- code units instead of Unicode code points).
- """
-
- parent: Optional[str] = None
- """
- A unique identifier for a segment in the format `seg:{index}` where `{index}` is
- a non-negative incrementing integer starting from zero.
- """
-
- span: Span
- """A zero-based, half-open span into the Unicode code point space of input text.
-
- All spans are globally laminar and well-nested similar to XML—it is impossible
- for any two spans to partially overlap; they can only be disjoint, adjacent, or
- wholly nested. Spans of the exact same type (e.g., segments) will never be
- duplicated.
-
- A span cannot be empty and will never start or end at whitespace.
-
- Note that, when using programming languages other than Python (which uses
- zero-based, half-open, Unicode code point-spaced string indexing), indices may
- need to be translated accordingly (for example, JavaScript slices into UTF-16
- code units instead of Unicode code points).
- """
diff --git a/src/isaacus/types/ilgs/v1/span.py b/src/isaacus/types/ilgs/v1/span.py
deleted file mode 100644
index 2289f04..0000000
--- a/src/isaacus/types/ilgs/v1/span.py
+++ /dev/null
@@ -1,28 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from ...._models import BaseModel
-
-__all__ = ["Span"]
-
-
-class Span(BaseModel):
- """A zero-based, half-open span into the Unicode code point space of input text.
-
- All spans are globally laminar and well-nested similar to XML—it is impossible for any two spans to partially overlap; they can only be disjoint, adjacent, or wholly nested. Spans of the exact same type (e.g., segments) will never be duplicated.
-
- A span cannot be empty and will never start or end at whitespace.
-
- Note that, when using programming languages other than Python (which uses zero-based, half-open, Unicode code point-spaced string indexing), indices may need to be translated accordingly (for example, JavaScript slices into UTF-16 code units instead of Unicode code points).
- """
-
- start: int
- """
- The zero-based start index of the half-open span of Unicode code points in the
- input text.
- """
-
- end: int
- """
- The zero-based end index of the half-open span (i.e., the end is exclusive) of
- Unicode code points in the input text.
- """
diff --git a/src/isaacus/types/ilgs/v1/term.py b/src/isaacus/types/ilgs/v1/term.py
deleted file mode 100644
index 7b34272..0000000
--- a/src/isaacus/types/ilgs/v1/term.py
+++ /dev/null
@@ -1,59 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import List
-
-from .span import Span
-from ...._models import BaseModel
-
-__all__ = ["Term"]
-
-
-class Term(BaseModel):
- """A term assigned a definite meaning within a document."""
-
- id: str
- """
- The unique identifier of the term in the format `term:{index}` where `{index}`
- is a non-negative incrementing integer starting from zero.
- """
-
- name: Span
- """A zero-based, half-open span into the Unicode code point space of input text.
-
- All spans are globally laminar and well-nested similar to XML—it is impossible
- for any two spans to partially overlap; they can only be disjoint, adjacent, or
- wholly nested. Spans of the exact same type (e.g., segments) will never be
- duplicated.
-
- A span cannot be empty and will never start or end at whitespace.
-
- Note that, when using programming languages other than Python (which uses
- zero-based, half-open, Unicode code point-spaced string indexing), indices may
- need to be translated accordingly (for example, JavaScript slices into UTF-16
- code units instead of Unicode code points).
- """
-
- meaning: Span
- """A zero-based, half-open span into the Unicode code point space of input text.
-
- All spans are globally laminar and well-nested similar to XML—it is impossible
- for any two spans to partially overlap; they can only be disjoint, adjacent, or
- wholly nested. Spans of the exact same type (e.g., segments) will never be
- duplicated.
-
- A span cannot be empty and will never start or end at whitespace.
-
- Note that, when using programming languages other than Python (which uses
- zero-based, half-open, Unicode code point-spaced string indexing), indices may
- need to be translated accordingly (for example, JavaScript slices into UTF-16
- code units instead of Unicode code points).
- """
-
- mentions: List[Span]
- """
- An array of spans within the document's text where the term is mentioned outside
- of its definition.
-
- It is possible for the term to have no mentions if, outside of its definition,
- it is never referred to in the document.
- """
diff --git a/src/isaacus/types/ilgs/v1/website.py b/src/isaacus/types/ilgs/v1/website.py
deleted file mode 100644
index 3b3baac..0000000
--- a/src/isaacus/types/ilgs/v1/website.py
+++ /dev/null
@@ -1,28 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import List
-
-from .span import Span
-from ...._models import BaseModel
-
-__all__ = ["Website"]
-
-
-class Website(BaseModel):
- """A website identified in a document belonging to a legal person.
-
- If a website was mentioned in the document but is not attributable to a legal person, it will not be extracted.
- """
-
- url: str
- """The normalized URL of the website in the form `https://{host}/`."""
-
- person: str
- """The unique identifier of the person that this website belongs to."""
-
- mentions: List[Span]
- """
- An array of one or more spans within the document's text where the website is
- mentioned (including paths and slugs which are not part of the website's
- normalized URL).
- """
From b30f176d23a7eabb18d92d716f8d35b2fc9f454b Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Wed, 4 Feb 2026 05:01:10 +0000
Subject: [PATCH 07/11] feat(sdk): add ilgs v1 span as a top model
---
.stats.yml | 2 +-
api.md | 2 +-
src/isaacus/types/ilgs/__init__.py | 1 +
src/isaacus/types/ilgs/ilgs_v1_document.py | 651 +--------------------
src/isaacus/types/ilgs/ilgs_v1_span.py | 28 +
5 files changed, 57 insertions(+), 627 deletions(-)
create mode 100644 src/isaacus/types/ilgs/ilgs_v1_span.py
diff --git a/.stats.yml b/.stats.yml
index 0bad860..2dc8ed1 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 5
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/isaacus%2Fisaacus-fa910a5a3d1321234423bd8c042d202a64d4d956ef45847b4de358cb18e447eb.yml
openapi_spec_hash: 926b9b619c15e8570e496e11d4fb753e
-config_hash: 67e3b91c6b2d2d5377f56bc8d2e8c93e
+config_hash: b2d6fd9ef31cd192d6abb7fceb12e578
diff --git a/api.md b/api.md
index c0c03e3..1c4e7c4 100644
--- a/api.md
+++ b/api.md
@@ -69,5 +69,5 @@ Methods:
Types:
```python
-from isaacus.types.ilgs import ILGSv1Document
+from isaacus.types.ilgs import ILGSv1Document, ILGSv1Span
```
diff --git a/src/isaacus/types/ilgs/__init__.py b/src/isaacus/types/ilgs/__init__.py
index da6c9a0..5cbc182 100644
--- a/src/isaacus/types/ilgs/__init__.py
+++ b/src/isaacus/types/ilgs/__init__.py
@@ -2,4 +2,5 @@
from __future__ import annotations
+from .ilgs_v1_span import ILGSv1Span as ILGSv1Span
from .ilgs_v1_document import ILGSv1Document as ILGSv1Document
diff --git a/src/isaacus/types/ilgs/ilgs_v1_document.py b/src/isaacus/types/ilgs/ilgs_v1_document.py
index 5862619..5357d22 100644
--- a/src/isaacus/types/ilgs/ilgs_v1_document.py
+++ b/src/isaacus/types/ilgs/ilgs_v1_document.py
@@ -4,187 +4,25 @@
from typing_extensions import Literal
from ..._models import BaseModel
+from .ilgs_v1_span import ILGSv1Span
__all__ = [
"ILGSv1Document",
- "Title",
- "Subtitle",
"Segment",
- "SegmentTypeName",
- "SegmentCode",
- "SegmentTitle",
- "SegmentSpan",
"Crossreference",
- "CrossreferenceSpan",
"Location",
- "LocationName",
- "LocationMention",
"Person",
- "PersonName",
- "PersonMention",
"Email",
- "EmailMention",
"Website",
- "WebsiteMention",
"PhoneNumber",
- "PhoneNumberMention",
"IDNumber",
- "IDNumberMention",
"Term",
- "TermName",
- "TermMeaning",
- "TermMention",
"ExternalDocument",
- "ExternalDocumentName",
- "ExternalDocumentMention",
- "ExternalDocumentPinpoint",
"Quote",
- "QuoteSpan",
"Date",
- "DateMention",
- "Heading",
- "Junk",
]
-class Title(BaseModel):
- """A zero-based, half-open span into the Unicode code point space of input text.
-
- All spans are globally laminar and well-nested similar to XML—it is impossible for any two spans to partially overlap; they can only be disjoint, adjacent, or wholly nested. Spans of the exact same type (e.g., segments) will never be duplicated.
-
- A span cannot be empty and will never start or end at whitespace.
-
- Note that, when using programming languages other than Python (which uses zero-based, half-open, Unicode code point-spaced string indexing), indices may need to be translated accordingly (for example, JavaScript slices into UTF-16 code units instead of Unicode code points).
- """
-
- start: int
- """
- The zero-based start index of the half-open span of Unicode code points in the
- input text.
- """
-
- end: int
- """
- The zero-based end index of the half-open span (i.e., the end is exclusive) of
- Unicode code points in the input text.
- """
-
-
-class Subtitle(BaseModel):
- """A zero-based, half-open span into the Unicode code point space of input text.
-
- All spans are globally laminar and well-nested similar to XML—it is impossible for any two spans to partially overlap; they can only be disjoint, adjacent, or wholly nested. Spans of the exact same type (e.g., segments) will never be duplicated.
-
- A span cannot be empty and will never start or end at whitespace.
-
- Note that, when using programming languages other than Python (which uses zero-based, half-open, Unicode code point-spaced string indexing), indices may need to be translated accordingly (for example, JavaScript slices into UTF-16 code units instead of Unicode code points).
- """
-
- start: int
- """
- The zero-based start index of the half-open span of Unicode code points in the
- input text.
- """
-
- end: int
- """
- The zero-based end index of the half-open span (i.e., the end is exclusive) of
- Unicode code points in the input text.
- """
-
-
-class SegmentTypeName(BaseModel):
- """A zero-based, half-open span into the Unicode code point space of input text.
-
- All spans are globally laminar and well-nested similar to XML—it is impossible for any two spans to partially overlap; they can only be disjoint, adjacent, or wholly nested. Spans of the exact same type (e.g., segments) will never be duplicated.
-
- A span cannot be empty and will never start or end at whitespace.
-
- Note that, when using programming languages other than Python (which uses zero-based, half-open, Unicode code point-spaced string indexing), indices may need to be translated accordingly (for example, JavaScript slices into UTF-16 code units instead of Unicode code points).
- """
-
- start: int
- """
- The zero-based start index of the half-open span of Unicode code points in the
- input text.
- """
-
- end: int
- """
- The zero-based end index of the half-open span (i.e., the end is exclusive) of
- Unicode code points in the input text.
- """
-
-
-class SegmentCode(BaseModel):
- """A zero-based, half-open span into the Unicode code point space of input text.
-
- All spans are globally laminar and well-nested similar to XML—it is impossible for any two spans to partially overlap; they can only be disjoint, adjacent, or wholly nested. Spans of the exact same type (e.g., segments) will never be duplicated.
-
- A span cannot be empty and will never start or end at whitespace.
-
- Note that, when using programming languages other than Python (which uses zero-based, half-open, Unicode code point-spaced string indexing), indices may need to be translated accordingly (for example, JavaScript slices into UTF-16 code units instead of Unicode code points).
- """
-
- start: int
- """
- The zero-based start index of the half-open span of Unicode code points in the
- input text.
- """
-
- end: int
- """
- The zero-based end index of the half-open span (i.e., the end is exclusive) of
- Unicode code points in the input text.
- """
-
-
-class SegmentTitle(BaseModel):
- """A zero-based, half-open span into the Unicode code point space of input text.
-
- All spans are globally laminar and well-nested similar to XML—it is impossible for any two spans to partially overlap; they can only be disjoint, adjacent, or wholly nested. Spans of the exact same type (e.g., segments) will never be duplicated.
-
- A span cannot be empty and will never start or end at whitespace.
-
- Note that, when using programming languages other than Python (which uses zero-based, half-open, Unicode code point-spaced string indexing), indices may need to be translated accordingly (for example, JavaScript slices into UTF-16 code units instead of Unicode code points).
- """
-
- start: int
- """
- The zero-based start index of the half-open span of Unicode code points in the
- input text.
- """
-
- end: int
- """
- The zero-based end index of the half-open span (i.e., the end is exclusive) of
- Unicode code points in the input text.
- """
-
-
-class SegmentSpan(BaseModel):
- """A zero-based, half-open span into the Unicode code point space of input text.
-
- All spans are globally laminar and well-nested similar to XML—it is impossible for any two spans to partially overlap; they can only be disjoint, adjacent, or wholly nested. Spans of the exact same type (e.g., segments) will never be duplicated.
-
- A span cannot be empty and will never start or end at whitespace.
-
- Note that, when using programming languages other than Python (which uses zero-based, half-open, Unicode code point-spaced string indexing), indices may need to be translated accordingly (for example, JavaScript slices into UTF-16 code units instead of Unicode code points).
- """
-
- start: int
- """
- The zero-based start index of the half-open span of Unicode code points in the
- input text.
- """
-
- end: int
- """
- The zero-based end index of the half-open span (i.e., the end is exclusive) of
- Unicode code points in the input text.
- """
-
-
class Segment(BaseModel):
"""
A segment within the document representing a structurally distinct portion of the document's content.
@@ -310,7 +148,7 @@ class Segment(BaseModel):
`other` denotes content that does not fit into any of the other categories.
"""
- type_name: Optional[SegmentTypeName] = None
+ type_name: Optional[ILGSv1Span] = None
"""A zero-based, half-open span into the Unicode code point space of input text.
All spans are globally laminar and well-nested similar to XML—it is impossible
@@ -326,7 +164,7 @@ class Segment(BaseModel):
code units instead of Unicode code points).
"""
- code: Optional[SegmentCode] = None
+ code: Optional[ILGSv1Span] = None
"""A zero-based, half-open span into the Unicode code point space of input text.
All spans are globally laminar and well-nested similar to XML—it is impossible
@@ -342,7 +180,7 @@ class Segment(BaseModel):
code units instead of Unicode code points).
"""
- title: Optional[SegmentTitle] = None
+ title: Optional[ILGSv1Span] = None
"""A zero-based, half-open span into the Unicode code point space of input text.
All spans are globally laminar and well-nested similar to XML—it is impossible
@@ -364,7 +202,7 @@ class Segment(BaseModel):
a non-negative incrementing integer starting from zero.
"""
- span: SegmentSpan
+ span: ILGSv1Span
"""A zero-based, half-open span into the Unicode code point space of input text.
All spans are globally laminar and well-nested similar to XML—it is impossible
@@ -381,29 +219,6 @@ class Segment(BaseModel):
"""
-class CrossreferenceSpan(BaseModel):
- """A zero-based, half-open span into the Unicode code point space of input text.
-
- All spans are globally laminar and well-nested similar to XML—it is impossible for any two spans to partially overlap; they can only be disjoint, adjacent, or wholly nested. Spans of the exact same type (e.g., segments) will never be duplicated.
-
- A span cannot be empty and will never start or end at whitespace.
-
- Note that, when using programming languages other than Python (which uses zero-based, half-open, Unicode code point-spaced string indexing), indices may need to be translated accordingly (for example, JavaScript slices into UTF-16 code units instead of Unicode code points).
- """
-
- start: int
- """
- The zero-based start index of the half-open span of Unicode code points in the
- input text.
- """
-
- end: int
- """
- The zero-based end index of the half-open span (i.e., the end is exclusive) of
- Unicode code points in the input text.
- """
-
-
class Crossreference(BaseModel):
"""A cross-reference within the document pointing to one or more segments."""
@@ -423,7 +238,7 @@ class Crossreference(BaseModel):
will be identical.
"""
- span: CrossreferenceSpan
+ span: ILGSv1Span
"""A zero-based, half-open span into the Unicode code point space of input text.
All spans are globally laminar and well-nested similar to XML—it is impossible
@@ -440,52 +255,6 @@ class Crossreference(BaseModel):
"""
-class LocationName(BaseModel):
- """A zero-based, half-open span into the Unicode code point space of input text.
-
- All spans are globally laminar and well-nested similar to XML—it is impossible for any two spans to partially overlap; they can only be disjoint, adjacent, or wholly nested. Spans of the exact same type (e.g., segments) will never be duplicated.
-
- A span cannot be empty and will never start or end at whitespace.
-
- Note that, when using programming languages other than Python (which uses zero-based, half-open, Unicode code point-spaced string indexing), indices may need to be translated accordingly (for example, JavaScript slices into UTF-16 code units instead of Unicode code points).
- """
-
- start: int
- """
- The zero-based start index of the half-open span of Unicode code points in the
- input text.
- """
-
- end: int
- """
- The zero-based end index of the half-open span (i.e., the end is exclusive) of
- Unicode code points in the input text.
- """
-
-
-class LocationMention(BaseModel):
- """A zero-based, half-open span into the Unicode code point space of input text.
-
- All spans are globally laminar and well-nested similar to XML—it is impossible for any two spans to partially overlap; they can only be disjoint, adjacent, or wholly nested. Spans of the exact same type (e.g., segments) will never be duplicated.
-
- A span cannot be empty and will never start or end at whitespace.
-
- Note that, when using programming languages other than Python (which uses zero-based, half-open, Unicode code point-spaced string indexing), indices may need to be translated accordingly (for example, JavaScript slices into UTF-16 code units instead of Unicode code points).
- """
-
- start: int
- """
- The zero-based start index of the half-open span of Unicode code points in the
- input text.
- """
-
- end: int
- """
- The zero-based end index of the half-open span (i.e., the end is exclusive) of
- Unicode code points in the input text.
- """
-
-
class Location(BaseModel):
"""A location identified within a document."""
@@ -495,7 +264,7 @@ class Location(BaseModel):
`{index}` is a non-negative incrementing integer starting from zero.
"""
- name: LocationName
+ name: ILGSv1Span
"""A zero-based, half-open span into the Unicode code point space of input text.
All spans are globally laminar and well-nested similar to XML—it is impossible
@@ -523,59 +292,13 @@ class Location(BaseModel):
is a non-negative incrementing integer starting from zero.
"""
- mentions: List[LocationMention]
+ mentions: List[ILGSv1Span]
"""
An array of one or more spans within the document's text where the location is
mentioned.
"""
-class PersonName(BaseModel):
- """A zero-based, half-open span into the Unicode code point space of input text.
-
- All spans are globally laminar and well-nested similar to XML—it is impossible for any two spans to partially overlap; they can only be disjoint, adjacent, or wholly nested. Spans of the exact same type (e.g., segments) will never be duplicated.
-
- A span cannot be empty and will never start or end at whitespace.
-
- Note that, when using programming languages other than Python (which uses zero-based, half-open, Unicode code point-spaced string indexing), indices may need to be translated accordingly (for example, JavaScript slices into UTF-16 code units instead of Unicode code points).
- """
-
- start: int
- """
- The zero-based start index of the half-open span of Unicode code points in the
- input text.
- """
-
- end: int
- """
- The zero-based end index of the half-open span (i.e., the end is exclusive) of
- Unicode code points in the input text.
- """
-
-
-class PersonMention(BaseModel):
- """A zero-based, half-open span into the Unicode code point space of input text.
-
- All spans are globally laminar and well-nested similar to XML—it is impossible for any two spans to partially overlap; they can only be disjoint, adjacent, or wholly nested. Spans of the exact same type (e.g., segments) will never be duplicated.
-
- A span cannot be empty and will never start or end at whitespace.
-
- Note that, when using programming languages other than Python (which uses zero-based, half-open, Unicode code point-spaced string indexing), indices may need to be translated accordingly (for example, JavaScript slices into UTF-16 code units instead of Unicode code points).
- """
-
- start: int
- """
- The zero-based start index of the half-open span of Unicode code points in the
- input text.
- """
-
- end: int
- """
- The zero-based end index of the half-open span (i.e., the end is exclusive) of
- Unicode code points in the input text.
- """
-
-
class Person(BaseModel):
"""A legal person identified in a document."""
@@ -585,7 +308,7 @@ class Person(BaseModel):
is a non-negative incrementing integer starting from zero.
"""
- name: PersonName
+ name: ILGSv1Span
"""A zero-based, half-open span into the Unicode code point space of input text.
All spans are globally laminar and well-nested similar to XML—it is impossible
@@ -755,36 +478,13 @@ class Person(BaseModel):
is a non-negative incrementing integer starting from zero.
"""
- mentions: List[PersonMention]
+ mentions: List[ILGSv1Span]
"""
An array of one or more spans within the document's text where the person is
mentioned.
"""
-class EmailMention(BaseModel):
- """A zero-based, half-open span into the Unicode code point space of input text.
-
- All spans are globally laminar and well-nested similar to XML—it is impossible for any two spans to partially overlap; they can only be disjoint, adjacent, or wholly nested. Spans of the exact same type (e.g., segments) will never be duplicated.
-
- A span cannot be empty and will never start or end at whitespace.
-
- Note that, when using programming languages other than Python (which uses zero-based, half-open, Unicode code point-spaced string indexing), indices may need to be translated accordingly (for example, JavaScript slices into UTF-16 code units instead of Unicode code points).
- """
-
- start: int
- """
- The zero-based start index of the half-open span of Unicode code points in the
- input text.
- """
-
- end: int
- """
- The zero-based end index of the half-open span (i.e., the end is exclusive) of
- Unicode code points in the input text.
- """
-
-
class Email(BaseModel):
"""An email address identified in a document belonging to a legal person.
@@ -797,36 +497,13 @@ class Email(BaseModel):
person: str
"""The unique identifier of the person that this email address belongs to."""
- mentions: List[EmailMention]
+ mentions: List[ILGSv1Span]
"""
An array of one or more spans within the document's text where the email address
is mentioned.
"""
-class WebsiteMention(BaseModel):
- """A zero-based, half-open span into the Unicode code point space of input text.
-
- All spans are globally laminar and well-nested similar to XML—it is impossible for any two spans to partially overlap; they can only be disjoint, adjacent, or wholly nested. Spans of the exact same type (e.g., segments) will never be duplicated.
-
- A span cannot be empty and will never start or end at whitespace.
-
- Note that, when using programming languages other than Python (which uses zero-based, half-open, Unicode code point-spaced string indexing), indices may need to be translated accordingly (for example, JavaScript slices into UTF-16 code units instead of Unicode code points).
- """
-
- start: int
- """
- The zero-based start index of the half-open span of Unicode code points in the
- input text.
- """
-
- end: int
- """
- The zero-based end index of the half-open span (i.e., the end is exclusive) of
- Unicode code points in the input text.
- """
-
-
class Website(BaseModel):
"""A website identified in a document belonging to a legal person.
@@ -839,7 +516,7 @@ class Website(BaseModel):
person: str
"""The unique identifier of the person that this website belongs to."""
- mentions: List[WebsiteMention]
+ mentions: List[ILGSv1Span]
"""
An array of one or more spans within the document's text where the website is
mentioned (including paths and slugs which are not part of the website's
@@ -847,29 +524,6 @@ class Website(BaseModel):
"""
-class PhoneNumberMention(BaseModel):
- """A zero-based, half-open span into the Unicode code point space of input text.
-
- All spans are globally laminar and well-nested similar to XML—it is impossible for any two spans to partially overlap; they can only be disjoint, adjacent, or wholly nested. Spans of the exact same type (e.g., segments) will never be duplicated.
-
- A span cannot be empty and will never start or end at whitespace.
-
- Note that, when using programming languages other than Python (which uses zero-based, half-open, Unicode code point-spaced string indexing), indices may need to be translated accordingly (for example, JavaScript slices into UTF-16 code units instead of Unicode code points).
- """
-
- start: int
- """
- The zero-based start index of the half-open span of Unicode code points in the
- input text.
- """
-
- end: int
- """
- The zero-based end index of the half-open span (i.e., the end is exclusive) of
- Unicode code points in the input text.
- """
-
-
class PhoneNumber(BaseModel):
"""A valid phone number identified in a document belonging to a legal person.
@@ -885,36 +539,13 @@ class PhoneNumber(BaseModel):
person: str
"""The unique identifier of the person that this phone number belongs to."""
- mentions: List[PhoneNumberMention]
+ mentions: List[ILGSv1Span]
"""
An array of one or more spans within the document's text where the phone number
is mentioned.
"""
-class IDNumberMention(BaseModel):
- """A zero-based, half-open span into the Unicode code point space of input text.
-
- All spans are globally laminar and well-nested similar to XML—it is impossible for any two spans to partially overlap; they can only be disjoint, adjacent, or wholly nested. Spans of the exact same type (e.g., segments) will never be duplicated.
-
- A span cannot be empty and will never start or end at whitespace.
-
- Note that, when using programming languages other than Python (which uses zero-based, half-open, Unicode code point-spaced string indexing), indices may need to be translated accordingly (for example, JavaScript slices into UTF-16 code units instead of Unicode code points).
- """
-
- start: int
- """
- The zero-based start index of the half-open span of Unicode code points in the
- input text.
- """
-
- end: int
- """
- The zero-based end index of the half-open span (i.e., the end is exclusive) of
- Unicode code points in the input text.
- """
-
-
class IDNumber(BaseModel):
"""An identification number mentioned in a document belonging to a legal person.
@@ -927,82 +558,13 @@ class IDNumber(BaseModel):
person: str
"""The unique identifier of the person that this identification number belongs to."""
- mentions: List[IDNumberMention]
+ mentions: List[ILGSv1Span]
"""
An array of one or more spans within the document's text where the
identification number is mentioned.
"""
-class TermName(BaseModel):
- """A zero-based, half-open span into the Unicode code point space of input text.
-
- All spans are globally laminar and well-nested similar to XML—it is impossible for any two spans to partially overlap; they can only be disjoint, adjacent, or wholly nested. Spans of the exact same type (e.g., segments) will never be duplicated.
-
- A span cannot be empty and will never start or end at whitespace.
-
- Note that, when using programming languages other than Python (which uses zero-based, half-open, Unicode code point-spaced string indexing), indices may need to be translated accordingly (for example, JavaScript slices into UTF-16 code units instead of Unicode code points).
- """
-
- start: int
- """
- The zero-based start index of the half-open span of Unicode code points in the
- input text.
- """
-
- end: int
- """
- The zero-based end index of the half-open span (i.e., the end is exclusive) of
- Unicode code points in the input text.
- """
-
-
-class TermMeaning(BaseModel):
- """A zero-based, half-open span into the Unicode code point space of input text.
-
- All spans are globally laminar and well-nested similar to XML—it is impossible for any two spans to partially overlap; they can only be disjoint, adjacent, or wholly nested. Spans of the exact same type (e.g., segments) will never be duplicated.
-
- A span cannot be empty and will never start or end at whitespace.
-
- Note that, when using programming languages other than Python (which uses zero-based, half-open, Unicode code point-spaced string indexing), indices may need to be translated accordingly (for example, JavaScript slices into UTF-16 code units instead of Unicode code points).
- """
-
- start: int
- """
- The zero-based start index of the half-open span of Unicode code points in the
- input text.
- """
-
- end: int
- """
- The zero-based end index of the half-open span (i.e., the end is exclusive) of
- Unicode code points in the input text.
- """
-
-
-class TermMention(BaseModel):
- """A zero-based, half-open span into the Unicode code point space of input text.
-
- All spans are globally laminar and well-nested similar to XML—it is impossible for any two spans to partially overlap; they can only be disjoint, adjacent, or wholly nested. Spans of the exact same type (e.g., segments) will never be duplicated.
-
- A span cannot be empty and will never start or end at whitespace.
-
- Note that, when using programming languages other than Python (which uses zero-based, half-open, Unicode code point-spaced string indexing), indices may need to be translated accordingly (for example, JavaScript slices into UTF-16 code units instead of Unicode code points).
- """
-
- start: int
- """
- The zero-based start index of the half-open span of Unicode code points in the
- input text.
- """
-
- end: int
- """
- The zero-based end index of the half-open span (i.e., the end is exclusive) of
- Unicode code points in the input text.
- """
-
-
class Term(BaseModel):
"""A term assigned a definite meaning within a document."""
@@ -1012,7 +574,7 @@ class Term(BaseModel):
is a non-negative incrementing integer starting from zero.
"""
- name: TermName
+ name: ILGSv1Span
"""A zero-based, half-open span into the Unicode code point space of input text.
All spans are globally laminar and well-nested similar to XML—it is impossible
@@ -1028,7 +590,7 @@ class Term(BaseModel):
code units instead of Unicode code points).
"""
- meaning: TermMeaning
+ meaning: ILGSv1Span
"""A zero-based, half-open span into the Unicode code point space of input text.
All spans are globally laminar and well-nested similar to XML—it is impossible
@@ -1044,7 +606,7 @@ class Term(BaseModel):
code units instead of Unicode code points).
"""
- mentions: List[TermMention]
+ mentions: List[ILGSv1Span]
"""
An array of spans within the document's text where the term is mentioned outside
of its definition.
@@ -1054,75 +616,6 @@ class Term(BaseModel):
"""
-class ExternalDocumentName(BaseModel):
- """A zero-based, half-open span into the Unicode code point space of input text.
-
- All spans are globally laminar and well-nested similar to XML—it is impossible for any two spans to partially overlap; they can only be disjoint, adjacent, or wholly nested. Spans of the exact same type (e.g., segments) will never be duplicated.
-
- A span cannot be empty and will never start or end at whitespace.
-
- Note that, when using programming languages other than Python (which uses zero-based, half-open, Unicode code point-spaced string indexing), indices may need to be translated accordingly (for example, JavaScript slices into UTF-16 code units instead of Unicode code points).
- """
-
- start: int
- """
- The zero-based start index of the half-open span of Unicode code points in the
- input text.
- """
-
- end: int
- """
- The zero-based end index of the half-open span (i.e., the end is exclusive) of
- Unicode code points in the input text.
- """
-
-
-class ExternalDocumentMention(BaseModel):
- """A zero-based, half-open span into the Unicode code point space of input text.
-
- All spans are globally laminar and well-nested similar to XML—it is impossible for any two spans to partially overlap; they can only be disjoint, adjacent, or wholly nested. Spans of the exact same type (e.g., segments) will never be duplicated.
-
- A span cannot be empty and will never start or end at whitespace.
-
- Note that, when using programming languages other than Python (which uses zero-based, half-open, Unicode code point-spaced string indexing), indices may need to be translated accordingly (for example, JavaScript slices into UTF-16 code units instead of Unicode code points).
- """
-
- start: int
- """
- The zero-based start index of the half-open span of Unicode code points in the
- input text.
- """
-
- end: int
- """
- The zero-based end index of the half-open span (i.e., the end is exclusive) of
- Unicode code points in the input text.
- """
-
-
-class ExternalDocumentPinpoint(BaseModel):
- """A zero-based, half-open span into the Unicode code point space of input text.
-
- All spans are globally laminar and well-nested similar to XML—it is impossible for any two spans to partially overlap; they can only be disjoint, adjacent, or wholly nested. Spans of the exact same type (e.g., segments) will never be duplicated.
-
- A span cannot be empty and will never start or end at whitespace.
-
- Note that, when using programming languages other than Python (which uses zero-based, half-open, Unicode code point-spaced string indexing), indices may need to be translated accordingly (for example, JavaScript slices into UTF-16 code units instead of Unicode code points).
- """
-
- start: int
- """
- The zero-based start index of the half-open span of Unicode code points in the
- input text.
- """
-
- end: int
- """
- The zero-based end index of the half-open span (i.e., the end is exclusive) of
- Unicode code points in the input text.
- """
-
-
class ExternalDocument(BaseModel):
"""A document identified within another document."""
@@ -1132,7 +625,7 @@ class ExternalDocument(BaseModel):
`{index}` is a non-negative incrementing integer starting from zero.
"""
- name: ExternalDocumentName
+ name: ILGSv1Span
"""A zero-based, half-open span into the Unicode code point space of input text.
All spans are globally laminar and well-nested similar to XML—it is impossible
@@ -1200,14 +693,14 @@ class ExternalDocument(BaseModel):
expressing any particular sentiment towards it.
"""
- mentions: List[ExternalDocumentMention]
+ mentions: List[ILGSv1Span]
"""
An array of one or more spans within the document's text where the external
document is mentioned by name, for example, 'the US Constitution' in 'the Second
Amendment to the US Constitution protects freedom of speech'.
"""
- pinpoints: List[ExternalDocumentPinpoint]
+ pinpoints: List[ILGSv1Span]
"""
An array of spans within the document's text where specific parts of the
external document are referenced, for example, 'Section 2' in 'as defined in
@@ -1215,29 +708,6 @@ class ExternalDocument(BaseModel):
"""
-class QuoteSpan(BaseModel):
- """A zero-based, half-open span into the Unicode code point space of input text.
-
- All spans are globally laminar and well-nested similar to XML—it is impossible for any two spans to partially overlap; they can only be disjoint, adjacent, or wholly nested. Spans of the exact same type (e.g., segments) will never be duplicated.
-
- A span cannot be empty and will never start or end at whitespace.
-
- Note that, when using programming languages other than Python (which uses zero-based, half-open, Unicode code point-spaced string indexing), indices may need to be translated accordingly (for example, JavaScript slices into UTF-16 code units instead of Unicode code points).
- """
-
- start: int
- """
- The zero-based start index of the half-open span of Unicode code points in the
- input text.
- """
-
- end: int
- """
- The zero-based end index of the half-open span (i.e., the end is exclusive) of
- Unicode code points in the input text.
- """
-
-
class Quote(BaseModel):
"""A quotation within a document."""
@@ -1265,7 +735,7 @@ class Quote(BaseModel):
documents.
"""
- span: QuoteSpan
+ span: ILGSv1Span
"""A zero-based, half-open span into the Unicode code point space of input text.
All spans are globally laminar and well-nested similar to XML—it is impossible
@@ -1282,29 +752,6 @@ class Quote(BaseModel):
"""
-class DateMention(BaseModel):
- """A zero-based, half-open span into the Unicode code point space of input text.
-
- All spans are globally laminar and well-nested similar to XML—it is impossible for any two spans to partially overlap; they can only be disjoint, adjacent, or wholly nested. Spans of the exact same type (e.g., segments) will never be duplicated.
-
- A span cannot be empty and will never start or end at whitespace.
-
- Note that, when using programming languages other than Python (which uses zero-based, half-open, Unicode code point-spaced string indexing), indices may need to be translated accordingly (for example, JavaScript slices into UTF-16 code units instead of Unicode code points).
- """
-
- start: int
- """
- The zero-based start index of the half-open span of Unicode code points in the
- input text.
- """
-
- end: int
- """
- The zero-based end index of the half-open span (i.e., the end is exclusive) of
- Unicode code points in the input text.
- """
-
-
class Date(BaseModel):
"""
A date identified in a document belonging to one of the following types: `creation`, `signature`, `effective`, `expiry`, `delivery`, `renewal`, `payment`, `birth`, or `death`.
@@ -1359,63 +806,17 @@ class Date(BaseModel):
`{index}` is a non-negative incrementing integer starting from zero.
"""
- mentions: List[DateMention]
+ mentions: List[ILGSv1Span]
"""
An array of one or more spans within the document's text where the date is
mentioned.
"""
-class Heading(BaseModel):
- """A zero-based, half-open span into the Unicode code point space of input text.
-
- All spans are globally laminar and well-nested similar to XML—it is impossible for any two spans to partially overlap; they can only be disjoint, adjacent, or wholly nested. Spans of the exact same type (e.g., segments) will never be duplicated.
-
- A span cannot be empty and will never start or end at whitespace.
-
- Note that, when using programming languages other than Python (which uses zero-based, half-open, Unicode code point-spaced string indexing), indices may need to be translated accordingly (for example, JavaScript slices into UTF-16 code units instead of Unicode code points).
- """
-
- start: int
- """
- The zero-based start index of the half-open span of Unicode code points in the
- input text.
- """
-
- end: int
- """
- The zero-based end index of the half-open span (i.e., the end is exclusive) of
- Unicode code points in the input text.
- """
-
-
-class Junk(BaseModel):
- """A zero-based, half-open span into the Unicode code point space of input text.
-
- All spans are globally laminar and well-nested similar to XML—it is impossible for any two spans to partially overlap; they can only be disjoint, adjacent, or wholly nested. Spans of the exact same type (e.g., segments) will never be duplicated.
-
- A span cannot be empty and will never start or end at whitespace.
-
- Note that, when using programming languages other than Python (which uses zero-based, half-open, Unicode code point-spaced string indexing), indices may need to be translated accordingly (for example, JavaScript slices into UTF-16 code units instead of Unicode code points).
- """
-
- start: int
- """
- The zero-based start index of the half-open span of Unicode code points in the
- input text.
- """
-
- end: int
- """
- The zero-based end index of the half-open span (i.e., the end is exclusive) of
- Unicode code points in the input text.
- """
-
-
class ILGSv1Document(BaseModel):
"""The enriched document."""
- title: Optional[Title] = None
+ title: Optional[ILGSv1Span] = None
"""A zero-based, half-open span into the Unicode code point space of input text.
All spans are globally laminar and well-nested similar to XML—it is impossible
@@ -1431,7 +832,7 @@ class ILGSv1Document(BaseModel):
code units instead of Unicode code points).
"""
- subtitle: Optional[Subtitle] = None
+ subtitle: Optional[ILGSv1Span] = None
"""A zero-based, half-open span into the Unicode code point space of input text.
All spans are globally laminar and well-nested similar to XML—it is impossible
@@ -1550,10 +951,10 @@ class ILGSv1Document(BaseModel):
one of the supported date types are extractable.
"""
- headings: List[Heading]
+ headings: List[ILGSv1Span]
"""An array of spans within the document's text constituting headings."""
- junk: List[Junk]
+ junk: List[ILGSv1Span]
"""
An array of spans within the document's text constituting non-operative,
non-substantive 'junk' content such as headers, footers, page numbers, and OCR
diff --git a/src/isaacus/types/ilgs/ilgs_v1_span.py b/src/isaacus/types/ilgs/ilgs_v1_span.py
new file mode 100644
index 0000000..350bc65
--- /dev/null
+++ b/src/isaacus/types/ilgs/ilgs_v1_span.py
@@ -0,0 +1,28 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from ..._models import BaseModel
+
+__all__ = ["ILGSv1Span"]
+
+
+class ILGSv1Span(BaseModel):
+ """A zero-based, half-open span into the Unicode code point space of input text.
+
+ All spans are globally laminar and well-nested similar to XML—it is impossible for any two spans to partially overlap; they can only be disjoint, adjacent, or wholly nested. Spans of the exact same type (e.g., segments) will never be duplicated.
+
+ A span cannot be empty and will never start or end at whitespace.
+
+ Note that, when using programming languages other than Python (which uses zero-based, half-open, Unicode code point-spaced string indexing), indices may need to be translated accordingly (for example, JavaScript slices into UTF-16 code units instead of Unicode code points).
+ """
+
+ start: int
+ """
+ The zero-based start index of the half-open span of Unicode code points in the
+ input text.
+ """
+
+ end: int
+ """
+ The zero-based end index of the half-open span (i.e., the end is exclusive) of
+ Unicode code points in the input text.
+ """
From 63e845506ef701eaff5cb85652a083e380b03dbc Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Wed, 4 Feb 2026 05:01:43 +0000
Subject: [PATCH 08/11] feat(api): add level field to ILGS v1 segments
---
.stats.yml | 4 ++--
src/isaacus/types/ilgs/ilgs_v1_document.py | 6 ++++++
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index 2dc8ed1..8ae7072 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 5
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/isaacus%2Fisaacus-fa910a5a3d1321234423bd8c042d202a64d4d956ef45847b4de358cb18e447eb.yml
-openapi_spec_hash: 926b9b619c15e8570e496e11d4fb753e
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/isaacus%2Fisaacus-eb64c01e148bcb3f02d717248b3e1ff4f554779928ae52a689c1c73bafee470d.yml
+openapi_spec_hash: 167ee6ce237a5f0d28d99411bc4dc920
config_hash: b2d6fd9ef31cd192d6abb7fceb12e578
diff --git a/src/isaacus/types/ilgs/ilgs_v1_document.py b/src/isaacus/types/ilgs/ilgs_v1_document.py
index 5357d22..c9369d1 100644
--- a/src/isaacus/types/ilgs/ilgs_v1_document.py
+++ b/src/isaacus/types/ilgs/ilgs_v1_document.py
@@ -202,6 +202,12 @@ class Segment(BaseModel):
a non-negative incrementing integer starting from zero.
"""
+ level: int
+ """
+ The level of the segment within the document's segment hierarchy starting from
+ `0` for root-level segments.
+ """
+
span: ILGSv1Span
"""A zero-based, half-open span into the Unicode code point space of input text.
From cd485eb173c7f454aecfd114121672172a75824c Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Wed, 4 Feb 2026 05:06:11 +0000
Subject: [PATCH 09/11] feat(sdk): move ilgs structs around
---
.stats.yml | 2 +-
api.md | 19 +-
src/isaacus/types/enrichment_response.py | 4 +-
src/isaacus/types/ilgs/__init__.py | 3 -
src/isaacus/types/ilgs/ilgs_v1_document.py | 970 ------------------
src/isaacus/types/ilgs/v1/__init__.py | 18 +
src/isaacus/types/ilgs/v1/crossreference.py | 42 +
src/isaacus/types/ilgs/v1/date.py | 70 ++
src/isaacus/types/ilgs/v1/document.py | 172 ++++
src/isaacus/types/ilgs/v1/email.py | 27 +
.../types/ilgs/v1/external_document.py | 101 ++
src/isaacus/types/ilgs/v1/id_number.py | 27 +
src/isaacus/types/ilgs/v1/location.py | 53 +
src/isaacus/types/ilgs/v1/person.py | 195 ++++
src/isaacus/types/ilgs/v1/phone_number.py | 30 +
src/isaacus/types/ilgs/v1/quote.py | 52 +
src/isaacus/types/ilgs/v1/segment.py | 211 ++++
.../ilgs/{ilgs_v1_span.py => v1/span.py} | 6 +-
src/isaacus/types/ilgs/v1/term.py | 59 ++
src/isaacus/types/ilgs/v1/website.py | 28 +
20 files changed, 1109 insertions(+), 980 deletions(-)
delete mode 100644 src/isaacus/types/ilgs/ilgs_v1_document.py
create mode 100644 src/isaacus/types/ilgs/v1/__init__.py
create mode 100644 src/isaacus/types/ilgs/v1/crossreference.py
create mode 100644 src/isaacus/types/ilgs/v1/date.py
create mode 100644 src/isaacus/types/ilgs/v1/document.py
create mode 100644 src/isaacus/types/ilgs/v1/email.py
create mode 100644 src/isaacus/types/ilgs/v1/external_document.py
create mode 100644 src/isaacus/types/ilgs/v1/id_number.py
create mode 100644 src/isaacus/types/ilgs/v1/location.py
create mode 100644 src/isaacus/types/ilgs/v1/person.py
create mode 100644 src/isaacus/types/ilgs/v1/phone_number.py
create mode 100644 src/isaacus/types/ilgs/v1/quote.py
create mode 100644 src/isaacus/types/ilgs/v1/segment.py
rename src/isaacus/types/ilgs/{ilgs_v1_span.py => v1/span.py} (92%)
create mode 100644 src/isaacus/types/ilgs/v1/term.py
create mode 100644 src/isaacus/types/ilgs/v1/website.py
diff --git a/.stats.yml b/.stats.yml
index 8ae7072..1eadd7a 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 5
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/isaacus%2Fisaacus-eb64c01e148bcb3f02d717248b3e1ff4f554779928ae52a689c1c73bafee470d.yml
openapi_spec_hash: 167ee6ce237a5f0d28d99411bc4dc920
-config_hash: b2d6fd9ef31cd192d6abb7fceb12e578
+config_hash: 7b8cddc2fa896f9ab05e6b05055c7f27
diff --git a/api.md b/api.md
index 1c4e7c4..c4c5055 100644
--- a/api.md
+++ b/api.md
@@ -66,8 +66,25 @@ Methods:
## v1
+### v1
+
Types:
```python
-from isaacus.types.ilgs import ILGSv1Document, ILGSv1Span
+from isaacus.types.ilgs.v1 import (
+ Crossreference,
+ Date,
+ Document,
+ Email,
+ ExternalDocument,
+ IDNumber,
+ Location,
+ Person,
+ PhoneNumber,
+ Quote,
+ Segment,
+ Span,
+ Term,
+ Website,
+)
```
diff --git a/src/isaacus/types/enrichment_response.py b/src/isaacus/types/enrichment_response.py
index adcd7e9..809bcf4 100644
--- a/src/isaacus/types/enrichment_response.py
+++ b/src/isaacus/types/enrichment_response.py
@@ -3,7 +3,7 @@
from typing import List
from .._models import BaseModel
-from .ilgs.ilgs_v1_document import ILGSv1Document
+from .ilgs.v1.document import Document
__all__ = ["EnrichmentResponse", "Result", "Usage"]
@@ -17,7 +17,7 @@ class Result(BaseModel):
therefore, ending at the number of inputs minus `1`).
"""
- document: ILGSv1Document
+ document: Document
"""The enriched document."""
diff --git a/src/isaacus/types/ilgs/__init__.py b/src/isaacus/types/ilgs/__init__.py
index 5cbc182..f8ee8b1 100644
--- a/src/isaacus/types/ilgs/__init__.py
+++ b/src/isaacus/types/ilgs/__init__.py
@@ -1,6 +1,3 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from __future__ import annotations
-
-from .ilgs_v1_span import ILGSv1Span as ILGSv1Span
-from .ilgs_v1_document import ILGSv1Document as ILGSv1Document
diff --git a/src/isaacus/types/ilgs/ilgs_v1_document.py b/src/isaacus/types/ilgs/ilgs_v1_document.py
deleted file mode 100644
index c9369d1..0000000
--- a/src/isaacus/types/ilgs/ilgs_v1_document.py
+++ /dev/null
@@ -1,970 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import List, Optional
-from typing_extensions import Literal
-
-from ..._models import BaseModel
-from .ilgs_v1_span import ILGSv1Span
-
-__all__ = [
- "ILGSv1Document",
- "Segment",
- "Crossreference",
- "Location",
- "Person",
- "Email",
- "Website",
- "PhoneNumber",
- "IDNumber",
- "Term",
- "ExternalDocument",
- "Quote",
- "Date",
-]
-
-
-class Segment(BaseModel):
- """
- A segment within the document representing a structurally distinct portion of the document's content.
- """
-
- id: str
- """
- The unique identifier of the segment in the format `seg:{index}` where `{index}`
- is a non-negative incrementing integer starting from zero.
- """
-
- kind: Literal["container", "unit", "item", "figure"]
- """
- The structural 'kind' of the segment, being one of `container`, `unit`, `item`,
- or `figure`.
-
- A `container` is a structural or semantic grouping of content such as a chapter.
- It can contain segments of any kind or none at all.
-
- A `unit` is a single syntactically independent unit of text such as a paragraph.
- It can only contain `item`s and `figure`s.
-
- An `item` is a syntactically subordinate unit of text such as an item in a
- run-in list. It can only contain other `item`s. Note that an `item` is
- conceptually distinct from a list item—it is perfectly possible to encounter
- list items that are syntactically independent of their surrounding items just as
- it is possible to encounter dependent clauses that do not appear as part of a
- list.
-
- A `figure` is a visually structured or tabular unit of content such as a
- diagram, equation, or table. It cannot contain segments.
- """
-
- type: Optional[
- Literal[
- "title",
- "book",
- "part",
- "chapter",
- "subchapter",
- "division",
- "subdivision",
- "subpart",
- "subtitle",
- "table_of_contents",
- "article",
- "section",
- "regulation",
- "rule",
- "clause",
- "paragraph",
- "subarticle",
- "subsection",
- "subregulation",
- "subrule",
- "subclause",
- "subparagraph",
- "item",
- "subitem",
- "point",
- "indent",
- "schedule",
- "annex",
- "appendix",
- "exhibit",
- "recital",
- "signature",
- "note",
- "figure",
- "table",
- "formula",
- ]
- ] = None
- """
- The addressable 'type' of the segment within the document's referential scheme
- and hierarchy, whether defined explicitly (e.g., by headings, such as
- 'Section 2. Definitions'), implicitly (e.g., by way of reference, such as 'as
- defined in Section 2'), or by convention (e.g., [42] in a judgment often denotes
- a `paragraph`, independent provisions in statute are often `section`s, etc.). If
- the type is not known or not applicable, it will be set to `null`.
-
- Note that, although many segment types may coincide with syntactic constructs,
- they should be thought of purely as distinct formal citable units. Most
- paragraphs (in the syntactic sense) will not have the `paragraph` type, for
- example. That type is reserved for segments that would formally be cited as a
- 'Paragraph' within the document's referential scheme.
-
- The following types are currently supported: `title`, `book`, `part`, `chapter`,
- `subchapter`, `division`, `subdivision`, `subpart`, `subtitle`,
- `table_of_contents`, `article`, `section`, `regulation`, `rule`, `clause`,
- `paragraph`, `subarticle`, `subsection`, `subregulation`, `subrule`,
- `subclause`, `subparagraph`, `item`, `subitem`, `point`, `indent`, `schedule`,
- `annex`, `appendix`, `exhibit`, `recital`, `signature`, `note`, `figure`,
- `table`, and `formula`.
-
- The `title`, `book`, `part`, `chapter`, `subchapter`, `division`, `subdivision`,
- `subpart`, `subtitle`, and `table_of_contents` types are exclusive to the
- `container` kind.
-
- The `figure` kind only supports the `figure`, `table`, and `formula` types, all
- of which are exclusive to it.
- """
-
- category: Literal["front_matter", "scope", "main", "annotation", "back_matter", "other"]
- """
- The functional 'category' of the segment within the document, being one of
- `front_matter`, `scope`, `main`, `annotation`, `back_matter`, or `other`.
-
- `front_matter` denotes non-operative contextualizing content occurring at the
- start of a document such as a preamble or recitals.
-
- `scope` denotes operative content defining the application or interpretation of
- a document such as definition sections and governing law clauses.
-
- `main` denotes operative, non-scopal content.
-
- `annotation` denotes non-operative annotative content providing explanatory or
- referential information such as commentary, footnotes, and endnotes.
-
- `back_matter` denotes non-operative contextualizing content occurring at the end
- of a document such as authority statements.
-
- `other` denotes content that does not fit into any of the other categories.
- """
-
- type_name: Optional[ILGSv1Span] = None
- """A zero-based, half-open span into the Unicode code point space of input text.
-
- All spans are globally laminar and well-nested similar to XML—it is impossible
- for any two spans to partially overlap; they can only be disjoint, adjacent, or
- wholly nested. Spans of the exact same type (e.g., segments) will never be
- duplicated.
-
- A span cannot be empty and will never start or end at whitespace.
-
- Note that, when using programming languages other than Python (which uses
- zero-based, half-open, Unicode code point-spaced string indexing), indices may
- need to be translated accordingly (for example, JavaScript slices into UTF-16
- code units instead of Unicode code points).
- """
-
- code: Optional[ILGSv1Span] = None
- """A zero-based, half-open span into the Unicode code point space of input text.
-
- All spans are globally laminar and well-nested similar to XML—it is impossible
- for any two spans to partially overlap; they can only be disjoint, adjacent, or
- wholly nested. Spans of the exact same type (e.g., segments) will never be
- duplicated.
-
- A span cannot be empty and will never start or end at whitespace.
-
- Note that, when using programming languages other than Python (which uses
- zero-based, half-open, Unicode code point-spaced string indexing), indices may
- need to be translated accordingly (for example, JavaScript slices into UTF-16
- code units instead of Unicode code points).
- """
-
- title: Optional[ILGSv1Span] = None
- """A zero-based, half-open span into the Unicode code point space of input text.
-
- All spans are globally laminar and well-nested similar to XML—it is impossible
- for any two spans to partially overlap; they can only be disjoint, adjacent, or
- wholly nested. Spans of the exact same type (e.g., segments) will never be
- duplicated.
-
- A span cannot be empty and will never start or end at whitespace.
-
- Note that, when using programming languages other than Python (which uses
- zero-based, half-open, Unicode code point-spaced string indexing), indices may
- need to be translated accordingly (for example, JavaScript slices into UTF-16
- code units instead of Unicode code points).
- """
-
- parent: Optional[str] = None
- """
- A unique identifier for a segment in the format `seg:{index}` where `{index}` is
- a non-negative incrementing integer starting from zero.
- """
-
- level: int
- """
- The level of the segment within the document's segment hierarchy starting from
- `0` for root-level segments.
- """
-
- span: ILGSv1Span
- """A zero-based, half-open span into the Unicode code point space of input text.
-
- All spans are globally laminar and well-nested similar to XML—it is impossible
- for any two spans to partially overlap; they can only be disjoint, adjacent, or
- wholly nested. Spans of the exact same type (e.g., segments) will never be
- duplicated.
-
- A span cannot be empty and will never start or end at whitespace.
-
- Note that, when using programming languages other than Python (which uses
- zero-based, half-open, Unicode code point-spaced string indexing), indices may
- need to be translated accordingly (for example, JavaScript slices into UTF-16
- code units instead of Unicode code points).
- """
-
-
-class Crossreference(BaseModel):
- """A cross-reference within the document pointing to one or more segments."""
-
- start: str
- """
- The unique identifier of the earliest segment in the span of segments being
- cross-referenced with ties broken in favor of the least-nested (i.e., largest)
- segment. If the cross-reference points to a single segment, `start` and `end`
- will be identical.
- """
-
- end: str
- """
- The unique identifier of the latest segment in the span of segments being
- cross-referenced with ties broken in favor of the least-nested (i.e., largest)
- segment. If the cross-reference points to a single segment, `start` and `end`
- will be identical.
- """
-
- span: ILGSv1Span
- """A zero-based, half-open span into the Unicode code point space of input text.
-
- All spans are globally laminar and well-nested similar to XML—it is impossible
- for any two spans to partially overlap; they can only be disjoint, adjacent, or
- wholly nested. Spans of the exact same type (e.g., segments) will never be
- duplicated.
-
- A span cannot be empty and will never start or end at whitespace.
-
- Note that, when using programming languages other than Python (which uses
- zero-based, half-open, Unicode code point-spaced string indexing), indices may
- need to be translated accordingly (for example, JavaScript slices into UTF-16
- code units instead of Unicode code points).
- """
-
-
-class Location(BaseModel):
- """A location identified within a document."""
-
- id: str
- """
- The unique identifier of the location in the format `loc:{index}` where
- `{index}` is a non-negative incrementing integer starting from zero.
- """
-
- name: ILGSv1Span
- """A zero-based, half-open span into the Unicode code point space of input text.
-
- All spans are globally laminar and well-nested similar to XML—it is impossible
- for any two spans to partially overlap; they can only be disjoint, adjacent, or
- wholly nested. Spans of the exact same type (e.g., segments) will never be
- duplicated.
-
- A span cannot be empty and will never start or end at whitespace.
-
- Note that, when using programming languages other than Python (which uses
- zero-based, half-open, Unicode code point-spaced string indexing), indices may
- need to be translated accordingly (for example, JavaScript slices into UTF-16
- code units instead of Unicode code points).
- """
-
- type: Literal["country", "state", "city", "address", "other"]
- """
- The type of the location, being one of `country`, `state`, `city`, `address`, or
- `other`.
- """
-
- parent: Optional[str] = None
- """
- A unique identifier for a location in the format `loc:{index}` where `{index}`
- is a non-negative incrementing integer starting from zero.
- """
-
- mentions: List[ILGSv1Span]
- """
- An array of one or more spans within the document's text where the location is
- mentioned.
- """
-
-
-class Person(BaseModel):
- """A legal person identified in a document."""
-
- id: str
- """
- The unique identifier of the person in the format `per:{index}` where `{index}`
- is a non-negative incrementing integer starting from zero.
- """
-
- name: ILGSv1Span
- """A zero-based, half-open span into the Unicode code point space of input text.
-
- All spans are globally laminar and well-nested similar to XML—it is impossible
- for any two spans to partially overlap; they can only be disjoint, adjacent, or
- wholly nested. Spans of the exact same type (e.g., segments) will never be
- duplicated.
-
- A span cannot be empty and will never start or end at whitespace.
-
- Note that, when using programming languages other than Python (which uses
- zero-based, half-open, Unicode code point-spaced string indexing), indices may
- need to be translated accordingly (for example, JavaScript slices into UTF-16
- code units instead of Unicode code points).
- """
-
- type: Literal["natural", "corporate", "politic"]
- """
- The legal entity type of the person, being one of `natural`, `corporate`, or
- `politic`.
-
- `natural` denotes a human being in their capacity as a natural legal person,
- including when representing unincorporated entities such as partnerships and
- trusts.
-
- `corporate` denotes a body corporate such as a company, incorporated
- partnership, or statutory corporation.
-
- `politic` denotes a body politic such as a court, state, government, or
- intergovernmental organization.
- """
-
- role: Literal[
- "plaintiff",
- "petitioner",
- "applicant",
- "appellant",
- "appellee",
- "claimant",
- "complainant",
- "defendant",
- "respondent",
- "prior_authority",
- "prosecutor",
- "defense_counsel",
- "amicus",
- "intervener",
- "borrower",
- "lender",
- "guarantor",
- "lessee",
- "lessor",
- "employer",
- "employee",
- "licensor",
- "licensee",
- "franchisor",
- "franchisee",
- "buyer",
- "seller",
- "contractor",
- "shareholder",
- "joint_venturer",
- "investor",
- "insurer",
- "insured",
- "enacting_authority",
- "empowered_authority",
- "settlor",
- "trustee",
- "beneficiary",
- "debater",
- "director",
- "governing_jurisdiction",
- "clerk",
- "witness",
- "other",
- "non_party",
- ]
- """The role of the person in relation to the subject of the document.
-
- The following roles are currently supported: | | | | ------------------------ |
- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- | | `plaintiff` | A party initiating the case that is the subject of the
- document. | | `petitioner` | A party initiating the petition that is the subject
- of the document. | | `applicant` | A party initiating the application that is
- the subject of the document. | | `appellant` | A party appealing the decision
- that is the subject of the document. | | `appellee` | A party responding to the
- appeal that is the subject of the document if they are explicitly referred to as
- an 'appellee'. | | `claimant` | A party making a claim in the case that is the
- subject of the document. | | `complainant` | A party making a complaint in the
- case that is the subject of the document. | | `defendant` | A party defending
- against the case that is the subject of the document. | | `respondent` | A party
- responding to the petition, appeal, or application that is the subject of the
- document. | | `prior_authority` | An authority (e.g., judge, tribunal, court)
- that made a prior decision in the case that is the subject of the document. Both
- individual judges and courts should be annotated with this role where
- applicable. This is not to be used for authorities cited as precedent, only for
- those that made prior decisions in the same case. | | `prosecutor` | A lawyer
- prosecuting the case that is the subject of the document. | | `defense_counsel`
- | A lawyer defending the case that is the subject of the document. | | `amicus`
- | A party filing an amicus curiae brief in the case that is the subject of the
- document. | | `intervener` | A party attempting to or that has intervened in the
- case that is the subject of the document. | | `borrower` | A party borrowing
- money or other assets under the agreement that is the subject of the document,
- including 'mortgagors' and 'debtors'. | | `lender` | A party lending money or
- other assets under the agreement that is the subject of the document, including
- 'mortgagees' and 'creditors'. | | `guarantor` | A party guaranteeing obligations
- under the agreement that is the subject of the document, including 'sureties'. |
- | `lessee` | A party leasing goods or services under the agreement that is the
- subject of the document, including 'tenants'. | | `lessor` | A party leasing
- goods or services under the agreement that is the subject of the document,
- including 'landlords'. | | `employer` | A party employing personnel under the
- agreement that is the subject of the document. | | `employee` | A party employed
- under the agreement that is the subject of the document. | | `licensor` | A
- party licensing intellectual property or other rights under the agreement that
- are the subject of the document. | | `licensee` | A party licensed to use
- intellectual property or other rights under the agreement that are the subject
- of the document. | | `franchisor` | A party granting a franchise under the
- agreement that is the subject of the document. | | `franchisee` | A party
- granted a franchise under the agreement that is the subject of the document. | |
- `buyer` | A party purchasing goods or services under the agreement that is the
- subject of the document, including 'purchasers', 'customers', and 'clients'. | |
- `seller` | A party selling or providing goods or services under the agreement
- that is the subject of the document, including 'Vendors', 'Suppliers', and
- 'Service Providers' (where such parties are actually providing goods or services
- under the agreement). | | `contractor` | A party contracted to perform work or
- services under the agreement that is the subject of the document, including
- 'consultants'. | | `shareholder` | A party holding shares or equity under the
- agreement that is the subject of the document. | | `joint_venturer` | A party
- participating in a joint venture under the agreement that is the subject of the
- document. | | `investor` | A party investing money or assets under the agreement
- that is the subject of the document. | | `insurer` | A party providing insurance
- under the agreement that is the subject of the document. | | `insured` | A party
- insured under the agreement that is the subject of the document. | | `settlor` |
- A party establishing the trust that is the subject of the document. | |
- `trustee` | A party managing the trust that is the subject of the document. | |
- `beneficiary` | A party benefiting from the trust that is the subject of the
- document. | | `enacting_authority` | An authority (e.g., legislature, regulator,
- Minister/Secretary, President/Prime Minister, tribunal, court, judge) giving
- legal effect to or authorizing the document. All relevant individuals and bodies
- should be annotated with this role where applicable. | | `empowered_authority` |
- An authority (e.g., government agency, regulator, Minister/Secretary,
- President/Prime Minister, tribunal, court) empowered by the document to carry
- out functions or duties. | | `debater` | A person participating in the debate
- that is the subject of the document. | | `governing_jurisdiction` | The
- jurisdiction whose laws govern the document. | | `director` | A director or
- other officer of a corporate legal person mentioned in the document. | | `clerk`
- | A clerk, notary, or other official certifying, witnessing, filing, recording,
- registering, or otherwise administering the document. | | `witness` | A witness
- witnessing the signing of the document, or whose testimony is part of the case
- that is the subject of the document. | | `other` | A party to the case,
- agreement, legislation, or regulation that is the subject of the document that
- does not fit into any of the other roles. | | `non_party` | A legal person
- mentioned in the document that is not a party to the case, agreement,
- legislation, or regulation that is the subject of the document. |
- """
-
- parent: Optional[str] = None
- """
- A unique identifier for a legal person in the format `per:{index}` where
- `{index}` is a non-negative incrementing integer starting from zero.
- """
-
- residence: Optional[str] = None
- """
- A unique identifier for a location in the format `loc:{index}` where `{index}`
- is a non-negative incrementing integer starting from zero.
- """
-
- mentions: List[ILGSv1Span]
- """
- An array of one or more spans within the document's text where the person is
- mentioned.
- """
-
-
-class Email(BaseModel):
- """An email address identified in a document belonging to a legal person.
-
- If an email address was mentioned in the document but is not attributable to a legal person, it will not be extracted.
- """
-
- address: str
- """The normalized email address."""
-
- person: str
- """The unique identifier of the person that this email address belongs to."""
-
- mentions: List[ILGSv1Span]
- """
- An array of one or more spans within the document's text where the email address
- is mentioned.
- """
-
-
-class Website(BaseModel):
- """A website identified in a document belonging to a legal person.
-
- If a website was mentioned in the document but is not attributable to a legal person, it will not be extracted.
- """
-
- url: str
- """The normalized URL of the website in the form `https://{host}/`."""
-
- person: str
- """The unique identifier of the person that this website belongs to."""
-
- mentions: List[ILGSv1Span]
- """
- An array of one or more spans within the document's text where the website is
- mentioned (including paths and slugs which are not part of the website's
- normalized URL).
- """
-
-
-class PhoneNumber(BaseModel):
- """A valid phone number identified in a document belonging to a legal person.
-
- If a phone number was mentioned in the document but is not valid, possible, or attributable to a legal person, it will not be extracted.
- """
-
- number: str
- """
- The normalized phone number in E.123 international notation conforming with
- local conventions on the use of spaces and hyphens as separators.
- """
-
- person: str
- """The unique identifier of the person that this phone number belongs to."""
-
- mentions: List[ILGSv1Span]
- """
- An array of one or more spans within the document's text where the phone number
- is mentioned.
- """
-
-
-class IDNumber(BaseModel):
- """An identification number mentioned in a document belonging to a legal person.
-
- If an identification number was mentioned in the document but is not attributable to a legal person, it will not be extracted.
- """
-
- number: str
- """The identification number."""
-
- person: str
- """The unique identifier of the person that this identification number belongs to."""
-
- mentions: List[ILGSv1Span]
- """
- An array of one or more spans within the document's text where the
- identification number is mentioned.
- """
-
-
-class Term(BaseModel):
- """A term assigned a definite meaning within a document."""
-
- id: str
- """
- The unique identifier of the term in the format `term:{index}` where `{index}`
- is a non-negative incrementing integer starting from zero.
- """
-
- name: ILGSv1Span
- """A zero-based, half-open span into the Unicode code point space of input text.
-
- All spans are globally laminar and well-nested similar to XML—it is impossible
- for any two spans to partially overlap; they can only be disjoint, adjacent, or
- wholly nested. Spans of the exact same type (e.g., segments) will never be
- duplicated.
-
- A span cannot be empty and will never start or end at whitespace.
-
- Note that, when using programming languages other than Python (which uses
- zero-based, half-open, Unicode code point-spaced string indexing), indices may
- need to be translated accordingly (for example, JavaScript slices into UTF-16
- code units instead of Unicode code points).
- """
-
- meaning: ILGSv1Span
- """A zero-based, half-open span into the Unicode code point space of input text.
-
- All spans are globally laminar and well-nested similar to XML—it is impossible
- for any two spans to partially overlap; they can only be disjoint, adjacent, or
- wholly nested. Spans of the exact same type (e.g., segments) will never be
- duplicated.
-
- A span cannot be empty and will never start or end at whitespace.
-
- Note that, when using programming languages other than Python (which uses
- zero-based, half-open, Unicode code point-spaced string indexing), indices may
- need to be translated accordingly (for example, JavaScript slices into UTF-16
- code units instead of Unicode code points).
- """
-
- mentions: List[ILGSv1Span]
- """
- An array of spans within the document's text where the term is mentioned outside
- of its definition.
-
- It is possible for the term to have no mentions if, outside of its definition,
- it is never referred to in the document.
- """
-
-
-class ExternalDocument(BaseModel):
- """A document identified within another document."""
-
- id: str
- """
- The unique identifier of the external document in the format `exd:{index}` where
- `{index}` is a non-negative incrementing integer starting from zero.
- """
-
- name: ILGSv1Span
- """A zero-based, half-open span into the Unicode code point space of input text.
-
- All spans are globally laminar and well-nested similar to XML—it is impossible
- for any two spans to partially overlap; they can only be disjoint, adjacent, or
- wholly nested. Spans of the exact same type (e.g., segments) will never be
- duplicated.
-
- A span cannot be empty and will never start or end at whitespace.
-
- Note that, when using programming languages other than Python (which uses
- zero-based, half-open, Unicode code point-spaced string indexing), indices may
- need to be translated accordingly (for example, JavaScript slices into UTF-16
- code units instead of Unicode code points).
- """
-
- type: Literal["statute", "regulation", "decision", "contract", "other"]
- """
- The type of the external document, being one of `statute`, `regulation`,
- `decision`, `contract`, or `other`.
-
- `statute` denotes primary legislation such as acts, bills, codes, and
- constitutions.
-
- `regulation` denotes secondary legislation such as rules, statutory instruments,
- and ordinances.
-
- `decision` denotes judicial or quasi-judicial decisions such as court judgments,
- judicial opinions, and tribunal rulings.
-
- `other` is used for all other types of legal documents that do not fit into any
- of the predefined types.
- """
-
- jurisdiction: Optional[str] = None
- """
- A jurisdiction code representing a country (via an initial country code) and,
- optionally, a subdivision within that country (via a subsequent subdivision code
- prefixed by a hyphen).
-
- All 249 ISO 3166-1 alpha-2 country codes are representable in addition to
- special `INT` and `EU` codes for international and European Union law,
- respectively.
-
- All 5,046 ISO 3166-2 codes are also representable in addition to a special `FED`
- code for federal law.
- """
-
- reception: Literal["positive", "mixed", "negative", "neutral"]
- """
- The sentiment of the document towards the external document, being one of
- `positive`, `mixed`, `negative`, or `neutral`.
-
- `positive` indicates that the document expresses a favorable view of the
- external document whether by endorsing or approving it.
-
- `mixed` indicates that the document expresses both favorable and unfavorable
- views of the external document, for example, by affirming parts of it and
- disapproving others.
-
- `negative` indicates that the document expresses an unfavorable view of the
- external document whether by criticizing, repealing, overruling, or explicitly
- contradicting it.
-
- `neutral` indicates that the document references the external document without
- expressing any particular sentiment towards it.
- """
-
- mentions: List[ILGSv1Span]
- """
- An array of one or more spans within the document's text where the external
- document is mentioned by name, for example, 'the US Constitution' in 'the Second
- Amendment to the US Constitution protects freedom of speech'.
- """
-
- pinpoints: List[ILGSv1Span]
- """
- An array of spans within the document's text where specific parts of the
- external document are referenced, for example, 'Section 2' in 'as defined in
- Section 2 of the US Constitution'.
- """
-
-
-class Quote(BaseModel):
- """A quotation within a document."""
-
- source_segment: Optional[str] = None
- """
- A unique identifier for a segment in the format `seg:{index}` where `{index}` is
- a non-negative incrementing integer starting from zero.
- """
-
- source_document: Optional[str] = None
- """
- A unique identifier for an external document in the format `exd:{index}` where
- `{index}` is a non-negative incrementing integer starting from zero.
- """
-
- source_person: Optional[str] = None
- """
- A unique identifier for a legal person in the format `per:{index}` where
- `{index}` is a non-negative incrementing integer starting from zero.
- """
-
- amending: bool
- """
- Whether the quote is being used to amend or modify content, typically in other
- documents.
- """
-
- span: ILGSv1Span
- """A zero-based, half-open span into the Unicode code point space of input text.
-
- All spans are globally laminar and well-nested similar to XML—it is impossible
- for any two spans to partially overlap; they can only be disjoint, adjacent, or
- wholly nested. Spans of the exact same type (e.g., segments) will never be
- duplicated.
-
- A span cannot be empty and will never start or end at whitespace.
-
- Note that, when using programming languages other than Python (which uses
- zero-based, half-open, Unicode code point-spaced string indexing), indices may
- need to be translated accordingly (for example, JavaScript slices into UTF-16
- code units instead of Unicode code points).
- """
-
-
-class Date(BaseModel):
- """
- A date identified in a document belonging to one of the following types: `creation`, `signature`, `effective`, `expiry`, `delivery`, `renewal`, `payment`, `birth`, or `death`.
-
- Only Gregorian dates between the years 1000 and 9999 (inclusive) fitting into one of the supported date types are extractable.
- """
-
- value: str
- """The date in ISO 8601 format (YYYY-MM-DD)."""
-
- type: Literal["creation", "signature", "effective", "expiry", "delivery", "renewal", "payment", "birth", "death"]
- """
- The type of the date, being one of `creation`, `signature`, `effective`,
- `expiry`, `delivery`, `renewal`, `payment`, `birth`, or `death`. If a date is
- mentioned in a document that does not fit into a supported type, it will not be
- extracted.
-
- `creation` denotes the date the document was created. There may only be one
- `creation` date per document.
-
- `signature` denotes the date the document was signed.
-
- `effective` denotes the date when the document or a part thereof comes into
- effect (e.g., commencement or enactment dates).
-
- `expiry` denotes the date when the document or a part thereof is no longer in
- effect.
-
- `delivery` denotes the date when goods or services are to be delivered under the
- document.
-
- `renewal` denotes the date when one or more of the document's terms are to be
- renewed.
-
- `payment` denotes the date when payment is to be made under the document.
-
- `birth` denotes the birth date of a natural person or establishment (e.g.,
- incorporation) date of a non-natural legal person identified in the document.
- There can only be one `birth` date linked to a single person and all `birth`
- dates must be linked to a person. A person's `birth` date will never be after
- their `death` date.
-
- `death` denotes the death date of a natural person or dissolution date of a
- non-natural legal person identified in the document. There can only be one
- `death` date linked to a single person and all `death` dates must be linked to a
- person. A person's `death` date will never be before their `birth` date.
- """
-
- person: Optional[str] = None
- """
- A unique identifier for a legal person in the format `per:{index}` where
- `{index}` is a non-negative incrementing integer starting from zero.
- """
-
- mentions: List[ILGSv1Span]
- """
- An array of one or more spans within the document's text where the date is
- mentioned.
- """
-
-
-class ILGSv1Document(BaseModel):
- """The enriched document."""
-
- title: Optional[ILGSv1Span] = None
- """A zero-based, half-open span into the Unicode code point space of input text.
-
- All spans are globally laminar and well-nested similar to XML—it is impossible
- for any two spans to partially overlap; they can only be disjoint, adjacent, or
- wholly nested. Spans of the exact same type (e.g., segments) will never be
- duplicated.
-
- A span cannot be empty and will never start or end at whitespace.
-
- Note that, when using programming languages other than Python (which uses
- zero-based, half-open, Unicode code point-spaced string indexing), indices may
- need to be translated accordingly (for example, JavaScript slices into UTF-16
- code units instead of Unicode code points).
- """
-
- subtitle: Optional[ILGSv1Span] = None
- """A zero-based, half-open span into the Unicode code point space of input text.
-
- All spans are globally laminar and well-nested similar to XML—it is impossible
- for any two spans to partially overlap; they can only be disjoint, adjacent, or
- wholly nested. Spans of the exact same type (e.g., segments) will never be
- duplicated.
-
- A span cannot be empty and will never start or end at whitespace.
-
- Note that, when using programming languages other than Python (which uses
- zero-based, half-open, Unicode code point-spaced string indexing), indices may
- need to be translated accordingly (for example, JavaScript slices into UTF-16
- code units instead of Unicode code points).
- """
-
- type: Literal["statute", "regulation", "decision", "contract", "other"]
- """
- The type of the document, being one of `statute`, `regulation`, `decision`,
- `contract`, or `other`.
-
- `statute` denotes primary legislation such as acts, bills, codes, and
- constitutions.
-
- `regulation` denotes secondary legislation such as rules, statutory instruments,
- and ordinances.
-
- `decision` denotes judicial or quasi-judicial decisions such as court judgments,
- judicial opinions, and tribunal rulings.
-
- `other` is used for all other types of legal documents that do not fit into any
- of the predefined types.
- """
-
- jurisdiction: Optional[str] = None
- """
- A jurisdiction code representing a country (via an initial country code) and,
- optionally, a subdivision within that country (via a subsequent subdivision code
- prefixed by a hyphen).
-
- All 249 ISO 3166-1 alpha-2 country codes are representable in addition to
- special `INT` and `EU` codes for international and European Union law,
- respectively.
-
- All 5,046 ISO 3166-2 codes are also representable in addition to a special `FED`
- code for federal law.
- """
-
- segments: List[Segment]
- """
- An array of segments within the document representing structurally distinct
- portions of its content.
- """
-
- crossreferences: List[Crossreference]
- """
- An array of cross-references within the document pointing to a single segment or
- a span of segments.
- """
-
- locations: List[Location]
- """An array of locations identified in the document."""
-
- persons: List[Person]
- """An array of legal persons identified in the document."""
-
- emails: List[Email]
- """
- An array of email addresses identified in the document belonging to legal
- persons.
-
- Email addresses mentioned in the document that are not attributable to legal
- persons will not be extracted.
- """
-
- websites: List[Website]
- """An array of websites identified in the document belonging to legal persons.
-
- Websites mentioned in the document that are not attributable to legal persons
- will not be extracted.
- """
-
- phone_numbers: List[PhoneNumber]
- """
- An array of valid phone numbers identified in the document belonging to legal
- persons.
-
- Phone numbers mentioned in the document that are not valid, possible, or
- attributable to legal persons will not be extracted.
- """
-
- id_numbers: List[IDNumber]
- """
- An array of identification numbers identified in the document belonging to legal
- persons.
-
- Identification numbers mentioned in the document that are not attributable to
- legal persons will not be extracted.
- """
-
- terms: List[Term]
- """An array of terms assigned definite meanings within the document."""
-
- external_documents: List[ExternalDocument]
- """An array of documents identified within the document."""
-
- quotes: List[Quote]
- """An array of quotations within the document."""
-
- dates: List[Date]
- """
- An array of dates identified in the document belonging to one of the following
- types: `creation`, `signature`, `effective`, `expiry`, `delivery`, `renewal`,
- `payment`, `birth`, or `death`.
-
- Only Gregorian dates between the years 1000 and 9999 (inclusive) fitting into
- one of the supported date types are extractable.
- """
-
- headings: List[ILGSv1Span]
- """An array of spans within the document's text constituting headings."""
-
- junk: List[ILGSv1Span]
- """
- An array of spans within the document's text constituting non-operative,
- non-substantive 'junk' content such as headers, footers, page numbers, and OCR
- artifacts.
- """
-
- version: Literal["ilgs@1"]
diff --git a/src/isaacus/types/ilgs/v1/__init__.py b/src/isaacus/types/ilgs/v1/__init__.py
new file mode 100644
index 0000000..6f8d0d9
--- /dev/null
+++ b/src/isaacus/types/ilgs/v1/__init__.py
@@ -0,0 +1,18 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from .date import Date as Date
+from .span import Span as Span
+from .term import Term as Term
+from .email import Email as Email
+from .quote import Quote as Quote
+from .person import Person as Person
+from .segment import Segment as Segment
+from .website import Website as Website
+from .document import Document as Document
+from .location import Location as Location
+from .id_number import IDNumber as IDNumber
+from .phone_number import PhoneNumber as PhoneNumber
+from .crossreference import Crossreference as Crossreference
+from .external_document import ExternalDocument as ExternalDocument
diff --git a/src/isaacus/types/ilgs/v1/crossreference.py b/src/isaacus/types/ilgs/v1/crossreference.py
new file mode 100644
index 0000000..e515b52
--- /dev/null
+++ b/src/isaacus/types/ilgs/v1/crossreference.py
@@ -0,0 +1,42 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from .span import Span
+from ...._models import BaseModel
+
+__all__ = ["Crossreference"]
+
+
+class Crossreference(BaseModel):
+ """A cross-reference within the document pointing to one or more segments."""
+
+ start: str
+ """
+ The unique identifier of the earliest segment in the span of segments being
+ cross-referenced with ties broken in favor of the least-nested (i.e., largest)
+ segment. If the cross-reference points to a single segment, `start` and `end`
+ will be identical.
+ """
+
+ end: str
+ """
+ The unique identifier of the latest segment in the span of segments being
+ cross-referenced with ties broken in favor of the least-nested (i.e., largest)
+ segment. If the cross-reference points to a single segment, `start` and `end`
+ will be identical.
+ """
+
+ span: Span
+ """A zero-based, half-open span into the Unicode code point space of input text.
+
+ All spans are globally laminar and well-nested similar to XML—it is impossible
+ for any two spans to partially overlap; they can only be disjoint, adjacent, or
+ wholly nested. Spans of the exact same type (e.g., segments) will never be
+ duplicated.
+
+ A span cannot be empty and will never start or end at whitespace.
+
+ Note that, when using programming languages other than Python (which uses
+ zero-based, half-open, Unicode code point-spaced string indexing), indices may
+ need to be translated accordingly (for example, JavaScript slices into UTF-16
+ code units instead of Unicode code points).
+ """
diff --git a/src/isaacus/types/ilgs/v1/date.py b/src/isaacus/types/ilgs/v1/date.py
new file mode 100644
index 0000000..7208b4b
--- /dev/null
+++ b/src/isaacus/types/ilgs/v1/date.py
@@ -0,0 +1,70 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List, Optional
+from typing_extensions import Literal
+
+from .span import Span
+from ...._models import BaseModel
+
+__all__ = ["Date"]
+
+
+class Date(BaseModel):
+ """
+ A date identified in a document belonging to one of the following types: `creation`, `signature`, `effective`, `expiry`, `delivery`, `renewal`, `payment`, `birth`, or `death`.
+
+ Only Gregorian dates between the years 1000 and 9999 (inclusive) fitting into one of the supported date types are extractable.
+ """
+
+ value: str
+ """The date in ISO 8601 format (YYYY-MM-DD)."""
+
+ type: Literal["creation", "signature", "effective", "expiry", "delivery", "renewal", "payment", "birth", "death"]
+ """
+ The type of the date, being one of `creation`, `signature`, `effective`,
+ `expiry`, `delivery`, `renewal`, `payment`, `birth`, or `death`. If a date is
+ mentioned in a document that does not fit into a supported type, it will not be
+ extracted.
+
+ `creation` denotes the date the document was created. There may only be one
+ `creation` date per document.
+
+ `signature` denotes the date the document was signed.
+
+ `effective` denotes the date when the document or a part thereof comes into
+ effect (e.g., commencement or enactment dates).
+
+ `expiry` denotes the date when the document or a part thereof is no longer in
+ effect.
+
+ `delivery` denotes the date when goods or services are to be delivered under the
+ document.
+
+ `renewal` denotes the date when one or more of the document's terms are to be
+ renewed.
+
+ `payment` denotes the date when payment is to be made under the document.
+
+ `birth` denotes the birth date of a natural person or establishment (e.g.,
+ incorporation) date of a non-natural legal person identified in the document.
+ There can only be one `birth` date linked to a single person and all `birth`
+ dates must be linked to a person. A person's `birth` date will never be after
+ their `death` date.
+
+ `death` denotes the death date of a natural person or dissolution date of a
+ non-natural legal person identified in the document. There can only be one
+ `death` date linked to a single person and all `death` dates must be linked to a
+ person. A person's `death` date will never be before their `birth` date.
+ """
+
+ person: Optional[str] = None
+ """
+ A unique identifier for a legal person in the format `per:{index}` where
+ `{index}` is a non-negative incrementing integer starting from zero.
+ """
+
+ mentions: List[Span]
+ """
+ An array of one or more spans within the document's text where the date is
+ mentioned.
+ """
diff --git a/src/isaacus/types/ilgs/v1/document.py b/src/isaacus/types/ilgs/v1/document.py
new file mode 100644
index 0000000..ca4ce7e
--- /dev/null
+++ b/src/isaacus/types/ilgs/v1/document.py
@@ -0,0 +1,172 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List, Optional
+from typing_extensions import Literal
+
+from .date import Date
+from .span import Span
+from .term import Term
+from .email import Email
+from .quote import Quote
+from .person import Person
+from .segment import Segment
+from .website import Website
+from .location import Location
+from .id_number import IDNumber
+from ...._models import BaseModel
+from .phone_number import PhoneNumber
+from .crossreference import Crossreference
+from .external_document import ExternalDocument
+
+__all__ = ["Document"]
+
+
+class Document(BaseModel):
+ """The enriched document."""
+
+ title: Optional[Span] = None
+ """A zero-based, half-open span into the Unicode code point space of input text.
+
+ All spans are globally laminar and well-nested similar to XML—it is impossible
+ for any two spans to partially overlap; they can only be disjoint, adjacent, or
+ wholly nested. Spans of the exact same type (e.g., segments) will never be
+ duplicated.
+
+ A span cannot be empty and will never start or end at whitespace.
+
+ Note that, when using programming languages other than Python (which uses
+ zero-based, half-open, Unicode code point-spaced string indexing), indices may
+ need to be translated accordingly (for example, JavaScript slices into UTF-16
+ code units instead of Unicode code points).
+ """
+
+ subtitle: Optional[Span] = None
+ """A zero-based, half-open span into the Unicode code point space of input text.
+
+ All spans are globally laminar and well-nested similar to XML—it is impossible
+ for any two spans to partially overlap; they can only be disjoint, adjacent, or
+ wholly nested. Spans of the exact same type (e.g., segments) will never be
+ duplicated.
+
+ A span cannot be empty and will never start or end at whitespace.
+
+ Note that, when using programming languages other than Python (which uses
+ zero-based, half-open, Unicode code point-spaced string indexing), indices may
+ need to be translated accordingly (for example, JavaScript slices into UTF-16
+ code units instead of Unicode code points).
+ """
+
+ type: Literal["statute", "regulation", "decision", "contract", "other"]
+ """
+ The type of the document, being one of `statute`, `regulation`, `decision`,
+ `contract`, or `other`.
+
+ `statute` denotes primary legislation such as acts, bills, codes, and
+ constitutions.
+
+ `regulation` denotes secondary legislation such as rules, statutory instruments,
+ and ordinances.
+
+ `decision` denotes judicial or quasi-judicial decisions such as court judgments,
+ judicial opinions, and tribunal rulings.
+
+ `other` is used for all other types of legal documents that do not fit into any
+ of the predefined types.
+ """
+
+ jurisdiction: Optional[str] = None
+ """
+ A jurisdiction code representing a country (via an initial country code) and,
+ optionally, a subdivision within that country (via a subsequent subdivision code
+ prefixed by a hyphen).
+
+ All 249 ISO 3166-1 alpha-2 country codes are representable in addition to
+ special `INT` and `EU` codes for international and European Union law,
+ respectively.
+
+ All 5,046 ISO 3166-2 codes are also representable in addition to a special `FED`
+ code for federal law.
+ """
+
+ segments: List[Segment]
+ """
+ An array of segments within the document representing structurally distinct
+ portions of its content.
+ """
+
+ crossreferences: List[Crossreference]
+ """
+ An array of cross-references within the document pointing to a single segment or
+ a span of segments.
+ """
+
+ locations: List[Location]
+ """An array of locations identified in the document."""
+
+ persons: List[Person]
+ """An array of legal persons identified in the document."""
+
+ emails: List[Email]
+ """
+ An array of email addresses identified in the document belonging to legal
+ persons.
+
+ Email addresses mentioned in the document that are not attributable to legal
+ persons will not be extracted.
+ """
+
+ websites: List[Website]
+ """An array of websites identified in the document belonging to legal persons.
+
+ Websites mentioned in the document that are not attributable to legal persons
+ will not be extracted.
+ """
+
+ phone_numbers: List[PhoneNumber]
+ """
+ An array of valid phone numbers identified in the document belonging to legal
+ persons.
+
+ Phone numbers mentioned in the document that are not valid, possible, or
+ attributable to legal persons will not be extracted.
+ """
+
+ id_numbers: List[IDNumber]
+ """
+ An array of identification numbers identified in the document belonging to legal
+ persons.
+
+ Identification numbers mentioned in the document that are not attributable to
+ legal persons will not be extracted.
+ """
+
+ terms: List[Term]
+ """An array of terms assigned definite meanings within the document."""
+
+ external_documents: List[ExternalDocument]
+ """An array of documents identified within the document."""
+
+ quotes: List[Quote]
+ """An array of quotations within the document."""
+
+ dates: List[Date]
+ """
+ An array of dates identified in the document belonging to one of the following
+ types: `creation`, `signature`, `effective`, `expiry`, `delivery`, `renewal`,
+ `payment`, `birth`, or `death`.
+
+ Only Gregorian dates between the years 1000 and 9999 (inclusive) fitting into
+ one of the supported date types are extractable.
+ """
+
+ headings: List[Span]
+ """An array of spans within the document's text constituting headings."""
+
+ junk: List[Span]
+ """
+ An array of spans within the document's text constituting non-operative,
+ non-substantive 'junk' content such as headers, footers, page numbers, and OCR
+ artifacts.
+ """
+
+ version: Literal["ilgs@1"]
diff --git a/src/isaacus/types/ilgs/v1/email.py b/src/isaacus/types/ilgs/v1/email.py
new file mode 100644
index 0000000..7183531
--- /dev/null
+++ b/src/isaacus/types/ilgs/v1/email.py
@@ -0,0 +1,27 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List
+
+from .span import Span
+from ...._models import BaseModel
+
+__all__ = ["Email"]
+
+
+class Email(BaseModel):
+ """An email address identified in a document belonging to a legal person.
+
+ If an email address was mentioned in the document but is not attributable to a legal person, it will not be extracted.
+ """
+
+ address: str
+ """The normalized email address."""
+
+ person: str
+ """The unique identifier of the person that this email address belongs to."""
+
+ mentions: List[Span]
+ """
+ An array of one or more spans within the document's text where the email address
+ is mentioned.
+ """
diff --git a/src/isaacus/types/ilgs/v1/external_document.py b/src/isaacus/types/ilgs/v1/external_document.py
new file mode 100644
index 0000000..8f2b135
--- /dev/null
+++ b/src/isaacus/types/ilgs/v1/external_document.py
@@ -0,0 +1,101 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List, Optional
+from typing_extensions import Literal
+
+from .span import Span
+from ...._models import BaseModel
+
+__all__ = ["ExternalDocument"]
+
+
+class ExternalDocument(BaseModel):
+ """A document identified within another document."""
+
+ id: str
+ """
+ The unique identifier of the external document in the format `exd:{index}` where
+ `{index}` is a non-negative incrementing integer starting from zero.
+ """
+
+ name: Span
+ """A zero-based, half-open span into the Unicode code point space of input text.
+
+ All spans are globally laminar and well-nested similar to XML—it is impossible
+ for any two spans to partially overlap; they can only be disjoint, adjacent, or
+ wholly nested. Spans of the exact same type (e.g., segments) will never be
+ duplicated.
+
+ A span cannot be empty and will never start or end at whitespace.
+
+ Note that, when using programming languages other than Python (which uses
+ zero-based, half-open, Unicode code point-spaced string indexing), indices may
+ need to be translated accordingly (for example, JavaScript slices into UTF-16
+ code units instead of Unicode code points).
+ """
+
+ type: Literal["statute", "regulation", "decision", "contract", "other"]
+ """
+ The type of the external document, being one of `statute`, `regulation`,
+ `decision`, `contract`, or `other`.
+
+ `statute` denotes primary legislation such as acts, bills, codes, and
+ constitutions.
+
+ `regulation` denotes secondary legislation such as rules, statutory instruments,
+ and ordinances.
+
+ `decision` denotes judicial or quasi-judicial decisions such as court judgments,
+ judicial opinions, and tribunal rulings.
+
+ `other` is used for all other types of legal documents that do not fit into any
+ of the predefined types.
+ """
+
+ jurisdiction: Optional[str] = None
+ """
+ A jurisdiction code representing a country (via an initial country code) and,
+ optionally, a subdivision within that country (via a subsequent subdivision code
+ prefixed by a hyphen).
+
+ All 249 ISO 3166-1 alpha-2 country codes are representable in addition to
+ special `INT` and `EU` codes for international and European Union law,
+ respectively.
+
+ All 5,046 ISO 3166-2 codes are also representable in addition to a special `FED`
+ code for federal law.
+ """
+
+ reception: Literal["positive", "mixed", "negative", "neutral"]
+ """
+ The sentiment of the document towards the external document, being one of
+ `positive`, `mixed`, `negative`, or `neutral`.
+
+ `positive` indicates that the document expresses a favorable view of the
+ external document whether by endorsing or approving it.
+
+ `mixed` indicates that the document expresses both favorable and unfavorable
+ views of the external document, for example, by affirming parts of it and
+ disapproving others.
+
+ `negative` indicates that the document expresses an unfavorable view of the
+ external document whether by criticizing, repealing, overruling, or explicitly
+ contradicting it.
+
+ `neutral` indicates that the document references the external document without
+ expressing any particular sentiment towards it.
+ """
+
+ mentions: List[Span]
+ """
+ An array of one or more spans within the document's text where the external
+ document is mentioned by name, for example, 'the US Constitution' in 'the Second
+ Amendment to the US Constitution protects freedom of speech'.
+ """
+
+ pinpoints: List[Span]
+ """
+ An array of spans within the document's text where specific parts of the
+ external document are referenced, for example, 'Section 2' in 'as defined in
+ Section 2 of the US Constitution'.
+ """
diff --git a/src/isaacus/types/ilgs/v1/id_number.py b/src/isaacus/types/ilgs/v1/id_number.py
new file mode 100644
index 0000000..52ae0b7
--- /dev/null
+++ b/src/isaacus/types/ilgs/v1/id_number.py
@@ -0,0 +1,27 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List
+
+from .span import Span
+from ...._models import BaseModel
+
+__all__ = ["IDNumber"]
+
+
+class IDNumber(BaseModel):
+ """An identification number mentioned in a document belonging to a legal person.
+
+ If an identification number was mentioned in the document but is not attributable to a legal person, it will not be extracted.
+ """
+
+ number: str
+ """The identification number."""
+
+ person: str
+ """The unique identifier of the person that this identification number belongs to."""
+
+ mentions: List[Span]
+ """
+ An array of one or more spans within the document's text where the
+ identification number is mentioned.
+ """
diff --git a/src/isaacus/types/ilgs/v1/location.py b/src/isaacus/types/ilgs/v1/location.py
new file mode 100644
index 0000000..6f4bbd1
--- /dev/null
+++ b/src/isaacus/types/ilgs/v1/location.py
@@ -0,0 +1,53 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List, Optional
+from typing_extensions import Literal
+
+from .span import Span
+from ...._models import BaseModel
+
+__all__ = ["Location"]
+
+
+class Location(BaseModel):
+ """A location identified within a document."""
+
+ id: str
+ """
+ The unique identifier of the location in the format `loc:{index}` where
+ `{index}` is a non-negative incrementing integer starting from zero.
+ """
+
+ name: Span
+ """A zero-based, half-open span into the Unicode code point space of input text.
+
+ All spans are globally laminar and well-nested similar to XML—it is impossible
+ for any two spans to partially overlap; they can only be disjoint, adjacent, or
+ wholly nested. Spans of the exact same type (e.g., segments) will never be
+ duplicated.
+
+ A span cannot be empty and will never start or end at whitespace.
+
+ Note that, when using programming languages other than Python (which uses
+ zero-based, half-open, Unicode code point-spaced string indexing), indices may
+ need to be translated accordingly (for example, JavaScript slices into UTF-16
+ code units instead of Unicode code points).
+ """
+
+ type: Literal["country", "state", "city", "address", "other"]
+ """
+ The type of the location, being one of `country`, `state`, `city`, `address`, or
+ `other`.
+ """
+
+ parent: Optional[str] = None
+ """
+ A unique identifier for a location in the format `loc:{index}` where `{index}`
+ is a non-negative incrementing integer starting from zero.
+ """
+
+ mentions: List[Span]
+ """
+ An array of one or more spans within the document's text where the location is
+ mentioned.
+ """
diff --git a/src/isaacus/types/ilgs/v1/person.py b/src/isaacus/types/ilgs/v1/person.py
new file mode 100644
index 0000000..42384a7
--- /dev/null
+++ b/src/isaacus/types/ilgs/v1/person.py
@@ -0,0 +1,195 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List, Optional
+from typing_extensions import Literal
+
+from .span import Span
+from ...._models import BaseModel
+
+__all__ = ["Person"]
+
+
+class Person(BaseModel):
+ """A legal person identified in a document."""
+
+ id: str
+ """
+ The unique identifier of the person in the format `per:{index}` where `{index}`
+ is a non-negative incrementing integer starting from zero.
+ """
+
+ name: Span
+ """A zero-based, half-open span into the Unicode code point space of input text.
+
+ All spans are globally laminar and well-nested similar to XML—it is impossible
+ for any two spans to partially overlap; they can only be disjoint, adjacent, or
+ wholly nested. Spans of the exact same type (e.g., segments) will never be
+ duplicated.
+
+ A span cannot be empty and will never start or end at whitespace.
+
+ Note that, when using programming languages other than Python (which uses
+ zero-based, half-open, Unicode code point-spaced string indexing), indices may
+ need to be translated accordingly (for example, JavaScript slices into UTF-16
+ code units instead of Unicode code points).
+ """
+
+ type: Literal["natural", "corporate", "politic"]
+ """
+ The legal entity type of the person, being one of `natural`, `corporate`, or
+ `politic`.
+
+ `natural` denotes a human being in their capacity as a natural legal person,
+ including when representing unincorporated entities such as partnerships and
+ trusts.
+
+ `corporate` denotes a body corporate such as a company, incorporated
+ partnership, or statutory corporation.
+
+ `politic` denotes a body politic such as a court, state, government, or
+ intergovernmental organization.
+ """
+
+ role: Literal[
+ "plaintiff",
+ "petitioner",
+ "applicant",
+ "appellant",
+ "appellee",
+ "claimant",
+ "complainant",
+ "defendant",
+ "respondent",
+ "prior_authority",
+ "prosecutor",
+ "defense_counsel",
+ "amicus",
+ "intervener",
+ "borrower",
+ "lender",
+ "guarantor",
+ "lessee",
+ "lessor",
+ "employer",
+ "employee",
+ "licensor",
+ "licensee",
+ "franchisor",
+ "franchisee",
+ "buyer",
+ "seller",
+ "contractor",
+ "shareholder",
+ "joint_venturer",
+ "investor",
+ "insurer",
+ "insured",
+ "enacting_authority",
+ "empowered_authority",
+ "settlor",
+ "trustee",
+ "beneficiary",
+ "debater",
+ "director",
+ "governing_jurisdiction",
+ "clerk",
+ "witness",
+ "other",
+ "non_party",
+ ]
+ """The role of the person in relation to the subject of the document.
+
+ The following roles are currently supported: | | | | ------------------------ |
+ ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+ | | `plaintiff` | A party initiating the case that is the subject of the
+ document. | | `petitioner` | A party initiating the petition that is the subject
+ of the document. | | `applicant` | A party initiating the application that is
+ the subject of the document. | | `appellant` | A party appealing the decision
+ that is the subject of the document. | | `appellee` | A party responding to the
+ appeal that is the subject of the document if they are explicitly referred to as
+ an 'appellee'. | | `claimant` | A party making a claim in the case that is the
+ subject of the document. | | `complainant` | A party making a complaint in the
+ case that is the subject of the document. | | `defendant` | A party defending
+ against the case that is the subject of the document. | | `respondent` | A party
+ responding to the petition, appeal, or application that is the subject of the
+ document. | | `prior_authority` | An authority (e.g., judge, tribunal, court)
+ that made a prior decision in the case that is the subject of the document. Both
+ individual judges and courts should be annotated with this role where
+ applicable. This is not to be used for authorities cited as precedent, only for
+ those that made prior decisions in the same case. | | `prosecutor` | A lawyer
+ prosecuting the case that is the subject of the document. | | `defense_counsel`
+ | A lawyer defending the case that is the subject of the document. | | `amicus`
+ | A party filing an amicus curiae brief in the case that is the subject of the
+ document. | | `intervener` | A party attempting to or that has intervened in the
+ case that is the subject of the document. | | `borrower` | A party borrowing
+ money or other assets under the agreement that is the subject of the document,
+ including 'mortgagors' and 'debtors'. | | `lender` | A party lending money or
+ other assets under the agreement that is the subject of the document, including
+ 'mortgagees' and 'creditors'. | | `guarantor` | A party guaranteeing obligations
+ under the agreement that is the subject of the document, including 'sureties'. |
+ | `lessee` | A party leasing goods or services under the agreement that is the
+ subject of the document, including 'tenants'. | | `lessor` | A party leasing
+ goods or services under the agreement that is the subject of the document,
+ including 'landlords'. | | `employer` | A party employing personnel under the
+ agreement that is the subject of the document. | | `employee` | A party employed
+ under the agreement that is the subject of the document. | | `licensor` | A
+ party licensing intellectual property or other rights under the agreement that
+ are the subject of the document. | | `licensee` | A party licensed to use
+ intellectual property or other rights under the agreement that are the subject
+ of the document. | | `franchisor` | A party granting a franchise under the
+ agreement that is the subject of the document. | | `franchisee` | A party
+ granted a franchise under the agreement that is the subject of the document. | |
+ `buyer` | A party purchasing goods or services under the agreement that is the
+ subject of the document, including 'purchasers', 'customers', and 'clients'. | |
+ `seller` | A party selling or providing goods or services under the agreement
+ that is the subject of the document, including 'Vendors', 'Suppliers', and
+ 'Service Providers' (where such parties are actually providing goods or services
+ under the agreement). | | `contractor` | A party contracted to perform work or
+ services under the agreement that is the subject of the document, including
+ 'consultants'. | | `shareholder` | A party holding shares or equity under the
+ agreement that is the subject of the document. | | `joint_venturer` | A party
+ participating in a joint venture under the agreement that is the subject of the
+ document. | | `investor` | A party investing money or assets under the agreement
+ that is the subject of the document. | | `insurer` | A party providing insurance
+ under the agreement that is the subject of the document. | | `insured` | A party
+ insured under the agreement that is the subject of the document. | | `settlor` |
+ A party establishing the trust that is the subject of the document. | |
+ `trustee` | A party managing the trust that is the subject of the document. | |
+ `beneficiary` | A party benefiting from the trust that is the subject of the
+ document. | | `enacting_authority` | An authority (e.g., legislature, regulator,
+ Minister/Secretary, President/Prime Minister, tribunal, court, judge) giving
+ legal effect to or authorizing the document. All relevant individuals and bodies
+ should be annotated with this role where applicable. | | `empowered_authority` |
+ An authority (e.g., government agency, regulator, Minister/Secretary,
+ President/Prime Minister, tribunal, court) empowered by the document to carry
+ out functions or duties. | | `debater` | A person participating in the debate
+ that is the subject of the document. | | `governing_jurisdiction` | The
+ jurisdiction whose laws govern the document. | | `director` | A director or
+ other officer of a corporate legal person mentioned in the document. | | `clerk`
+ | A clerk, notary, or other official certifying, witnessing, filing, recording,
+ registering, or otherwise administering the document. | | `witness` | A witness
+ witnessing the signing of the document, or whose testimony is part of the case
+ that is the subject of the document. | | `other` | A party to the case,
+ agreement, legislation, or regulation that is the subject of the document that
+ does not fit into any of the other roles. | | `non_party` | A legal person
+ mentioned in the document that is not a party to the case, agreement,
+ legislation, or regulation that is the subject of the document. |
+ """
+
+ parent: Optional[str] = None
+ """
+ A unique identifier for a legal person in the format `per:{index}` where
+ `{index}` is a non-negative incrementing integer starting from zero.
+ """
+
+ residence: Optional[str] = None
+ """
+ A unique identifier for a location in the format `loc:{index}` where `{index}`
+ is a non-negative incrementing integer starting from zero.
+ """
+
+ mentions: List[Span]
+ """
+ An array of one or more spans within the document's text where the person is
+ mentioned.
+ """
diff --git a/src/isaacus/types/ilgs/v1/phone_number.py b/src/isaacus/types/ilgs/v1/phone_number.py
new file mode 100644
index 0000000..53b79e3
--- /dev/null
+++ b/src/isaacus/types/ilgs/v1/phone_number.py
@@ -0,0 +1,30 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List
+
+from .span import Span
+from ...._models import BaseModel
+
+__all__ = ["PhoneNumber"]
+
+
+class PhoneNumber(BaseModel):
+ """A valid phone number identified in a document belonging to a legal person.
+
+ If a phone number was mentioned in the document but is not valid, possible, or attributable to a legal person, it will not be extracted.
+ """
+
+ number: str
+ """
+ The normalized phone number in E.123 international notation conforming with
+ local conventions on the use of spaces and hyphens as separators.
+ """
+
+ person: str
+ """The unique identifier of the person that this phone number belongs to."""
+
+ mentions: List[Span]
+ """
+ An array of one or more spans within the document's text where the phone number
+ is mentioned.
+ """
diff --git a/src/isaacus/types/ilgs/v1/quote.py b/src/isaacus/types/ilgs/v1/quote.py
new file mode 100644
index 0000000..3bcaad9
--- /dev/null
+++ b/src/isaacus/types/ilgs/v1/quote.py
@@ -0,0 +1,52 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Optional
+
+from .span import Span
+from ...._models import BaseModel
+
+__all__ = ["Quote"]
+
+
+class Quote(BaseModel):
+ """A quotation within a document."""
+
+ source_segment: Optional[str] = None
+ """
+ A unique identifier for a segment in the format `seg:{index}` where `{index}` is
+ a non-negative incrementing integer starting from zero.
+ """
+
+ source_document: Optional[str] = None
+ """
+ A unique identifier for an external document in the format `exd:{index}` where
+ `{index}` is a non-negative incrementing integer starting from zero.
+ """
+
+ source_person: Optional[str] = None
+ """
+ A unique identifier for a legal person in the format `per:{index}` where
+ `{index}` is a non-negative incrementing integer starting from zero.
+ """
+
+ amending: bool
+ """
+ Whether the quote is being used to amend or modify content, typically in other
+ documents.
+ """
+
+ span: Span
+ """A zero-based, half-open span into the Unicode code point space of input text.
+
+ All spans are globally laminar and well-nested similar to XML—it is impossible
+ for any two spans to partially overlap; they can only be disjoint, adjacent, or
+ wholly nested. Spans of the exact same type (e.g., segments) will never be
+ duplicated.
+
+ A span cannot be empty and will never start or end at whitespace.
+
+ Note that, when using programming languages other than Python (which uses
+ zero-based, half-open, Unicode code point-spaced string indexing), indices may
+ need to be translated accordingly (for example, JavaScript slices into UTF-16
+ code units instead of Unicode code points).
+ """
diff --git a/src/isaacus/types/ilgs/v1/segment.py b/src/isaacus/types/ilgs/v1/segment.py
new file mode 100644
index 0000000..f99e505
--- /dev/null
+++ b/src/isaacus/types/ilgs/v1/segment.py
@@ -0,0 +1,211 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Optional
+from typing_extensions import Literal
+
+from .span import Span
+from ...._models import BaseModel
+
+__all__ = ["Segment"]
+
+
+class Segment(BaseModel):
+ """
+ A segment within the document representing a structurally distinct portion of the document's content.
+ """
+
+ id: str
+ """
+ The unique identifier of the segment in the format `seg:{index}` where `{index}`
+ is a non-negative incrementing integer starting from zero.
+ """
+
+ kind: Literal["container", "unit", "item", "figure"]
+ """
+ The structural 'kind' of the segment, being one of `container`, `unit`, `item`,
+ or `figure`.
+
+ A `container` is a structural or semantic grouping of content such as a chapter.
+ It can contain segments of any kind or none at all.
+
+ A `unit` is a single syntactically independent unit of text such as a paragraph.
+ It can only contain `item`s and `figure`s.
+
+ An `item` is a syntactically subordinate unit of text such as an item in a
+ run-in list. It can only contain other `item`s. Note that an `item` is
+ conceptually distinct from a list item—it is perfectly possible to encounter
+ list items that are syntactically independent of their surrounding items just as
+ it is possible to encounter dependent clauses that do not appear as part of a
+ list.
+
+ A `figure` is a visually structured or tabular unit of content such as a
+ diagram, equation, or table. It cannot contain segments.
+ """
+
+ type: Optional[
+ Literal[
+ "title",
+ "book",
+ "part",
+ "chapter",
+ "subchapter",
+ "division",
+ "subdivision",
+ "subpart",
+ "subtitle",
+ "table_of_contents",
+ "article",
+ "section",
+ "regulation",
+ "rule",
+ "clause",
+ "paragraph",
+ "subarticle",
+ "subsection",
+ "subregulation",
+ "subrule",
+ "subclause",
+ "subparagraph",
+ "item",
+ "subitem",
+ "point",
+ "indent",
+ "schedule",
+ "annex",
+ "appendix",
+ "exhibit",
+ "recital",
+ "signature",
+ "note",
+ "figure",
+ "table",
+ "formula",
+ ]
+ ] = None
+ """
+ The addressable 'type' of the segment within the document's referential scheme
+ and hierarchy, whether defined explicitly (e.g., by headings, such as
+ 'Section 2. Definitions'), implicitly (e.g., by way of reference, such as 'as
+ defined in Section 2'), or by convention (e.g., [42] in a judgment often denotes
+ a `paragraph`, independent provisions in statute are often `section`s, etc.). If
+ the type is not known or not applicable, it will be set to `null`.
+
+ Note that, although many segment types may coincide with syntactic constructs,
+ they should be thought of purely as distinct formal citable units. Most
+ paragraphs (in the syntactic sense) will not have the `paragraph` type, for
+ example. That type is reserved for segments that would formally be cited as a
+ 'Paragraph' within the document's referential scheme.
+
+ The following types are currently supported: `title`, `book`, `part`, `chapter`,
+ `subchapter`, `division`, `subdivision`, `subpart`, `subtitle`,
+ `table_of_contents`, `article`, `section`, `regulation`, `rule`, `clause`,
+ `paragraph`, `subarticle`, `subsection`, `subregulation`, `subrule`,
+ `subclause`, `subparagraph`, `item`, `subitem`, `point`, `indent`, `schedule`,
+ `annex`, `appendix`, `exhibit`, `recital`, `signature`, `note`, `figure`,
+ `table`, and `formula`.
+
+ The `title`, `book`, `part`, `chapter`, `subchapter`, `division`, `subdivision`,
+ `subpart`, `subtitle`, and `table_of_contents` types are exclusive to the
+ `container` kind.
+
+ The `figure` kind only supports the `figure`, `table`, and `formula` types, all
+ of which are exclusive to it.
+ """
+
+ category: Literal["front_matter", "scope", "main", "annotation", "back_matter", "other"]
+ """
+ The functional 'category' of the segment within the document, being one of
+ `front_matter`, `scope`, `main`, `annotation`, `back_matter`, or `other`.
+
+ `front_matter` denotes non-operative contextualizing content occurring at the
+ start of a document such as a preamble or recitals.
+
+ `scope` denotes operative content defining the application or interpretation of
+ a document such as definition sections and governing law clauses.
+
+ `main` denotes operative, non-scopal content.
+
+ `annotation` denotes non-operative annotative content providing explanatory or
+ referential information such as commentary, footnotes, and endnotes.
+
+ `back_matter` denotes non-operative contextualizing content occurring at the end
+ of a document such as authority statements.
+
+ `other` denotes content that does not fit into any of the other categories.
+ """
+
+ type_name: Optional[Span] = None
+ """A zero-based, half-open span into the Unicode code point space of input text.
+
+ All spans are globally laminar and well-nested similar to XML—it is impossible
+ for any two spans to partially overlap; they can only be disjoint, adjacent, or
+ wholly nested. Spans of the exact same type (e.g., segments) will never be
+ duplicated.
+
+ A span cannot be empty and will never start or end at whitespace.
+
+ Note that, when using programming languages other than Python (which uses
+ zero-based, half-open, Unicode code point-spaced string indexing), indices may
+ need to be translated accordingly (for example, JavaScript slices into UTF-16
+ code units instead of Unicode code points).
+ """
+
+ code: Optional[Span] = None
+ """A zero-based, half-open span into the Unicode code point space of input text.
+
+ All spans are globally laminar and well-nested similar to XML—it is impossible
+ for any two spans to partially overlap; they can only be disjoint, adjacent, or
+ wholly nested. Spans of the exact same type (e.g., segments) will never be
+ duplicated.
+
+ A span cannot be empty and will never start or end at whitespace.
+
+ Note that, when using programming languages other than Python (which uses
+ zero-based, half-open, Unicode code point-spaced string indexing), indices may
+ need to be translated accordingly (for example, JavaScript slices into UTF-16
+ code units instead of Unicode code points).
+ """
+
+ title: Optional[Span] = None
+ """A zero-based, half-open span into the Unicode code point space of input text.
+
+ All spans are globally laminar and well-nested similar to XML—it is impossible
+ for any two spans to partially overlap; they can only be disjoint, adjacent, or
+ wholly nested. Spans of the exact same type (e.g., segments) will never be
+ duplicated.
+
+ A span cannot be empty and will never start or end at whitespace.
+
+ Note that, when using programming languages other than Python (which uses
+ zero-based, half-open, Unicode code point-spaced string indexing), indices may
+ need to be translated accordingly (for example, JavaScript slices into UTF-16
+ code units instead of Unicode code points).
+ """
+
+ parent: Optional[str] = None
+ """
+ A unique identifier for a segment in the format `seg:{index}` where `{index}` is
+ a non-negative incrementing integer starting from zero.
+ """
+
+ level: int
+ """
+ The level of the segment within the document's segment hierarchy starting from
+ `0` for root-level segments.
+ """
+
+ span: Span
+ """A zero-based, half-open span into the Unicode code point space of input text.
+
+ All spans are globally laminar and well-nested similar to XML—it is impossible
+ for any two spans to partially overlap; they can only be disjoint, adjacent, or
+ wholly nested. Spans of the exact same type (e.g., segments) will never be
+ duplicated.
+
+ A span cannot be empty and will never start or end at whitespace.
+
+ Note that, when using programming languages other than Python (which uses
+ zero-based, half-open, Unicode code point-spaced string indexing), indices may
+ need to be translated accordingly (for example, JavaScript slices into UTF-16
+ code units instead of Unicode code points).
+ """
diff --git a/src/isaacus/types/ilgs/ilgs_v1_span.py b/src/isaacus/types/ilgs/v1/span.py
similarity index 92%
rename from src/isaacus/types/ilgs/ilgs_v1_span.py
rename to src/isaacus/types/ilgs/v1/span.py
index 350bc65..2289f04 100644
--- a/src/isaacus/types/ilgs/ilgs_v1_span.py
+++ b/src/isaacus/types/ilgs/v1/span.py
@@ -1,11 +1,11 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from ..._models import BaseModel
+from ...._models import BaseModel
-__all__ = ["ILGSv1Span"]
+__all__ = ["Span"]
-class ILGSv1Span(BaseModel):
+class Span(BaseModel):
"""A zero-based, half-open span into the Unicode code point space of input text.
All spans are globally laminar and well-nested similar to XML—it is impossible for any two spans to partially overlap; they can only be disjoint, adjacent, or wholly nested. Spans of the exact same type (e.g., segments) will never be duplicated.
diff --git a/src/isaacus/types/ilgs/v1/term.py b/src/isaacus/types/ilgs/v1/term.py
new file mode 100644
index 0000000..7b34272
--- /dev/null
+++ b/src/isaacus/types/ilgs/v1/term.py
@@ -0,0 +1,59 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List
+
+from .span import Span
+from ...._models import BaseModel
+
+__all__ = ["Term"]
+
+
+class Term(BaseModel):
+ """A term assigned a definite meaning within a document."""
+
+ id: str
+ """
+ The unique identifier of the term in the format `term:{index}` where `{index}`
+ is a non-negative incrementing integer starting from zero.
+ """
+
+ name: Span
+ """A zero-based, half-open span into the Unicode code point space of input text.
+
+ All spans are globally laminar and well-nested similar to XML—it is impossible
+ for any two spans to partially overlap; they can only be disjoint, adjacent, or
+ wholly nested. Spans of the exact same type (e.g., segments) will never be
+ duplicated.
+
+ A span cannot be empty and will never start or end at whitespace.
+
+ Note that, when using programming languages other than Python (which uses
+ zero-based, half-open, Unicode code point-spaced string indexing), indices may
+ need to be translated accordingly (for example, JavaScript slices into UTF-16
+ code units instead of Unicode code points).
+ """
+
+ meaning: Span
+ """A zero-based, half-open span into the Unicode code point space of input text.
+
+ All spans are globally laminar and well-nested similar to XML—it is impossible
+ for any two spans to partially overlap; they can only be disjoint, adjacent, or
+ wholly nested. Spans of the exact same type (e.g., segments) will never be
+ duplicated.
+
+ A span cannot be empty and will never start or end at whitespace.
+
+ Note that, when using programming languages other than Python (which uses
+ zero-based, half-open, Unicode code point-spaced string indexing), indices may
+ need to be translated accordingly (for example, JavaScript slices into UTF-16
+ code units instead of Unicode code points).
+ """
+
+ mentions: List[Span]
+ """
+ An array of spans within the document's text where the term is mentioned outside
+ of its definition.
+
+ It is possible for the term to have no mentions if, outside of its definition,
+ it is never referred to in the document.
+ """
diff --git a/src/isaacus/types/ilgs/v1/website.py b/src/isaacus/types/ilgs/v1/website.py
new file mode 100644
index 0000000..3b3baac
--- /dev/null
+++ b/src/isaacus/types/ilgs/v1/website.py
@@ -0,0 +1,28 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List
+
+from .span import Span
+from ...._models import BaseModel
+
+__all__ = ["Website"]
+
+
+class Website(BaseModel):
+ """A website identified in a document belonging to a legal person.
+
+ If a website was mentioned in the document but is not attributable to a legal person, it will not be extracted.
+ """
+
+ url: str
+ """The normalized URL of the website in the form `https://{host}/`."""
+
+ person: str
+ """The unique identifier of the person that this website belongs to."""
+
+ mentions: List[Span]
+ """
+ An array of one or more spans within the document's text where the website is
+ mentioned (including paths and slugs which are not part of the website's
+ normalized URL).
+ """
From a1842eb23c4f6b142fae8aa5634a65e303eb8b78 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Wed, 4 Feb 2026 05:28:02 +0000
Subject: [PATCH 10/11] feat(api): add a `text` field
---
.stats.yml | 4 ++--
src/isaacus/types/ilgs/v1/document.py | 3 +++
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index 1eadd7a..fdcf3f0 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 5
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/isaacus%2Fisaacus-eb64c01e148bcb3f02d717248b3e1ff4f554779928ae52a689c1c73bafee470d.yml
-openapi_spec_hash: 167ee6ce237a5f0d28d99411bc4dc920
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/isaacus%2Fisaacus-3cce91df023b807a4471d16453720e5962966b270abd3eee54711d74cfbd092e.yml
+openapi_spec_hash: 5d9892dfcf03fd24c38775951636e5fb
config_hash: 7b8cddc2fa896f9ab05e6b05055c7f27
diff --git a/src/isaacus/types/ilgs/v1/document.py b/src/isaacus/types/ilgs/v1/document.py
index ca4ce7e..3481d46 100644
--- a/src/isaacus/types/ilgs/v1/document.py
+++ b/src/isaacus/types/ilgs/v1/document.py
@@ -24,6 +24,9 @@
class Document(BaseModel):
"""The enriched document."""
+ text: str
+ """The text of the document."""
+
title: Optional[Span] = None
"""A zero-based, half-open span into the Unicode code point space of input text.
From 15b0d7803bcdc79d61fa9f00aaf80d4e0ad07904 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Wed, 4 Feb 2026 05:28:18 +0000
Subject: [PATCH 11/11] release: 0.14.0
---
.release-please-manifest.json | 2 +-
CHANGELOG.md | 16 ++++++++++++++++
pyproject.toml | 2 +-
src/isaacus/_version.py | 2 +-
4 files changed, 19 insertions(+), 3 deletions(-)
diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index d52d2b9..a26ebfc 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "0.13.0"
+ ".": "0.14.0"
}
\ No newline at end of file
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6e79898..97fd948 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,21 @@
# Changelog
+## 0.14.0 (2026-02-04)
+
+Full Changelog: [v0.13.0...v0.14.0](https://github.com/isaacus-dev/isaacus-python/compare/v0.13.0...v0.14.0)
+
+### Features
+
+* **api:** add a `text` field ([a1842eb](https://github.com/isaacus-dev/isaacus-python/commit/a1842eb23c4f6b142fae8aa5634a65e303eb8b78))
+* **api:** add level field to ILGS v1 segments ([63e8455](https://github.com/isaacus-dev/isaacus-python/commit/63e845506ef701eaff5cb85652a083e380b03dbc))
+* **sdk:** add ilgs v1 span as a top model ([b30f176](https://github.com/isaacus-dev/isaacus-python/commit/b30f176d23a7eabb18d92d716f8d35b2fc9f454b))
+* **sdk:** demote other models ([873f1a4](https://github.com/isaacus-dev/isaacus-python/commit/873f1a49d107be25de7b515b4796f2090e3885bf))
+* **sdk:** move ilgs structs around ([cd485eb](https://github.com/isaacus-dev/isaacus-python/commit/cd485eb173c7f454aecfd114121672172a75824c))
+* **sdk:** move ilgs structs around ([920e2bb](https://github.com/isaacus-dev/isaacus-python/commit/920e2bbf07e7aea58fabbd6b31ecd96050c43957))
+* **sdk:** move ilgs structs around ([d3068e3](https://github.com/isaacus-dev/isaacus-python/commit/d3068e38f718f52cc9b46dc6e60efa5dc911f10a))
+* **sdk:** move ilgs structs around ([6ea6db6](https://github.com/isaacus-dev/isaacus-python/commit/6ea6db6d15b754c6f2ffd5aa235d7b8abb1e3ad1))
+* **sdk:** move ilgs structs around ([1f9c511](https://github.com/isaacus-dev/isaacus-python/commit/1f9c5116054a44d62013e5c82ba9d85d38b28f33))
+
## 0.13.0 (2026-02-04)
Full Changelog: [v0.12.0...v0.13.0](https://github.com/isaacus-dev/isaacus-python/compare/v0.12.0...v0.13.0)
diff --git a/pyproject.toml b/pyproject.toml
index 4788a10..45898d4 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[project]
name = "isaacus"
-version = "0.13.0"
+version = "0.14.0"
description = "The official Python library for the isaacus API"
dynamic = ["readme"]
license = "Apache-2.0"
diff --git a/src/isaacus/_version.py b/src/isaacus/_version.py
index 727c37c..194d0a0 100644
--- a/src/isaacus/_version.py
+++ b/src/isaacus/_version.py
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
__title__ = "isaacus"
-__version__ = "0.13.0" # x-release-please-version
+__version__ = "0.14.0" # x-release-please-version