isaacus 0.10.1__py3-none-any.whl → 0.12.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- isaacus/_version.py +1 -1
- isaacus/resources/classifications/universal.py +8 -8
- isaacus/resources/embeddings.py +24 -24
- isaacus/resources/enrichments.py +2 -2
- isaacus/resources/extractions/__init__.py +12 -12
- isaacus/resources/extractions/extractions.py +18 -18
- isaacus/resources/extractions/qa.py +29 -29
- isaacus/resources/rerankings.py +12 -12
- isaacus/types/__init__.py +14 -0
- isaacus/types/classifications/universal_classification_response.py +22 -22
- isaacus/types/classifications/universal_create_params.py +6 -6
- isaacus/types/embedding_create_params.py +11 -11
- isaacus/types/embedding_response.py +3 -3
- isaacus/types/enrichment_create_params.py +1 -1
- isaacus/types/enrichment_response.py +6 -1404
- isaacus/types/extractions/__init__.py +1 -1
- isaacus/types/extractions/answer_extraction_response.py +12 -12
- isaacus/types/extractions/qa_create_params.py +8 -8
- isaacus/types/ilgs_v1_crossreference.py +42 -0
- isaacus/types/ilgs_v1_date.py +70 -0
- isaacus/types/ilgs_v1_document.py +172 -0
- isaacus/types/ilgs_v1_email.py +27 -0
- isaacus/types/ilgs_v1_external_document.py +101 -0
- isaacus/types/ilgs_v1_id_number.py +27 -0
- isaacus/types/ilgs_v1_location.py +53 -0
- isaacus/types/ilgs_v1_person.py +195 -0
- isaacus/types/ilgs_v1_phone_number.py +30 -0
- isaacus/types/ilgs_v1_quote.py +52 -0
- isaacus/types/ilgs_v1_segment.py +205 -0
- isaacus/types/ilgs_v1_span.py +28 -0
- isaacus/types/ilgs_v1_term.py +59 -0
- isaacus/types/ilgs_v1_website.py +28 -0
- isaacus/types/reranking_create_params.py +7 -7
- {isaacus-0.10.1.dist-info → isaacus-0.12.0.dist-info}/METADATA +1 -1
- isaacus-0.12.0.dist-info/RECORD +70 -0
- isaacus-0.10.1.dist-info/RECORD +0 -56
- {isaacus-0.10.1.dist-info → isaacus-0.12.0.dist-info}/WHEEL +0 -0
- {isaacus-0.10.1.dist-info → isaacus-0.12.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List, Optional
|
|
4
|
+
from typing_extensions import Literal
|
|
5
|
+
|
|
6
|
+
from .._models import BaseModel
|
|
7
|
+
from .ilgs_v1_span import ILGSv1Span
|
|
8
|
+
|
|
9
|
+
__all__ = ["ILGSv1Person"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class ILGSv1Person(BaseModel):
|
|
13
|
+
"""A legal person identified in a document."""
|
|
14
|
+
|
|
15
|
+
id: str
|
|
16
|
+
"""
|
|
17
|
+
The unique identifier of the person in the format `per:{index}` where `{index}`
|
|
18
|
+
is a non-negative incrementing integer starting from zero.
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
name: ILGSv1Span
|
|
22
|
+
"""A zero-based, half-open span into the Unicode code point space of input text.
|
|
23
|
+
|
|
24
|
+
All spans are globally laminar and well-nested similar to XML—it is impossible
|
|
25
|
+
for any two spans to partially overlap; they can only be disjoint, adjacent, or
|
|
26
|
+
wholly nested. Spans of the exact same type (e.g., segments) will never be
|
|
27
|
+
duplicated.
|
|
28
|
+
|
|
29
|
+
A span cannot be empty and will never start or end at whitespace.
|
|
30
|
+
|
|
31
|
+
Note that, when using programming languages other than Python (which uses
|
|
32
|
+
zero-based, half-open, Unicode code point-spaced string indexing), indices may
|
|
33
|
+
need to be translated accordingly (for example, JavaScript slices into UTF-16
|
|
34
|
+
code units instead of Unicode code points).
|
|
35
|
+
"""
|
|
36
|
+
|
|
37
|
+
type: Literal["natural", "corporate", "politic"]
|
|
38
|
+
"""
|
|
39
|
+
The legal entity type of the person, being one of `natural`, `corporate`, or
|
|
40
|
+
`politic`.
|
|
41
|
+
|
|
42
|
+
`natural` denotes a human being in their capacity as a natural legal person,
|
|
43
|
+
including when representing unincorporated entities such as partnerships and
|
|
44
|
+
trusts.
|
|
45
|
+
|
|
46
|
+
`corporate` denotes a body corporate such as a company, incorporated
|
|
47
|
+
partnership, or statutory corporation.
|
|
48
|
+
|
|
49
|
+
`politic` denotes a body politic such as a court, state, government, or
|
|
50
|
+
intergovernmental organization.
|
|
51
|
+
"""
|
|
52
|
+
|
|
53
|
+
role: Literal[
|
|
54
|
+
"plaintiff",
|
|
55
|
+
"petitioner",
|
|
56
|
+
"applicant",
|
|
57
|
+
"appellant",
|
|
58
|
+
"appellee",
|
|
59
|
+
"claimant",
|
|
60
|
+
"complainant",
|
|
61
|
+
"defendant",
|
|
62
|
+
"respondent",
|
|
63
|
+
"prior_authority",
|
|
64
|
+
"prosecutor",
|
|
65
|
+
"defense_counsel",
|
|
66
|
+
"amicus",
|
|
67
|
+
"intervener",
|
|
68
|
+
"borrower",
|
|
69
|
+
"lender",
|
|
70
|
+
"guarantor",
|
|
71
|
+
"lessee",
|
|
72
|
+
"lessor",
|
|
73
|
+
"employer",
|
|
74
|
+
"employee",
|
|
75
|
+
"licensor",
|
|
76
|
+
"licensee",
|
|
77
|
+
"franchisor",
|
|
78
|
+
"franchisee",
|
|
79
|
+
"buyer",
|
|
80
|
+
"seller",
|
|
81
|
+
"contractor",
|
|
82
|
+
"shareholder",
|
|
83
|
+
"joint_venturer",
|
|
84
|
+
"investor",
|
|
85
|
+
"insurer",
|
|
86
|
+
"insured",
|
|
87
|
+
"enacting_authority",
|
|
88
|
+
"empowered_authority",
|
|
89
|
+
"settlor",
|
|
90
|
+
"trustee",
|
|
91
|
+
"beneficiary",
|
|
92
|
+
"debater",
|
|
93
|
+
"director",
|
|
94
|
+
"governing_jurisdiction",
|
|
95
|
+
"clerk",
|
|
96
|
+
"witness",
|
|
97
|
+
"other",
|
|
98
|
+
"non_party",
|
|
99
|
+
]
|
|
100
|
+
"""The role of the person in relation to the subject of the document.
|
|
101
|
+
|
|
102
|
+
The following roles are currently supported: | | | | ------------------------ |
|
|
103
|
+
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
104
|
+
| | `plaintiff` | A party initiating the case that is the subject of the
|
|
105
|
+
document. | | `petitioner` | A party initiating the petition that is the subject
|
|
106
|
+
of the document. | | `applicant` | A party initiating the application that is
|
|
107
|
+
the subject of the document. | | `appellant` | A party appealing the decision
|
|
108
|
+
that is the subject of the document. | | `appellee` | A party responding to the
|
|
109
|
+
appeal that is the subject of the document if they are explicitly referred to as
|
|
110
|
+
an 'appellee'. | | `claimant` | A party making a claim in the case that is the
|
|
111
|
+
subject of the document. | | `complainant` | A party making a complaint in the
|
|
112
|
+
case that is the subject of the document. | | `defendant` | A party defending
|
|
113
|
+
against the case that is the subject of the document. | | `respondent` | A party
|
|
114
|
+
responding to the petition, appeal, or application that is the subject of the
|
|
115
|
+
document. | | `prior_authority` | An authority (e.g., judge, tribunal, court)
|
|
116
|
+
that made a prior decision in the case that is the subject of the document. Both
|
|
117
|
+
individual judges and courts should be annotated with this role where
|
|
118
|
+
applicable. This is not to be used for authorities cited as precedent, only for
|
|
119
|
+
those that made prior decisions in the same case. | | `prosecutor` | A lawyer
|
|
120
|
+
prosecuting the case that is the subject of the document. | | `defense_counsel`
|
|
121
|
+
| A lawyer defending the case that is the subject of the document. | | `amicus`
|
|
122
|
+
| A party filing an amicus curiae brief in the case that is the subject of the
|
|
123
|
+
document. | | `intervener` | A party attempting to or that has intervened in the
|
|
124
|
+
case that is the subject of the document. | | `borrower` | A party borrowing
|
|
125
|
+
money or other assets under the agreement that is the subject of the document,
|
|
126
|
+
including 'mortgagors' and 'debtors'. | | `lender` | A party lending money or
|
|
127
|
+
other assets under the agreement that is the subject of the document, including
|
|
128
|
+
'mortgagees' and 'creditors'. | | `guarantor` | A party guaranteeing obligations
|
|
129
|
+
under the agreement that is the subject of the document, including 'sureties'. |
|
|
130
|
+
| `lessee` | A party leasing goods or services under the agreement that is the
|
|
131
|
+
subject of the document, including 'tenants'. | | `lessor` | A party leasing
|
|
132
|
+
goods or services under the agreement that is the subject of the document,
|
|
133
|
+
including 'landlords'. | | `employer` | A party employing personnel under the
|
|
134
|
+
agreement that is the subject of the document. | | `employee` | A party employed
|
|
135
|
+
under the agreement that is the subject of the document. | | `licensor` | A
|
|
136
|
+
party licensing intellectual property or other rights under the agreement that
|
|
137
|
+
are the subject of the document. | | `licensee` | A party licensed to use
|
|
138
|
+
intellectual property or other rights under the agreement that are the subject
|
|
139
|
+
of the document. | | `franchisor` | A party granting a franchise under the
|
|
140
|
+
agreement that is the subject of the document. | | `franchisee` | A party
|
|
141
|
+
granted a franchise under the agreement that is the subject of the document. | |
|
|
142
|
+
`buyer` | A party purchasing goods or services under the agreement that is the
|
|
143
|
+
subject of the document, including 'purchasers', 'customers', and 'clients'. | |
|
|
144
|
+
`seller` | A party selling or providing goods or services under the agreement
|
|
145
|
+
that is the subject of the document, including 'Vendors', 'Suppliers', and
|
|
146
|
+
'Service Providers' (where such parties are actually providing goods or services
|
|
147
|
+
under the agreement). | | `contractor` | A party contracted to perform work or
|
|
148
|
+
services under the agreement that is the subject of the document, including
|
|
149
|
+
'consultants'. | | `shareholder` | A party holding shares or equity under the
|
|
150
|
+
agreement that is the subject of the document. | | `joint_venturer` | A party
|
|
151
|
+
participating in a joint venture under the agreement that is the subject of the
|
|
152
|
+
document. | | `investor` | A party investing money or assets under the agreement
|
|
153
|
+
that is the subject of the document. | | `insurer` | A party providing insurance
|
|
154
|
+
under the agreement that is the subject of the document. | | `insured` | A party
|
|
155
|
+
insured under the agreement that is the subject of the document. | | `settlor` |
|
|
156
|
+
A party establishing the trust that is the subject of the document. | |
|
|
157
|
+
`trustee` | A party managing the trust that is the subject of the document. | |
|
|
158
|
+
`beneficiary` | A party benefiting from the trust that is the subject of the
|
|
159
|
+
document. | | `enacting_authority` | An authority (e.g., legislature, regulator,
|
|
160
|
+
Minister/Secretary, President/Prime Minister, tribunal, court, judge) giving
|
|
161
|
+
legal effect to or authorizing the document. All relevant individuals and bodies
|
|
162
|
+
should be annotated with this role where applicable. | | `empowered_authority` |
|
|
163
|
+
An authority (e.g., government agency, regulator, Minister/Secretary,
|
|
164
|
+
President/Prime Minister, tribunal, court) empowered by the document to carry
|
|
165
|
+
out functions or duties. | | `debater` | A person participating in the debate
|
|
166
|
+
that is the subject of the document. | | `governing_jurisdiction` | The
|
|
167
|
+
jurisdiction whose laws govern the document. | | `director` | A director or
|
|
168
|
+
other officer of a corporate legal person mentioned in the document. | | `clerk`
|
|
169
|
+
| A clerk, notary, or other official certifying, witnessing, filing, recording,
|
|
170
|
+
registering, or otherwise administering the document. | | `witness` | A witness
|
|
171
|
+
witnessing the signing of the document, or whose testimony is part of the case
|
|
172
|
+
that is the subject of the document. | | `other` | A party to the case,
|
|
173
|
+
agreement, legislation, or regulation that is the subject of the document that
|
|
174
|
+
does not fit into any of the other roles. | | `non_party` | A legal person
|
|
175
|
+
mentioned in the document that is not a party to the case, agreement,
|
|
176
|
+
legislation, or regulation that is the subject of the document. |
|
|
177
|
+
"""
|
|
178
|
+
|
|
179
|
+
parent: Optional[str] = None
|
|
180
|
+
"""
|
|
181
|
+
A unique identifier for a legal person in the format `per:{index}` where
|
|
182
|
+
`{index}` is a non-negative incrementing integer starting from zero.
|
|
183
|
+
"""
|
|
184
|
+
|
|
185
|
+
residence: Optional[str] = None
|
|
186
|
+
"""
|
|
187
|
+
A unique identifier for a location in the format `loc:{index}` where `{index}`
|
|
188
|
+
is a non-negative incrementing integer starting from zero.
|
|
189
|
+
"""
|
|
190
|
+
|
|
191
|
+
mentions: List[ILGSv1Span]
|
|
192
|
+
"""
|
|
193
|
+
An array of one or more spans within the document's text where the person is
|
|
194
|
+
mentioned.
|
|
195
|
+
"""
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List
|
|
4
|
+
|
|
5
|
+
from .._models import BaseModel
|
|
6
|
+
from .ilgs_v1_span import ILGSv1Span
|
|
7
|
+
|
|
8
|
+
__all__ = ["ILGSv1PhoneNumber"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class ILGSv1PhoneNumber(BaseModel):
|
|
12
|
+
"""A valid phone number identified in a document belonging to a legal person.
|
|
13
|
+
|
|
14
|
+
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.
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
number: str
|
|
18
|
+
"""
|
|
19
|
+
The normalized phone number in E.123 international notation conforming with
|
|
20
|
+
local conventions on the use of spaces and hyphens as separators.
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
person: str
|
|
24
|
+
"""The unique identifier of the person that this phone number belongs to."""
|
|
25
|
+
|
|
26
|
+
mentions: List[ILGSv1Span]
|
|
27
|
+
"""
|
|
28
|
+
An array of one or more spans within the document's text where the phone number
|
|
29
|
+
is mentioned.
|
|
30
|
+
"""
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Optional
|
|
4
|
+
|
|
5
|
+
from .._models import BaseModel
|
|
6
|
+
from .ilgs_v1_span import ILGSv1Span
|
|
7
|
+
|
|
8
|
+
__all__ = ["ILGSv1Quote"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class ILGSv1Quote(BaseModel):
|
|
12
|
+
"""A quotation within a document."""
|
|
13
|
+
|
|
14
|
+
source_segment: Optional[str] = None
|
|
15
|
+
"""
|
|
16
|
+
A unique identifier for a segment in the format `seg:{index}` where `{index}` is
|
|
17
|
+
a non-negative incrementing integer starting from zero.
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
source_document: Optional[str] = None
|
|
21
|
+
"""
|
|
22
|
+
A unique identifier for an external document in the format `exd:{index}` where
|
|
23
|
+
`{index}` is a non-negative incrementing integer starting from zero.
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
source_person: Optional[str] = None
|
|
27
|
+
"""
|
|
28
|
+
A unique identifier for a legal person in the format `per:{index}` where
|
|
29
|
+
`{index}` is a non-negative incrementing integer starting from zero.
|
|
30
|
+
"""
|
|
31
|
+
|
|
32
|
+
amending: bool
|
|
33
|
+
"""
|
|
34
|
+
Whether the quote is being used to amend or modify content, typically in other
|
|
35
|
+
documents.
|
|
36
|
+
"""
|
|
37
|
+
|
|
38
|
+
span: ILGSv1Span
|
|
39
|
+
"""A zero-based, half-open span into the Unicode code point space of input text.
|
|
40
|
+
|
|
41
|
+
All spans are globally laminar and well-nested similar to XML—it is impossible
|
|
42
|
+
for any two spans to partially overlap; they can only be disjoint, adjacent, or
|
|
43
|
+
wholly nested. Spans of the exact same type (e.g., segments) will never be
|
|
44
|
+
duplicated.
|
|
45
|
+
|
|
46
|
+
A span cannot be empty and will never start or end at whitespace.
|
|
47
|
+
|
|
48
|
+
Note that, when using programming languages other than Python (which uses
|
|
49
|
+
zero-based, half-open, Unicode code point-spaced string indexing), indices may
|
|
50
|
+
need to be translated accordingly (for example, JavaScript slices into UTF-16
|
|
51
|
+
code units instead of Unicode code points).
|
|
52
|
+
"""
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Optional
|
|
4
|
+
from typing_extensions import Literal
|
|
5
|
+
|
|
6
|
+
from .._models import BaseModel
|
|
7
|
+
from .ilgs_v1_span import ILGSv1Span
|
|
8
|
+
|
|
9
|
+
__all__ = ["ILGSv1Segment"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class ILGSv1Segment(BaseModel):
|
|
13
|
+
"""
|
|
14
|
+
A segment within the document representing a structurally distinct portion of the document's content.
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
id: str
|
|
18
|
+
"""
|
|
19
|
+
The unique identifier of the segment in the format `seg:{index}` where `{index}`
|
|
20
|
+
is a non-negative incrementing integer starting from zero.
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
kind: Literal["container", "unit", "item", "figure"]
|
|
24
|
+
"""
|
|
25
|
+
The structural 'kind' of the segment, being one of `container`, `unit`, `item`,
|
|
26
|
+
or `figure`.
|
|
27
|
+
|
|
28
|
+
A `container` is a structural or semantic grouping of content such as a chapter.
|
|
29
|
+
It can contain segments of any kind or none at all.
|
|
30
|
+
|
|
31
|
+
A `unit` is a single syntactically independent unit of text such as a paragraph.
|
|
32
|
+
It can only contain `item`s and `figure`s.
|
|
33
|
+
|
|
34
|
+
An `item` is a syntactically subordinate unit of text such as an item in a
|
|
35
|
+
run-in list. It can only contain other `item`s. Note that an `item` is
|
|
36
|
+
conceptually distinct from a list item—it is perfectly possible to encounter
|
|
37
|
+
list items that are syntactically independent of their surrounding items just as
|
|
38
|
+
it is possible to encounter dependent clauses that do not appear as part of a
|
|
39
|
+
list.
|
|
40
|
+
|
|
41
|
+
A `figure` is a visually structured or tabular unit of content such as a
|
|
42
|
+
diagram, equation, or table. It cannot contain segments.
|
|
43
|
+
"""
|
|
44
|
+
|
|
45
|
+
type: Optional[
|
|
46
|
+
Literal[
|
|
47
|
+
"title",
|
|
48
|
+
"book",
|
|
49
|
+
"part",
|
|
50
|
+
"chapter",
|
|
51
|
+
"subchapter",
|
|
52
|
+
"division",
|
|
53
|
+
"subdivision",
|
|
54
|
+
"subpart",
|
|
55
|
+
"subtitle",
|
|
56
|
+
"table_of_contents",
|
|
57
|
+
"article",
|
|
58
|
+
"section",
|
|
59
|
+
"regulation",
|
|
60
|
+
"rule",
|
|
61
|
+
"clause",
|
|
62
|
+
"paragraph",
|
|
63
|
+
"subarticle",
|
|
64
|
+
"subsection",
|
|
65
|
+
"subregulation",
|
|
66
|
+
"subrule",
|
|
67
|
+
"subclause",
|
|
68
|
+
"subparagraph",
|
|
69
|
+
"item",
|
|
70
|
+
"subitem",
|
|
71
|
+
"point",
|
|
72
|
+
"indent",
|
|
73
|
+
"schedule",
|
|
74
|
+
"annex",
|
|
75
|
+
"appendix",
|
|
76
|
+
"exhibit",
|
|
77
|
+
"recital",
|
|
78
|
+
"signature",
|
|
79
|
+
"note",
|
|
80
|
+
"figure",
|
|
81
|
+
"table",
|
|
82
|
+
"formula",
|
|
83
|
+
]
|
|
84
|
+
] = None
|
|
85
|
+
"""
|
|
86
|
+
The addressable 'type' of the segment within the document's referential scheme
|
|
87
|
+
and hierarchy, whether defined explicitly (e.g., by headings, such as
|
|
88
|
+
'Section 2. Definitions'), implicitly (e.g., by way of reference, such as 'as
|
|
89
|
+
defined in Section 2'), or by convention (e.g., [42] in a judgment often denotes
|
|
90
|
+
a `paragraph`, independent provisions in statute are often `section`s, etc.). If
|
|
91
|
+
the type is not known or not applicable, it will be set to `null`.
|
|
92
|
+
|
|
93
|
+
Note that, although many segment types may coincide with syntactic constructs,
|
|
94
|
+
they should be thought of purely as distinct formal citable units. Most
|
|
95
|
+
paragraphs (in the syntactic sense) will not have the `paragraph` type, for
|
|
96
|
+
example. That type is reserved for segments that would formally be cited as a
|
|
97
|
+
'Paragraph' within the document's referential scheme.
|
|
98
|
+
|
|
99
|
+
The following types are currently supported: `title`, `book`, `part`, `chapter`,
|
|
100
|
+
`subchapter`, `division`, `subdivision`, `subpart`, `subtitle`,
|
|
101
|
+
`table_of_contents`, `article`, `section`, `regulation`, `rule`, `clause`,
|
|
102
|
+
`paragraph`, `subarticle`, `subsection`, `subregulation`, `subrule`,
|
|
103
|
+
`subclause`, `subparagraph`, `item`, `subitem`, `point`, `indent`, `schedule`,
|
|
104
|
+
`annex`, `appendix`, `exhibit`, `recital`, `signature`, `note`, `figure`,
|
|
105
|
+
`table`, and `formula`.
|
|
106
|
+
|
|
107
|
+
The `title`, `book`, `part`, `chapter`, `subchapter`, `division`, `subdivision`,
|
|
108
|
+
`subpart`, `subtitle`, and `table_of_contents` types are exclusive to the
|
|
109
|
+
`container` kind.
|
|
110
|
+
|
|
111
|
+
The `figure` kind only supports the `figure`, `table`, and `formula` types, all
|
|
112
|
+
of which are exclusive to it.
|
|
113
|
+
"""
|
|
114
|
+
|
|
115
|
+
category: Literal["front_matter", "scope", "main", "annotation", "back_matter", "other"]
|
|
116
|
+
"""
|
|
117
|
+
The functional 'category' of the segment within the document, being one of
|
|
118
|
+
`front_matter`, `scope`, `main`, `annotation`, `back_matter`, or `other`.
|
|
119
|
+
|
|
120
|
+
`front_matter` denotes non-operative contextualizing content occurring at the
|
|
121
|
+
start of a document such as a preamble or recitals.
|
|
122
|
+
|
|
123
|
+
`scope` denotes operative content defining the application or interpretation of
|
|
124
|
+
a document such as definition sections and governing law clauses.
|
|
125
|
+
|
|
126
|
+
`main` denotes operative, non-scopal content.
|
|
127
|
+
|
|
128
|
+
`annotation` denotes non-operative annotative content providing explanatory or
|
|
129
|
+
referential information such as commentary, footnotes, and endnotes.
|
|
130
|
+
|
|
131
|
+
`back_matter` denotes non-operative contextualizing content occurring at the end
|
|
132
|
+
of a document such as authority statements.
|
|
133
|
+
|
|
134
|
+
`other` denotes content that does not fit into any of the other categories.
|
|
135
|
+
"""
|
|
136
|
+
|
|
137
|
+
type_name: Optional[ILGSv1Span] = None
|
|
138
|
+
"""A zero-based, half-open span into the Unicode code point space of input text.
|
|
139
|
+
|
|
140
|
+
All spans are globally laminar and well-nested similar to XML—it is impossible
|
|
141
|
+
for any two spans to partially overlap; they can only be disjoint, adjacent, or
|
|
142
|
+
wholly nested. Spans of the exact same type (e.g., segments) will never be
|
|
143
|
+
duplicated.
|
|
144
|
+
|
|
145
|
+
A span cannot be empty and will never start or end at whitespace.
|
|
146
|
+
|
|
147
|
+
Note that, when using programming languages other than Python (which uses
|
|
148
|
+
zero-based, half-open, Unicode code point-spaced string indexing), indices may
|
|
149
|
+
need to be translated accordingly (for example, JavaScript slices into UTF-16
|
|
150
|
+
code units instead of Unicode code points).
|
|
151
|
+
"""
|
|
152
|
+
|
|
153
|
+
code: Optional[ILGSv1Span] = None
|
|
154
|
+
"""A zero-based, half-open span into the Unicode code point space of input text.
|
|
155
|
+
|
|
156
|
+
All spans are globally laminar and well-nested similar to XML—it is impossible
|
|
157
|
+
for any two spans to partially overlap; they can only be disjoint, adjacent, or
|
|
158
|
+
wholly nested. Spans of the exact same type (e.g., segments) will never be
|
|
159
|
+
duplicated.
|
|
160
|
+
|
|
161
|
+
A span cannot be empty and will never start or end at whitespace.
|
|
162
|
+
|
|
163
|
+
Note that, when using programming languages other than Python (which uses
|
|
164
|
+
zero-based, half-open, Unicode code point-spaced string indexing), indices may
|
|
165
|
+
need to be translated accordingly (for example, JavaScript slices into UTF-16
|
|
166
|
+
code units instead of Unicode code points).
|
|
167
|
+
"""
|
|
168
|
+
|
|
169
|
+
title: Optional[ILGSv1Span] = None
|
|
170
|
+
"""A zero-based, half-open span into the Unicode code point space of input text.
|
|
171
|
+
|
|
172
|
+
All spans are globally laminar and well-nested similar to XML—it is impossible
|
|
173
|
+
for any two spans to partially overlap; they can only be disjoint, adjacent, or
|
|
174
|
+
wholly nested. Spans of the exact same type (e.g., segments) will never be
|
|
175
|
+
duplicated.
|
|
176
|
+
|
|
177
|
+
A span cannot be empty and will never start or end at whitespace.
|
|
178
|
+
|
|
179
|
+
Note that, when using programming languages other than Python (which uses
|
|
180
|
+
zero-based, half-open, Unicode code point-spaced string indexing), indices may
|
|
181
|
+
need to be translated accordingly (for example, JavaScript slices into UTF-16
|
|
182
|
+
code units instead of Unicode code points).
|
|
183
|
+
"""
|
|
184
|
+
|
|
185
|
+
parent: Optional[str] = None
|
|
186
|
+
"""
|
|
187
|
+
A unique identifier for a segment in the format `seg:{index}` where `{index}` is
|
|
188
|
+
a non-negative incrementing integer starting from zero.
|
|
189
|
+
"""
|
|
190
|
+
|
|
191
|
+
span: ILGSv1Span
|
|
192
|
+
"""A zero-based, half-open span into the Unicode code point space of input text.
|
|
193
|
+
|
|
194
|
+
All spans are globally laminar and well-nested similar to XML—it is impossible
|
|
195
|
+
for any two spans to partially overlap; they can only be disjoint, adjacent, or
|
|
196
|
+
wholly nested. Spans of the exact same type (e.g., segments) will never be
|
|
197
|
+
duplicated.
|
|
198
|
+
|
|
199
|
+
A span cannot be empty and will never start or end at whitespace.
|
|
200
|
+
|
|
201
|
+
Note that, when using programming languages other than Python (which uses
|
|
202
|
+
zero-based, half-open, Unicode code point-spaced string indexing), indices may
|
|
203
|
+
need to be translated accordingly (for example, JavaScript slices into UTF-16
|
|
204
|
+
code units instead of Unicode code points).
|
|
205
|
+
"""
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from .._models import BaseModel
|
|
4
|
+
|
|
5
|
+
__all__ = ["ILGSv1Span"]
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class ILGSv1Span(BaseModel):
|
|
9
|
+
"""A zero-based, half-open span into the Unicode code point space of input text.
|
|
10
|
+
|
|
11
|
+
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.
|
|
12
|
+
|
|
13
|
+
A span cannot be empty and will never start or end at whitespace.
|
|
14
|
+
|
|
15
|
+
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).
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
start: int
|
|
19
|
+
"""
|
|
20
|
+
The zero-based start index of the half-open span of Unicode code points in the
|
|
21
|
+
input text.
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
end: int
|
|
25
|
+
"""
|
|
26
|
+
The zero-based end index of the half-open span (i.e., the end is exclusive) of
|
|
27
|
+
Unicode code points in the input text.
|
|
28
|
+
"""
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List
|
|
4
|
+
|
|
5
|
+
from .._models import BaseModel
|
|
6
|
+
from .ilgs_v1_span import ILGSv1Span
|
|
7
|
+
|
|
8
|
+
__all__ = ["ILGSv1Term"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class ILGSv1Term(BaseModel):
|
|
12
|
+
"""A term assigned a definite meaning within a document."""
|
|
13
|
+
|
|
14
|
+
id: str
|
|
15
|
+
"""
|
|
16
|
+
The unique identifier of the term in the format `term:{index}` where `{index}`
|
|
17
|
+
is a non-negative incrementing integer starting from zero.
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
name: ILGSv1Span
|
|
21
|
+
"""A zero-based, half-open span into the Unicode code point space of input text.
|
|
22
|
+
|
|
23
|
+
All spans are globally laminar and well-nested similar to XML—it is impossible
|
|
24
|
+
for any two spans to partially overlap; they can only be disjoint, adjacent, or
|
|
25
|
+
wholly nested. Spans of the exact same type (e.g., segments) will never be
|
|
26
|
+
duplicated.
|
|
27
|
+
|
|
28
|
+
A span cannot be empty and will never start or end at whitespace.
|
|
29
|
+
|
|
30
|
+
Note that, when using programming languages other than Python (which uses
|
|
31
|
+
zero-based, half-open, Unicode code point-spaced string indexing), indices may
|
|
32
|
+
need to be translated accordingly (for example, JavaScript slices into UTF-16
|
|
33
|
+
code units instead of Unicode code points).
|
|
34
|
+
"""
|
|
35
|
+
|
|
36
|
+
meaning: ILGSv1Span
|
|
37
|
+
"""A zero-based, half-open span into the Unicode code point space of input text.
|
|
38
|
+
|
|
39
|
+
All spans are globally laminar and well-nested similar to XML—it is impossible
|
|
40
|
+
for any two spans to partially overlap; they can only be disjoint, adjacent, or
|
|
41
|
+
wholly nested. Spans of the exact same type (e.g., segments) will never be
|
|
42
|
+
duplicated.
|
|
43
|
+
|
|
44
|
+
A span cannot be empty and will never start or end at whitespace.
|
|
45
|
+
|
|
46
|
+
Note that, when using programming languages other than Python (which uses
|
|
47
|
+
zero-based, half-open, Unicode code point-spaced string indexing), indices may
|
|
48
|
+
need to be translated accordingly (for example, JavaScript slices into UTF-16
|
|
49
|
+
code units instead of Unicode code points).
|
|
50
|
+
"""
|
|
51
|
+
|
|
52
|
+
mentions: List[ILGSv1Span]
|
|
53
|
+
"""
|
|
54
|
+
An array of spans within the document's text where the term is mentioned outside
|
|
55
|
+
of its definition.
|
|
56
|
+
|
|
57
|
+
It is possible for the term to have no mentions if, outside of its definition,
|
|
58
|
+
it is never referred to in the document.
|
|
59
|
+
"""
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List
|
|
4
|
+
|
|
5
|
+
from .._models import BaseModel
|
|
6
|
+
from .ilgs_v1_span import ILGSv1Span
|
|
7
|
+
|
|
8
|
+
__all__ = ["ILGSv1Website"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class ILGSv1Website(BaseModel):
|
|
12
|
+
"""A website identified in a document belonging to a legal person.
|
|
13
|
+
|
|
14
|
+
If a website was mentioned in the document but is not attributable to a legal person, it will not be extracted.
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
url: str
|
|
18
|
+
"""The normalized URL of the website in the form `https://{host}/`."""
|
|
19
|
+
|
|
20
|
+
person: str
|
|
21
|
+
"""The unique identifier of the person that this website belongs to."""
|
|
22
|
+
|
|
23
|
+
mentions: List[ILGSv1Span]
|
|
24
|
+
"""
|
|
25
|
+
An array of one or more spans within the document's text where the website is
|
|
26
|
+
mentioned (including paths and slugs which are not part of the website's
|
|
27
|
+
normalized URL).
|
|
28
|
+
"""
|
|
@@ -34,8 +34,8 @@ class RerankingCreateParams(TypedDict, total=False):
|
|
|
34
34
|
Each text must contain at least one non-whitespace character.
|
|
35
35
|
"""
|
|
36
36
|
|
|
37
|
-
|
|
38
|
-
"""
|
|
37
|
+
top_n: Optional[int]
|
|
38
|
+
"""A whole number greater than or equal to 1."""
|
|
39
39
|
|
|
40
40
|
is_iql: bool
|
|
41
41
|
"""
|
|
@@ -62,18 +62,18 @@ class RerankingCreateParams(TypedDict, total=False):
|
|
|
62
62
|
`chunk_min` uses the lowest relevance score of all of a text's chunks.
|
|
63
63
|
"""
|
|
64
64
|
|
|
65
|
-
|
|
66
|
-
"""
|
|
65
|
+
chunking_options: Optional[ChunkingOptions]
|
|
66
|
+
"""Options for how to split text into smaller chunks."""
|
|
67
67
|
|
|
68
68
|
|
|
69
69
|
class ChunkingOptions(TypedDict, total=False):
|
|
70
70
|
"""Options for how to split text into smaller chunks."""
|
|
71
71
|
|
|
72
|
+
size: Optional[int]
|
|
73
|
+
"""A whole number greater than or equal to 1."""
|
|
74
|
+
|
|
72
75
|
overlap_ratio: Optional[float]
|
|
73
76
|
"""A number greater than or equal to 0 and less than 1."""
|
|
74
77
|
|
|
75
78
|
overlap_tokens: Optional[int]
|
|
76
79
|
"""A whole number greater than or equal to 0."""
|
|
77
|
-
|
|
78
|
-
size: Optional[int]
|
|
79
|
-
"""A whole number greater than or equal to 1."""
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: isaacus
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.12.0
|
|
4
4
|
Summary: The official Python library for the isaacus API
|
|
5
5
|
Project-URL: Homepage, https://github.com/isaacus-dev/isaacus-python
|
|
6
6
|
Project-URL: Repository, https://github.com/isaacus-dev/isaacus-python
|