diff --git a/.release-please-manifest.json b/.release-please-manifest.json index a713055..d52d2b9 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.12.0" + ".": "0.13.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 3d7a14c..d0ad896 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: a23e347480e00cefa57ce68b1de9e16d +config_hash: e26cc2858d2a56a077aee5473a5746df diff --git a/CHANGELOG.md b/CHANGELOG.md index aecae9e..6e79898 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## 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) + +### Features + +* **sdk:** alter v1 pascal casing ([7229055](https://github.com/isaacus-dev/isaacus-python/commit/7229055504fd20c05c5d7f5ee40afd76fbcdd02f)) +* **sdk:** move ilgs models under `ilgs_v1` ([0165061](https://github.com/isaacus-dev/isaacus-python/commit/0165061dfd3f5245df16c75f7b8dbb39c68d9de8)) +* **sdk:** move ilgs to its own resource ([e196566](https://github.com/isaacus-dev/isaacus-python/commit/e196566b8c5ef8e876f6d6c0d31393e17d24926f)) +* **sdk:** move ilgsv1 resources under a subresource ([8620bb5](https://github.com/isaacus-dev/isaacus-python/commit/8620bb5259685c1764960278caba70ae9b42a0ec)) +* **sdk:** removed chunking options as a shared resource ([b11b540](https://github.com/isaacus-dev/isaacus-python/commit/b11b540a1da187f5c667e99e53caa550c364aa94)) +* **sdk:** revert v1 casing change ([5a8d5b1](https://github.com/isaacus-dev/isaacus-python/commit/5a8d5b13c69185a36148ee336d3dcf1b3191de0b)) + ## 0.12.0 (2026-02-03) Full Changelog: [v0.11.0...v0.12.0](https://github.com/isaacus-dev/isaacus-python/compare/v0.11.0...v0.12.0) diff --git a/api.md b/api.md index 4245c80..efdbf07 100644 --- a/api.md +++ b/api.md @@ -55,25 +55,32 @@ Methods: Types: ```python -from isaacus.types import ( - EnrichmentResponse, - ILGSv1Crossreference, - ILGSv1Date, - ILGSv1Document, - ILGSv1Email, - ILGSv1ExternalDocument, - ILGSv1IDNumber, - ILGSv1Location, - ILGSv1Person, - ILGSv1PhoneNumber, - ILGSv1Quote, - ILGSv1Segment, - ILGSv1Span, - ILGSv1Term, - ILGSv1Website, -) +from isaacus.types import EnrichmentResponse ``` Methods: - client.enrichments.create(\*\*params) -> EnrichmentResponse + +# ILGSv1 + +Types: + +```python +from isaacus.types import ( + Crossreference, + Date, + Document, + Email, + ExternalDocument, + IDNumber, + Location, + Person, + PhoneNumber, + Quote, + Segment, + Span, + Term, + Website, +) +``` diff --git a/pyproject.toml b/pyproject.toml index 3ae9563..4788a10 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "isaacus" -version = "0.12.0" +version = "0.13.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 23add34..727c37c 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.12.0" # x-release-please-version +__version__ = "0.13.0" # x-release-please-version diff --git a/src/isaacus/types/__init__.py b/src/isaacus/types/__init__.py index 98a4f77..22f2d74 100644 --- a/src/isaacus/types/__init__.py +++ b/src/isaacus/types/__init__.py @@ -2,23 +2,23 @@ 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 .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 -from .ilgs_v1_phone_number import ILGSv1PhoneNumber as ILGSv1PhoneNumber -from .ilgs_v1_crossreference import ILGSv1Crossreference as ILGSv1Crossreference from .embedding_create_params import EmbeddingCreateParams as EmbeddingCreateParams from .reranking_create_params import RerankingCreateParams as RerankingCreateParams from .enrichment_create_params import EnrichmentCreateParams as EnrichmentCreateParams -from .ilgs_v1_external_document import ILGSv1ExternalDocument as ILGSv1ExternalDocument diff --git a/src/isaacus/types/ilgs_v1_crossreference.py b/src/isaacus/types/crossreference.py similarity index 92% rename from src/isaacus/types/ilgs_v1_crossreference.py rename to src/isaacus/types/crossreference.py index 69b1fdc..604ba13 100644 --- a/src/isaacus/types/ilgs_v1_crossreference.py +++ b/src/isaacus/types/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_v1_date.py b/src/isaacus/types/date.py similarity index 95% rename from src/isaacus/types/ilgs_v1_date.py rename to src/isaacus/types/date.py index f210daf..5266faf 100644 --- a/src/isaacus/types/ilgs_v1_date.py +++ b/src/isaacus/types/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_v1_document.py b/src/isaacus/types/document.py similarity index 80% rename from src/isaacus/types/ilgs_v1_document.py rename to src/isaacus/types/document.py index d173736..1ad35fa 100644 --- a/src/isaacus/types/ilgs_v1_document.py +++ b/src/isaacus/types/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 .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 .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): """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_v1_email.py b/src/isaacus/types/email.py similarity index 83% rename from src/isaacus/types/ilgs_v1_email.py rename to src/isaacus/types/email.py index ccae60d..88a4582 100644 --- a/src/isaacus/types/ilgs_v1_email.py +++ b/src/isaacus/types/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/enrichment_response.py b/src/isaacus/types/enrichment_response.py index 70de77f..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_v1_document import ILGSv1Document +from .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_v1_external_document.py b/src/isaacus/types/external_document.py similarity index 94% rename from src/isaacus/types/ilgs_v1_external_document.py rename to src/isaacus/types/external_document.py index 893624c..3e8582d 100644 --- a/src/isaacus/types/ilgs_v1_external_document.py +++ b/src/isaacus/types/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_v1_id_number.py b/src/isaacus/types/id_number.py similarity index 83% rename from src/isaacus/types/ilgs_v1_id_number.py rename to src/isaacus/types/id_number.py index 33fe661..7e3f9c7 100644 --- a/src/isaacus/types/ilgs_v1_id_number.py +++ b/src/isaacus/types/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_v1_location.py b/src/isaacus/types/location.py similarity index 91% rename from src/isaacus/types/ilgs_v1_location.py rename to src/isaacus/types/location.py index a441c4d..27b68eb 100644 --- a/src/isaacus/types/ilgs_v1_location.py +++ b/src/isaacus/types/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_v1_person.py b/src/isaacus/types/person.py similarity index 98% rename from src/isaacus/types/ilgs_v1_person.py rename to src/isaacus/types/person.py index db1a9e7..1189595 100644 --- a/src/isaacus/types/ilgs_v1_person.py +++ b/src/isaacus/types/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_v1_phone_number.py b/src/isaacus/types/phone_number.py similarity index 85% rename from src/isaacus/types/ilgs_v1_phone_number.py rename to src/isaacus/types/phone_number.py index 6906278..30dd506 100644 --- a/src/isaacus/types/ilgs_v1_phone_number.py +++ b/src/isaacus/types/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_v1_quote.py b/src/isaacus/types/quote.py similarity index 93% rename from src/isaacus/types/ilgs_v1_quote.py rename to src/isaacus/types/quote.py index 36a2288..735721d 100644 --- a/src/isaacus/types/ilgs_v1_quote.py +++ b/src/isaacus/types/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_v1_segment.py b/src/isaacus/types/segment.py similarity index 97% rename from src/isaacus/types/ilgs_v1_segment.py rename to src/isaacus/types/segment.py index b3a61dd..2f13d9d 100644 --- a/src/isaacus/types/ilgs_v1_segment.py +++ b/src/isaacus/types/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_v1_span.py b/src/isaacus/types/span.py similarity index 95% rename from src/isaacus/types/ilgs_v1_span.py rename to src/isaacus/types/span.py index 45aad71..23108eb 100644 --- a/src/isaacus/types/ilgs_v1_span.py +++ b/src/isaacus/types/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_v1_term.py b/src/isaacus/types/term.py similarity index 92% rename from src/isaacus/types/ilgs_v1_term.py rename to src/isaacus/types/term.py index db03338..63a88b1 100644 --- a/src/isaacus/types/ilgs_v1_term.py +++ b/src/isaacus/types/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_v1_website.py b/src/isaacus/types/website.py similarity index 84% rename from src/isaacus/types/ilgs_v1_website.py rename to src/isaacus/types/website.py index 5c0ac9a..3f1d233 100644 --- a/src/isaacus/types/ilgs_v1_website.py +++ b/src/isaacus/types/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