thinkthen 0.1.1-aarch64-linux → 0.2.0-aarch64-linux

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.
Files changed (182) hide show
  1. checksums.yaml +4 -4
  2. data/API.md +40 -0
  3. data/LICENSE +21 -0
  4. data/README.md +562 -0
  5. data/THIRD-PARTY-NOTICES/anstream-1.0.0/LICENSE-APACHE +202 -0
  6. data/THIRD-PARTY-NOTICES/anstream-1.0.0/LICENSE-MIT +19 -0
  7. data/THIRD-PARTY-NOTICES/anstyle-1.0.14/LICENSE-APACHE +202 -0
  8. data/THIRD-PARTY-NOTICES/anstyle-1.0.14/LICENSE-MIT +19 -0
  9. data/THIRD-PARTY-NOTICES/anstyle-parse-1.0.0/LICENSE-APACHE +202 -0
  10. data/THIRD-PARTY-NOTICES/anstyle-parse-1.0.0/LICENSE-MIT +19 -0
  11. data/THIRD-PARTY-NOTICES/anstyle-query-1.1.5/LICENSE-APACHE +202 -0
  12. data/THIRD-PARTY-NOTICES/anstyle-query-1.1.5/LICENSE-MIT +19 -0
  13. data/THIRD-PARTY-NOTICES/base64-0.23.1/LICENSE-APACHE +201 -0
  14. data/THIRD-PARTY-NOTICES/base64-0.23.1/LICENSE-MIT +21 -0
  15. data/THIRD-PARTY-NOTICES/bitflags-2.13.2/LICENSE-APACHE +201 -0
  16. data/THIRD-PARTY-NOTICES/bitflags-2.13.2/LICENSE-MIT +25 -0
  17. data/THIRD-PARTY-NOTICES/block-buffer-0.10.4/LICENSE-APACHE +201 -0
  18. data/THIRD-PARTY-NOTICES/block-buffer-0.10.4/LICENSE-MIT +25 -0
  19. data/THIRD-PARTY-NOTICES/bytes-1.12.1/LICENSE +25 -0
  20. data/THIRD-PARTY-NOTICES/cfg-if-1.0.5/LICENSE-APACHE +201 -0
  21. data/THIRD-PARTY-NOTICES/cfg-if-1.0.5/LICENSE-MIT +25 -0
  22. data/THIRD-PARTY-NOTICES/clap-4.6.7/LICENSE-APACHE +202 -0
  23. data/THIRD-PARTY-NOTICES/clap-4.6.7/LICENSE-MIT +19 -0
  24. data/THIRD-PARTY-NOTICES/clap_builder-4.6.7/LICENSE-APACHE +202 -0
  25. data/THIRD-PARTY-NOTICES/clap_builder-4.6.7/LICENSE-MIT +19 -0
  26. data/THIRD-PARTY-NOTICES/clap_complete-4.6.11/LICENSE-APACHE +202 -0
  27. data/THIRD-PARTY-NOTICES/clap_complete-4.6.11/LICENSE-MIT +19 -0
  28. data/THIRD-PARTY-NOTICES/clap_lex-1.1.1/LICENSE-APACHE +202 -0
  29. data/THIRD-PARTY-NOTICES/clap_lex-1.1.1/LICENSE-MIT +19 -0
  30. data/THIRD-PARTY-NOTICES/clap_mangen-0.2.33/LICENSE-APACHE +202 -0
  31. data/THIRD-PARTY-NOTICES/clap_mangen-0.2.33/LICENSE-MIT +19 -0
  32. data/THIRD-PARTY-NOTICES/colorchoice-1.0.5/LICENSE-APACHE +202 -0
  33. data/THIRD-PARTY-NOTICES/colorchoice-1.0.5/LICENSE-MIT +19 -0
  34. data/THIRD-PARTY-NOTICES/command-group-5.0.1/COPYRIGHT +29 -0
  35. data/THIRD-PARTY-NOTICES/command-group-5.0.1/LICENSE-APACHE +176 -0
  36. data/THIRD-PARTY-NOTICES/command-group-5.0.1/LICENSE-MIT +23 -0
  37. data/THIRD-PARTY-NOTICES/cpufeatures-0.2.17/LICENSE-APACHE +201 -0
  38. data/THIRD-PARTY-NOTICES/cpufeatures-0.2.17/LICENSE-MIT +25 -0
  39. data/THIRD-PARTY-NOTICES/crc32fast-1.5.3/LICENSE-APACHE +202 -0
  40. data/THIRD-PARTY-NOTICES/crc32fast-1.5.3/LICENSE-MIT +21 -0
  41. data/THIRD-PARTY-NOTICES/crypto-common-0.1.7/LICENSE-APACHE +201 -0
  42. data/THIRD-PARTY-NOTICES/crypto-common-0.1.7/LICENSE-MIT +25 -0
  43. data/THIRD-PARTY-NOTICES/ctrlc-3.5.2/LICENSE-APACHE +201 -0
  44. data/THIRD-PARTY-NOTICES/ctrlc-3.5.2/LICENSE-MIT +23 -0
  45. data/THIRD-PARTY-NOTICES/digest-0.10.7/LICENSE-APACHE +201 -0
  46. data/THIRD-PARTY-NOTICES/digest-0.10.7/LICENSE-MIT +25 -0
  47. data/THIRD-PARTY-NOTICES/dyn-clone-1.0.20/LICENSE-APACHE +176 -0
  48. data/THIRD-PARTY-NOTICES/dyn-clone-1.0.20/LICENSE-MIT +23 -0
  49. data/THIRD-PARTY-NOTICES/equivalent-1.0.3/LICENSE-APACHE +201 -0
  50. data/THIRD-PARTY-NOTICES/equivalent-1.0.3/LICENSE-MIT +25 -0
  51. data/THIRD-PARTY-NOTICES/fastrand-2.5.0/LICENSE-APACHE +201 -0
  52. data/THIRD-PARTY-NOTICES/fastrand-2.5.0/LICENSE-MIT +23 -0
  53. data/THIRD-PARTY-NOTICES/flate2-1.1.10/LICENSE-APACHE +201 -0
  54. data/THIRD-PARTY-NOTICES/flate2-1.1.10/LICENSE-MIT +25 -0
  55. data/THIRD-PARTY-NOTICES/generic-array-0.14.7/LICENSE +21 -0
  56. data/THIRD-PARTY-NOTICES/getrandom-0.2.17/LICENSE-APACHE +201 -0
  57. data/THIRD-PARTY-NOTICES/getrandom-0.2.17/LICENSE-MIT +26 -0
  58. data/THIRD-PARTY-NOTICES/getrandom-0.3.4/LICENSE-APACHE +201 -0
  59. data/THIRD-PARTY-NOTICES/getrandom-0.3.4/LICENSE-MIT +26 -0
  60. data/THIRD-PARTY-NOTICES/getrandom-0.4.3/LICENSE-APACHE +201 -0
  61. data/THIRD-PARTY-NOTICES/getrandom-0.4.3/LICENSE-MIT +26 -0
  62. data/THIRD-PARTY-NOTICES/hashbrown-0.17.1/LICENSE-APACHE +201 -0
  63. data/THIRD-PARTY-NOTICES/hashbrown-0.17.1/LICENSE-MIT +25 -0
  64. data/THIRD-PARTY-NOTICES/http-1.5.0/LICENSE-APACHE +201 -0
  65. data/THIRD-PARTY-NOTICES/http-1.5.0/LICENSE-MIT +25 -0
  66. data/THIRD-PARTY-NOTICES/httparse-1.10.1/LICENSE-APACHE +201 -0
  67. data/THIRD-PARTY-NOTICES/httparse-1.10.1/LICENSE-MIT +20 -0
  68. data/THIRD-PARTY-NOTICES/httpdate-1.0.3/LICENSE-APACHE +201 -0
  69. data/THIRD-PARTY-NOTICES/httpdate-1.0.3/LICENSE-MIT +19 -0
  70. data/THIRD-PARTY-NOTICES/index.json +633 -0
  71. data/THIRD-PARTY-NOTICES/indexmap-2.14.2/LICENSE-APACHE +201 -0
  72. data/THIRD-PARTY-NOTICES/indexmap-2.14.2/LICENSE-MIT +25 -0
  73. data/THIRD-PARTY-NOTICES/is_terminal_polyfill-1.70.2/LICENSE-APACHE +202 -0
  74. data/THIRD-PARTY-NOTICES/is_terminal_polyfill-1.70.2/LICENSE-MIT +19 -0
  75. data/THIRD-PARTY-NOTICES/itoa-1.0.18/LICENSE-APACHE +176 -0
  76. data/THIRD-PARTY-NOTICES/itoa-1.0.18/LICENSE-MIT +23 -0
  77. data/THIRD-PARTY-NOTICES/libc-0.2.190/LICENSE-APACHE +176 -0
  78. data/THIRD-PARTY-NOTICES/libc-0.2.190/LICENSE-MIT +25 -0
  79. data/THIRD-PARTY-NOTICES/linux-raw-sys-0.12.1/COPYRIGHT +29 -0
  80. data/THIRD-PARTY-NOTICES/linux-raw-sys-0.12.1/LICENSE-APACHE +201 -0
  81. data/THIRD-PARTY-NOTICES/linux-raw-sys-0.12.1/LICENSE-Apache-2.0_WITH_LLVM-exception +220 -0
  82. data/THIRD-PARTY-NOTICES/linux-raw-sys-0.12.1/LICENSE-MIT +23 -0
  83. data/THIRD-PARTY-NOTICES/log-0.4.34/LICENSE-APACHE +201 -0
  84. data/THIRD-PARTY-NOTICES/log-0.4.34/LICENSE-MIT +25 -0
  85. data/THIRD-PARTY-NOTICES/memchr-2.8.3/COPYING +3 -0
  86. data/THIRD-PARTY-NOTICES/memchr-2.8.3/LICENSE-MIT +21 -0
  87. data/THIRD-PARTY-NOTICES/nix-0.27.1/LICENSE +21 -0
  88. data/THIRD-PARTY-NOTICES/nix-0.31.3/LICENSE +21 -0
  89. data/THIRD-PARTY-NOTICES/once_cell-1.21.4/LICENSE-APACHE +201 -0
  90. data/THIRD-PARTY-NOTICES/once_cell-1.21.4/LICENSE-MIT +23 -0
  91. data/THIRD-PARTY-NOTICES/openssl-probe-0.2.1/LICENSE-APACHE +201 -0
  92. data/THIRD-PARTY-NOTICES/openssl-probe-0.2.1/LICENSE-MIT +25 -0
  93. data/THIRD-PARTY-NOTICES/percent-encoding-2.3.2/LICENSE-APACHE +201 -0
  94. data/THIRD-PARTY-NOTICES/percent-encoding-2.3.2/LICENSE-MIT +25 -0
  95. data/THIRD-PARTY-NOTICES/quick-xml-0.41.0/LICENSE-MIT.md +23 -0
  96. data/THIRD-PARTY-NOTICES/ref-cast-1.0.27/LICENSE-APACHE +176 -0
  97. data/THIRD-PARTY-NOTICES/ref-cast-1.0.27/LICENSE-MIT +23 -0
  98. data/THIRD-PARTY-NOTICES/ring-0.17.14/LICENSE +9 -0
  99. data/THIRD-PARTY-NOTICES/ring-0.17.14/LICENSE-BoringSSL +272 -0
  100. data/THIRD-PARTY-NOTICES/ring-0.17.14/LICENSE-other-bits +13 -0
  101. data/THIRD-PARTY-NOTICES/ring-0.17.14/src/polyfill/once_cell/LICENSE-APACHE +201 -0
  102. data/THIRD-PARTY-NOTICES/ring-0.17.14/src/polyfill/once_cell/LICENSE-MIT +23 -0
  103. data/THIRD-PARTY-NOTICES/ring-0.17.14/third_party/fiat/LICENSE +15 -0
  104. data/THIRD-PARTY-NOTICES/roff-1.1.1/LICENSE-APACHE +202 -0
  105. data/THIRD-PARTY-NOTICES/roff-1.1.1/LICENSE-MIT +19 -0
  106. data/THIRD-PARTY-NOTICES/rustix-1.1.5/COPYRIGHT +29 -0
  107. data/THIRD-PARTY-NOTICES/rustix-1.1.5/LICENSE-APACHE +201 -0
  108. data/THIRD-PARTY-NOTICES/rustix-1.1.5/LICENSE-Apache-2.0_WITH_LLVM-exception +220 -0
  109. data/THIRD-PARTY-NOTICES/rustix-1.1.5/LICENSE-MIT +23 -0
  110. data/THIRD-PARTY-NOTICES/rustls-0.23.46/LICENSE-APACHE +201 -0
  111. data/THIRD-PARTY-NOTICES/rustls-0.23.46/LICENSE-ISC +15 -0
  112. data/THIRD-PARTY-NOTICES/rustls-0.23.46/LICENSE-MIT +25 -0
  113. data/THIRD-PARTY-NOTICES/rustls-native-certs-0.8.5/LICENSE +10 -0
  114. data/THIRD-PARTY-NOTICES/rustls-native-certs-0.8.5/LICENSE-APACHE +201 -0
  115. data/THIRD-PARTY-NOTICES/rustls-native-certs-0.8.5/LICENSE-ISC +15 -0
  116. data/THIRD-PARTY-NOTICES/rustls-native-certs-0.8.5/LICENSE-MIT +25 -0
  117. data/THIRD-PARTY-NOTICES/rustls-pki-types-1.15.1/LICENSE-APACHE +201 -0
  118. data/THIRD-PARTY-NOTICES/rustls-pki-types-1.15.1/LICENSE-MIT +25 -0
  119. data/THIRD-PARTY-NOTICES/rustls-platform-verifier-0.7.1/LICENSE-APACHE +201 -0
  120. data/THIRD-PARTY-NOTICES/rustls-platform-verifier-0.7.1/LICENSE-MIT +21 -0
  121. data/THIRD-PARTY-NOTICES/rustls-webpki-0.103.16/LICENSE +19 -0
  122. data/THIRD-PARTY-NOTICES/schemars-1.2.3/LICENSE +21 -0
  123. data/THIRD-PARTY-NOTICES/serde-1.0.229/LICENSE-APACHE +176 -0
  124. data/THIRD-PARTY-NOTICES/serde-1.0.229/LICENSE-MIT +23 -0
  125. data/THIRD-PARTY-NOTICES/serde_core-1.0.229/LICENSE-APACHE +176 -0
  126. data/THIRD-PARTY-NOTICES/serde_core-1.0.229/LICENSE-MIT +23 -0
  127. data/THIRD-PARTY-NOTICES/serde_json-1.0.151/LICENSE-APACHE +176 -0
  128. data/THIRD-PARTY-NOTICES/serde_json-1.0.151/LICENSE-MIT +23 -0
  129. data/THIRD-PARTY-NOTICES/sha2-0.10.9/LICENSE-APACHE +201 -0
  130. data/THIRD-PARTY-NOTICES/sha2-0.10.9/LICENSE-MIT +27 -0
  131. data/THIRD-PARTY-NOTICES/strsim-0.11.1/LICENSE +23 -0
  132. data/THIRD-PARTY-NOTICES/subtle-2.6.1/LICENSE +29 -0
  133. data/THIRD-PARTY-NOTICES/tempfile-3.23.0/LICENSE-APACHE +201 -0
  134. data/THIRD-PARTY-NOTICES/tempfile-3.23.0/LICENSE-MIT +25 -0
  135. data/THIRD-PARTY-NOTICES/thiserror-2.0.21/LICENSE-APACHE +176 -0
  136. data/THIRD-PARTY-NOTICES/thiserror-2.0.21/LICENSE-MIT +23 -0
  137. data/THIRD-PARTY-NOTICES/tinyvec-1.13.3/LICENSE-APACHE.md +202 -0
  138. data/THIRD-PARTY-NOTICES/tinyvec-1.13.3/LICENSE-MIT.md +5 -0
  139. data/THIRD-PARTY-NOTICES/tinyvec-1.13.3/LICENSE-ZLIB.md +11 -0
  140. data/THIRD-PARTY-NOTICES/typed-path-0.13.0/LICENSE-APACHE +176 -0
  141. data/THIRD-PARTY-NOTICES/typed-path-0.13.0/LICENSE-MIT +23 -0
  142. data/THIRD-PARTY-NOTICES/typenum-1.20.1/LICENSE +1 -0
  143. data/THIRD-PARTY-NOTICES/typenum-1.20.1/LICENSE-APACHE +201 -0
  144. data/THIRD-PARTY-NOTICES/typenum-1.20.1/LICENSE-MIT +21 -0
  145. data/THIRD-PARTY-NOTICES/unicode-general-category-1.1.0/LICENSE +201 -0
  146. data/THIRD-PARTY-NOTICES/unicode-normalization-0.1.26/COPYRIGHT +7 -0
  147. data/THIRD-PARTY-NOTICES/unicode-normalization-0.1.26/LICENSE-APACHE +201 -0
  148. data/THIRD-PARTY-NOTICES/unicode-normalization-0.1.26/LICENSE-MIT +25 -0
  149. data/THIRD-PARTY-NOTICES/unicode-normalization-0.1.26/LICENSE-UNICODE +39 -0
  150. data/THIRD-PARTY-NOTICES/untrusted-0.9.0/LICENSE.txt +13 -0
  151. data/THIRD-PARTY-NOTICES/ureq-3.4.2/LICENSE-APACHE +201 -0
  152. data/THIRD-PARTY-NOTICES/ureq-3.4.2/LICENSE-MIT +21 -0
  153. data/THIRD-PARTY-NOTICES/ureq-proto-0.6.4/LICENSE-APACHE.txt +202 -0
  154. data/THIRD-PARTY-NOTICES/ureq-proto-0.6.4/LICENSE-MIT.txt +7 -0
  155. data/THIRD-PARTY-NOTICES/utf8-zero-0.8.1/LICENSE-APACHE +176 -0
  156. data/THIRD-PARTY-NOTICES/utf8-zero-0.8.1/LICENSE-MIT +23 -0
  157. data/THIRD-PARTY-NOTICES/utf8parse-0.2.2/LICENSE-APACHE +176 -0
  158. data/THIRD-PARTY-NOTICES/utf8parse-0.2.2/LICENSE-MIT +25 -0
  159. data/THIRD-PARTY-NOTICES/zeroize-1.9.0/LICENSE-APACHE +202 -0
  160. data/THIRD-PARTY-NOTICES/zeroize-1.9.0/LICENSE-MIT +25 -0
  161. data/THIRD-PARTY-NOTICES/zip-9.1.2/LICENSE +21 -0
  162. data/THIRD-PARTY-NOTICES/zlib-rs-0.6.8/LICENSE +19 -0
  163. data/THIRD-PARTY-NOTICES/zmij-1.0.23/LICENSE-MIT +23 -0
  164. data/lib/thinkthen/call_owner.rb +68 -0
  165. data/lib/thinkthen/client.rb +293 -0
  166. data/lib/thinkthen/configuration.rb +76 -0
  167. data/lib/thinkthen/contract.rb +89 -0
  168. data/lib/thinkthen/libthinkthen_ffi.so +0 -0
  169. data/lib/thinkthen/native.rb +350 -0
  170. data/lib/thinkthen/native_allocator.rb +35 -0
  171. data/lib/thinkthen/native_reader.rb +87 -0
  172. data/lib/thinkthen/questions.rb +184 -0
  173. data/lib/thinkthen/row.rb +173 -0
  174. data/lib/thinkthen/rows.rb +199 -0
  175. data/lib/thinkthen/values.rb +111 -0
  176. data/lib/thinkthen/version.rb +3 -1
  177. data/lib/thinkthen.rb +79 -699
  178. data/sig/error_codes.rbs +3 -0
  179. data/sig/internal.rbs +277 -0
  180. data/sig/thinkthen.rbs +440 -0
  181. metadata +207 -13
  182. data/lib/thinkthen/thinkthen.so +0 -0
data/sig/thinkthen.rbs ADDED
@@ -0,0 +1,440 @@
1
+ module ThinkThen
2
+ VERSION: String
3
+ type backend = :systemone | :openai | :stub
4
+ type function = :decide | :choose | :tag | :score | :filter | :rank | :find | :recognize | :relate | :annotate
5
+ type piece_tag = "BEGIN" | "END" | "INSIDE" | "OUT" | "SINGLE"
6
+ type status = :answered | :unsure | :failed
7
+ type json = nil | bool | Integer | Float | String | Symbol | Array[json] | Hash[String | Symbol, json]
8
+ type field = String | Array[String | Symbol | Integer]
9
+ type threshold = Float | Range[Float]
10
+ type annotation_question = DecideQuestion | ChooseQuestion | TagQuestion | ScoreQuestion | FindQuestion | RecognizeQuestion | RelateQuestion
11
+ type toolbox_question = annotation_question | FilterQuestion | RankQuestion
12
+ module Error
13
+ attr_reader code: error_code
14
+ attr_reader http_status: Integer?
15
+ def initialize: (?String?, code: error_code, ?http_status: Integer?) -> void
16
+ end
17
+ module NoAnswerError
18
+ end
19
+ class LibraryError < StandardError
20
+ include Error
21
+ end
22
+ class UnknownCodeError < LibraryError
23
+ attr_reader raw_code: Integer
24
+ attr_reader raw_name: String?
25
+ def initialize: (?String?, raw_code: Integer, ?raw_name: String?, ?http_status: Integer?) -> void
26
+ end
27
+ class UsageError < ArgumentError
28
+ include Error
29
+ end
30
+ class SetupError < LibraryError
31
+ end
32
+ class CancelledError < LibraryError
33
+ end
34
+ class InternalError < LibraryError
35
+ end
36
+ class UnsureError < StandardError
37
+ include NoAnswerError
38
+ attr_reader row: Result
39
+ attr_reader probability: Float?
40
+ def initialize: (Result) -> void
41
+ end
42
+ class FailedError < LibraryError
43
+ include NoAnswerError
44
+ attr_reader rows: Array[Result]
45
+ def initialize: (?String?, code: error_code, ?http_status: Integer?, ?rows: Array[Result]) -> void
46
+ end
47
+ class Result
48
+ attr_reader function: function
49
+ attr_reader status: status
50
+ attr_reader probability: Float?
51
+ attr_reader error: RowError?
52
+ attr_reader position: Integer
53
+ attr_reader id: String | Integer | nil
54
+ attr_reader source: Source
55
+ attr_reader detail: untyped
56
+ attr_reader item: untyped
57
+ def answered?: () -> bool
58
+ def unsure?: () -> bool
59
+ def failed?: () -> bool
60
+ def id_present?: () -> bool
61
+ def answer: () -> untyped
62
+ def raise_if_failed: () -> self
63
+ def ==: (untyped) -> bool
64
+ def eql?: (untyped) -> bool
65
+ def hash: () -> Integer
66
+ def to_s: () -> String
67
+ def inspect: () -> String
68
+ def to_h: () -> Hash[String, json]
69
+ def to_json: (*untyped) -> String
70
+ end
71
+ class DecideRow < Result
72
+ def answer: () -> (bool)
73
+ def yes?: () -> bool
74
+ end
75
+ class ChooseRow < Result
76
+ def answer: () -> (String | Symbol)
77
+ end
78
+ class TagRow < Result
79
+ def answer: () -> (Array[String | Symbol])
80
+ end
81
+ class ScoreRow < Result
82
+ def answer: () -> (Float)
83
+ end
84
+ class RankRow < Result
85
+ def answer: () -> (Integer)
86
+ end
87
+ class FindRow < Result
88
+ def answer: () -> (Span?)
89
+ end
90
+ class RecognizeRow < Result
91
+ def answer: () -> (Array[Name])
92
+ end
93
+ class RelateRow < Result
94
+ def answer: () -> (Array[Relation])
95
+ end
96
+ class AnnotateRow < Result
97
+ def answer: () -> (AnnotationAnswers)
98
+ end
99
+ class Source < Data
100
+ include WireValue
101
+ attr_reader question_identity: String
102
+ attr_reader backend: backend
103
+ attr_reader model: String
104
+ attr_reader name: String?
105
+ def to_h: () -> Hash[String, json]
106
+ def self.new: (question_identity: String, backend: backend, model: String, ?name: String?) -> Source
107
+ end
108
+ class RowError < FailedError
109
+ def to_json: (*untyped) -> String
110
+ attr_reader code: error_code
111
+ attr_reader message: String
112
+ attr_reader http_status: Integer?
113
+ attr_reader raw_code: Integer?
114
+ attr_reader raw_name: String?
115
+ def self.new: (code: error_code, message: String, ?http_status: Integer?, ?raw_code: Integer?, ?raw_name: String?) -> RowError
116
+ def to_h: () -> Hash[String, json]
117
+ end
118
+ class RelationRule < Data
119
+ include WireValue
120
+ attr_reader source: String
121
+ attr_reader target: String
122
+ attr_reader relation: String
123
+ attr_reader reads: String?
124
+ attr_reader either: bool
125
+ def self.new: (source: String, target: String, relation: String, ?reads: String?, ?either: bool) -> RelationRule
126
+ def to_h: () -> Hash[String, json]
127
+ end
128
+ class RetryPolicy < Data
129
+ include WireValue
130
+ attr_reader max_retries: Integer?
131
+ attr_reader initial_backoff: Float?
132
+ attr_reader attempt_timeout: Float?
133
+ def self.new: (?max_retries: Integer?, ?initial_backoff: Float?, ?attempt_timeout: Float?) -> RetryPolicy
134
+ def to_h: () -> Hash[String, json]
135
+ end
136
+ class LabelDetail < Data
137
+ include WireValue
138
+ attr_reader labels: Hash[String, Float]
139
+ def to_h: () -> Hash[String, json]
140
+ def self.new: (labels: Hash[String, Float]) -> LabelDetail
141
+ end
142
+ class LevelDetail < Data
143
+ include WireValue
144
+ attr_reader levels: Array[Float]
145
+ def to_h: () -> Hash[String, json]
146
+ def self.new: (levels: Array[Float]) -> LevelDetail
147
+ end
148
+ class Span < Data
149
+ include WireValue
150
+ attr_reader text: String
151
+ attr_reader start: Integer
152
+ attr_reader end: Integer
153
+ def to_h: () -> Hash[String, json]
154
+ def self.new: (text: String, start: Integer, end: Integer) -> Span
155
+ end
156
+ class Name < Data
157
+ include WireValue
158
+ attr_reader text: String
159
+ attr_reader start: Integer
160
+ attr_reader end: Integer
161
+ attr_reader kind: String
162
+ attr_reader probability: Float?
163
+ def to_h: () -> Hash[String, json]
164
+ def self.new: (text: String, start: Integer, end: Integer, kind: String, ?probability: Float?) -> Name
165
+ end
166
+ class RelationName < Data
167
+ include WireValue
168
+ attr_reader text: String
169
+ attr_reader start: Integer
170
+ attr_reader end: Integer
171
+ attr_reader kind: String
172
+ def to_h: () -> Hash[String, json]
173
+ def self.new: (text: String, start: Integer, end: Integer, kind: String) -> RelationName
174
+ end
175
+ class Relation < Data
176
+ include WireValue
177
+ attr_reader source: RelationName
178
+ attr_reader target: RelationName
179
+ attr_reader relation: String
180
+ attr_reader probability: Float?
181
+ attr_reader either: bool?
182
+ def to_h: () -> Hash[String, json]
183
+ def self.new: (source: RelationName, target: RelationName, relation: String, ?probability: Float?, ?either: bool?) -> Relation
184
+ end
185
+ class RelationDetail < Data
186
+ include WireValue
187
+ attr_reader names: Array[Name]
188
+ attr_reader pairs: Array[Relation]
189
+ def to_h: () -> Hash[String, json]
190
+ def self.new: (names: Array[Name], pairs: Array[Relation]) -> RelationDetail
191
+ end
192
+ class PieceDetail < Data
193
+ include WireValue
194
+ attr_reader text: String
195
+ attr_reader start: Integer
196
+ attr_reader end: Integer
197
+ attr_reader tags: Hash[piece_tag, Float]
198
+ def to_h: () -> Hash[String, json]
199
+ def self.new: (text: String, start: Integer, end: Integer, tags: Hash[piece_tag, Float]) -> PieceDetail
200
+ end
201
+ class KindDetail < Data
202
+ include WireValue
203
+ attr_reader text: String
204
+ attr_reader start: Integer
205
+ attr_reader end: Integer
206
+ attr_reader kinds: Hash[String, Float]
207
+ def to_h: () -> Hash[String, json]
208
+ def self.new: (text: String, start: Integer, end: Integer, kinds: Hash[String, Float]) -> KindDetail
209
+ end
210
+ class RecognizeDetail < Data
211
+ include WireValue
212
+ attr_reader pieces: Array[PieceDetail]
213
+ attr_reader names: Array[KindDetail]
214
+ def to_h: () -> Hash[String, json]
215
+ def self.new: (pieces: Array[PieceDetail], names: Array[KindDetail]) -> RecognizeDetail
216
+ end
217
+ class Cancel
218
+ def initialize: () -> void
219
+ def cancel: () -> nil
220
+ def cancelled?: () -> bool
221
+ end
222
+ class Rows[R] < Enumerator[R, void]
223
+ def close: () -> nil
224
+ def closed?: () -> bool
225
+ def cancel: () -> nil
226
+ def initialize: (untyped, String, untyped, Cancel?, Question) -> void
227
+ private
228
+ def produce: (Enumerator::Yielder) -> void
229
+ def pull: () -> untyped
230
+ def release: () -> void
231
+ def drive: () -> untyped
232
+ def blocking_next: (untyped) -> untyped
233
+ def supply_input: () -> untyped
234
+ end
235
+ class AnnotationAnswers < Hash[String, Result]
236
+ def []: (String | Symbol) -> untyped
237
+ def fetch: (String | Symbol) -> untyped
238
+ end
239
+ class Question
240
+ end
241
+ class Toolbox
242
+ attr_reader questions: Hash[String, toolbox_question]
243
+ def self.load_file: (String) -> Toolbox
244
+ def self.from_json: (String) -> Toolbox
245
+ def to_json: (*untyped) -> String
246
+ def initialize: (questions: Hash[String | Symbol, toolbox_question]) -> void
247
+ def decide: (String | Symbol) -> DecideQuestion
248
+ def choose: (String | Symbol) -> ChooseQuestion
249
+ def tag: (String | Symbol) -> TagQuestion
250
+ def score: (String | Symbol) -> ScoreQuestion
251
+ def rank: (String | Symbol) -> RankQuestion
252
+ def find: (String | Symbol) -> FindQuestion
253
+ def recognize: (String | Symbol) -> RecognizeQuestion
254
+ def relate: (String | Symbol) -> RelateQuestion
255
+ def filter: (String | Symbol) -> FilterQuestion
256
+ end
257
+ class AnnotationQuestions < Toolbox
258
+ def initialize: (**annotation_question) -> void
259
+ end
260
+ class RedactedKey
261
+ end
262
+ class Configuration
263
+ attr_accessor backend: backend?
264
+ attr_accessor model: String?
265
+ attr_accessor url: String?
266
+ attr_accessor batch: Integer?
267
+ attr_accessor max_requests: Integer?
268
+ attr_accessor retry: RetryPolicy?
269
+ attr_reader api_key: RedactedKey?
270
+ def api_key=: (String | RedactedKey | nil) -> (String | RedactedKey | nil)
271
+ end
272
+ def self.configure: () { (Configuration) -> void } -> nil
273
+ def self.client: () -> Client
274
+ def self.close: () -> nil
275
+ type decide_result = DecideRow
276
+ class DecideQuestion < Question
277
+ def initialize: (String, ?threshold: threshold?, ?field: field?, ?yes_means: String?, ?no_means: String?) -> void
278
+ end
279
+ type choose_result = ChooseRow
280
+ class ChooseQuestion < Question
281
+ def initialize: (String, choices: Array[String | Symbol], ?threshold: Float?, ?field: field?, ?descriptions: Hash[String | Symbol, String]?) -> void
282
+ end
283
+ type tag_result = TagRow
284
+ class TagQuestion < Question
285
+ def initialize: (String, labels: Array[String | Symbol], ?threshold: Float?, ?field: field?, ?descriptions: Hash[String | Symbol, String]?) -> void
286
+ end
287
+ type score_result = ScoreRow
288
+ class ScoreQuestion < Question
289
+ def initialize: (String, levels: Array[String | Symbol], ?field: field?, ?descriptions: Hash[String | Symbol, String]?) -> void
290
+ end
291
+ class FilterQuestion < Question
292
+ def initialize: (String, ?threshold: threshold?, ?field: field?, ?yes_means: String?, ?no_means: String?) -> void
293
+ end
294
+ type rank_result = RankRow
295
+ class RankQuestion < Question
296
+ def initialize: (String, levels: Array[String | Symbol], ?top: Integer?, ?field: field?, ?descriptions: Hash[String | Symbol, String]?) -> void
297
+ end
298
+ type find_result = FindRow
299
+ class FindQuestion < Question
300
+ def initialize: (String, ?threshold: Float?, ?field: field?) -> void
301
+ end
302
+ type recognize_result = RecognizeRow
303
+ class RecognizeQuestion < Question
304
+ def initialize: (kinds: Array[String | Symbol], ?threshold: Float?, ?field: field?) -> void
305
+ end
306
+ type relate_result = RelateRow
307
+ class RelateQuestion < Question
308
+ def initialize: (rules: Array[RelationRule], ?threshold: Float?, ?field: field?) -> void
309
+ end
310
+ type annotate_result = AnnotateRow
311
+ class AnnotateQuestion < Question
312
+ def initialize: (AnnotationQuestions | Toolbox | Hash[String | Symbol, annotation_question], ?field: field?) -> void
313
+ end
314
+ class TokenUsage < Data
315
+ attr_reader reported: Integer?
316
+ attr_reader unknown_attempts: Integer
317
+ def self.new: (reported: Integer?, unknown_attempts: Integer) -> TokenUsage
318
+ end
319
+ class Usage < Data
320
+ attr_reader attempts: Integer
321
+ attr_reader responses: Integer
322
+ attr_reader status_retries: Integer
323
+ attr_reader connection_retries: Integer
324
+ attr_reader request_body_bytes: Integer
325
+ attr_reader active_attempts: Integer
326
+ attr_reader active_calls: Integer
327
+ attr_reader input_tokens: TokenUsage
328
+ attr_reader output_tokens: TokenUsage
329
+ def self.new: (attempts: Integer, responses: Integer, status_retries: Integer, connection_retries: Integer, request_body_bytes: Integer, active_attempts: Integer, active_calls: Integer, input_tokens: TokenUsage, output_tokens: TokenUsage) -> Usage
330
+ end
331
+ class Client
332
+ def usage: () -> Usage
333
+ def initialize: (?backend: backend?, ?model: String?, ?url: String?, ?api_key: String | RedactedKey | nil, ?batch: Integer?, ?max_requests: Integer?, ?retry: RetryPolicy?) -> void
334
+ def self.open: (**untyped) -> Client
335
+ | [R] (?backend: backend?, ?model: String?, ?url: String?, ?api_key: String | RedactedKey | nil, ?batch: Integer?, ?max_requests: Integer?, ?retry: RetryPolicy?) { (Client) -> R } -> R
336
+ def close: () -> nil
337
+ def closed?: () -> bool
338
+ attr_reader api_key: RedactedKey?
339
+ def decide: (String, untyped, ?threshold: threshold?, ?field: field?, ?yes_means: String?, ?no_means: String?, ?name: String?, ?cancel: Cancel?) -> decide_result
340
+ | (DecideQuestion, untyped, ?name: String?, ?cancel: Cancel?) -> decide_result
341
+ def decide_each: (String, Enumerable[untyped], ?threshold: threshold?, ?field: field?, ?yes_means: String?, ?no_means: String?, ?name: String?, ?cancel: Cancel?) -> Rows[decide_result]
342
+ | (DecideQuestion, Enumerable[untyped], ?name: String?, ?cancel: Cancel?) -> Rows[decide_result]
343
+ | (String, Enumerable[untyped], ?threshold: threshold?, ?field: field?, ?name: String?, ?cancel: Cancel?) { (decide_result) -> void } -> nil
344
+ | (DecideQuestion, Enumerable[untyped], ?name: String?, ?cancel: Cancel?) { (decide_result) -> void } -> nil
345
+ def choose: (String, untyped, choices: Array[String | Symbol], ?threshold: Float?, ?field: field?, ?descriptions: Hash[String | Symbol, String]?, ?name: String?, ?cancel: Cancel?) -> choose_result
346
+ | (ChooseQuestion, untyped, ?name: String?, ?cancel: Cancel?) -> choose_result
347
+ def choose_each: (String, Enumerable[untyped], choices: Array[String | Symbol], ?threshold: Float?, ?field: field?, ?descriptions: Hash[String | Symbol, String]?, ?name: String?, ?cancel: Cancel?) -> Rows[choose_result]
348
+ | (ChooseQuestion, Enumerable[untyped], ?name: String?, ?cancel: Cancel?) -> Rows[choose_result]
349
+ | (String, Enumerable[untyped], choices: Array[String | Symbol], ?threshold: Float?, ?field: field?, ?name: String?, ?cancel: Cancel?) { (choose_result) -> void } -> nil
350
+ | (ChooseQuestion, Enumerable[untyped], ?name: String?, ?cancel: Cancel?) { (choose_result) -> void } -> nil
351
+ def tag: (String, untyped, labels: Array[String | Symbol], ?threshold: Float?, ?field: field?, ?descriptions: Hash[String | Symbol, String]?, ?name: String?, ?cancel: Cancel?) -> tag_result
352
+ | (TagQuestion, untyped, ?name: String?, ?cancel: Cancel?) -> tag_result
353
+ def tag_each: (String, Enumerable[untyped], labels: Array[String | Symbol], ?threshold: Float?, ?field: field?, ?descriptions: Hash[String | Symbol, String]?, ?name: String?, ?cancel: Cancel?) -> Rows[tag_result]
354
+ | (TagQuestion, Enumerable[untyped], ?name: String?, ?cancel: Cancel?) -> Rows[tag_result]
355
+ | (String, Enumerable[untyped], labels: Array[String | Symbol], ?threshold: Float?, ?field: field?, ?name: String?, ?cancel: Cancel?) { (tag_result) -> void } -> nil
356
+ | (TagQuestion, Enumerable[untyped], ?name: String?, ?cancel: Cancel?) { (tag_result) -> void } -> nil
357
+ def score: (String, untyped, levels: Array[String | Symbol], ?field: field?, ?descriptions: Hash[String | Symbol, String]?, ?name: String?, ?cancel: Cancel?) -> score_result
358
+ | (ScoreQuestion, untyped, ?name: String?, ?cancel: Cancel?) -> score_result
359
+ def score_each: (String, Enumerable[untyped], levels: Array[String | Symbol], ?field: field?, ?descriptions: Hash[String | Symbol, String]?, ?name: String?, ?cancel: Cancel?) -> Rows[score_result]
360
+ | (ScoreQuestion, Enumerable[untyped], ?name: String?, ?cancel: Cancel?) -> Rows[score_result]
361
+ | (String, Enumerable[untyped], levels: Array[String | Symbol], ?field: field?, ?name: String?, ?cancel: Cancel?) { (score_result) -> void } -> nil
362
+ | (ScoreQuestion, Enumerable[untyped], ?name: String?, ?cancel: Cancel?) { (score_result) -> void } -> nil
363
+ def filter: (String, Enumerable[untyped], ?threshold: threshold?, ?field: field?, ?yes_means: String?, ?no_means: String?, ?name: String?, ?cancel: Cancel?) -> Enumerator[untyped, void]
364
+ | (FilterQuestion, Enumerable[untyped], ?name: String?, ?cancel: Cancel?) -> Enumerator[untyped, void]
365
+ | (String, Enumerable[untyped], ?threshold: threshold?, ?field: field?, ?yes_means: String?, ?no_means: String?, ?name: String?, ?cancel: Cancel?) { (untyped) -> void } -> nil
366
+ | (FilterQuestion, Enumerable[untyped], ?name: String?, ?cancel: Cancel?) { (untyped) -> void } -> nil
367
+ def rank: (String, Enumerable[untyped], levels: Array[String | Symbol], ?top: Integer?, ?field: field?, ?descriptions: Hash[String | Symbol, String]?, ?name: String?, ?cancel: Cancel?) -> Rows[RankRow]
368
+ | (RankQuestion, Enumerable[untyped], ?name: String?, ?cancel: Cancel?) -> Rows[RankRow]
369
+ | (String, Enumerable[untyped], levels: Array[String | Symbol], ?top: Integer?, ?field: field?, ?descriptions: Hash[String | Symbol, String]?, ?name: String?, ?cancel: Cancel?) { (RankRow) -> void } -> nil
370
+ | (RankQuestion, Enumerable[untyped], ?name: String?, ?cancel: Cancel?) { (RankRow) -> void } -> nil
371
+ def find: (String, untyped, ?threshold: Float?, ?field: field?, ?name: String?, ?cancel: Cancel?) -> find_result
372
+ | (FindQuestion, untyped, ?name: String?, ?cancel: Cancel?) -> find_result
373
+ def find_each: (String, Enumerable[untyped], ?threshold: Float?, ?field: field?, ?name: String?, ?cancel: Cancel?) -> Rows[find_result]
374
+ | (FindQuestion, Enumerable[untyped], ?name: String?, ?cancel: Cancel?) -> Rows[find_result]
375
+ | (String, Enumerable[untyped], ?threshold: Float?, ?field: field?, ?name: String?, ?cancel: Cancel?) { (find_result) -> void } -> nil
376
+ | (FindQuestion, Enumerable[untyped], ?name: String?, ?cancel: Cancel?) { (find_result) -> void } -> nil
377
+ def recognize: (untyped, kinds: Array[String | Symbol], ?threshold: Float?, ?field: field?, ?name: String?, ?cancel: Cancel?) -> recognize_result
378
+ def recognize_each: (Enumerable[untyped], kinds: Array[String | Symbol], ?threshold: Float?, ?field: field?, ?name: String?, ?cancel: Cancel?) -> Rows[recognize_result]
379
+ | (Enumerable[untyped], kinds: Array[String | Symbol], ?threshold: Float?, ?field: field?, ?name: String?, ?cancel: Cancel?) { (recognize_result) -> void } -> nil
380
+ def relate: (untyped, rules: Array[RelationRule], ?threshold: Float?, ?field: field?, ?name: String?, ?cancel: Cancel?) -> relate_result
381
+ def relate_each: (Enumerable[untyped], rules: Array[RelationRule], ?threshold: Float?, ?field: field?, ?name: String?, ?cancel: Cancel?) -> Rows[relate_result]
382
+ | (Enumerable[untyped], rules: Array[RelationRule], ?threshold: Float?, ?field: field?, ?name: String?, ?cancel: Cancel?) { (relate_result) -> void } -> nil
383
+ def annotate: (AnnotationQuestions | Toolbox | Hash[String | Symbol, annotation_question], untyped, ?field: field?, ?name: String?, ?cancel: Cancel?) -> annotate_result
384
+ | (AnnotateQuestion, untyped, ?name: String?, ?cancel: Cancel?) -> annotate_result
385
+ def annotate_each: (AnnotationQuestions | Toolbox | Hash[String | Symbol, annotation_question], Enumerable[untyped], ?field: field?, ?name: String?, ?cancel: Cancel?) -> Rows[annotate_result]
386
+ | (AnnotateQuestion, Enumerable[untyped], ?name: String?, ?cancel: Cancel?) -> Rows[annotate_result]
387
+ | (AnnotationQuestions | Toolbox | Hash[String | Symbol, annotation_question], Enumerable[untyped], ?field: field?, ?name: String?, ?cancel: Cancel?) { (annotate_result) -> void } -> nil
388
+ | (AnnotateQuestion, Enumerable[untyped], ?name: String?, ?cancel: Cancel?) { (annotate_result) -> void } -> nil
389
+ end
390
+ def self.decide: (String, untyped, ?threshold: threshold?, ?field: field?, ?yes_means: String?, ?no_means: String?, ?name: String?, ?cancel: Cancel?) -> decide_result
391
+ | (DecideQuestion, untyped, ?name: String?, ?cancel: Cancel?) -> decide_result
392
+ def self.decide_each: (String, Enumerable[untyped], ?threshold: threshold?, ?field: field?, ?yes_means: String?, ?no_means: String?, ?name: String?, ?cancel: Cancel?) -> Rows[decide_result]
393
+ | (DecideQuestion, Enumerable[untyped], ?name: String?, ?cancel: Cancel?) -> Rows[decide_result]
394
+ | (String, Enumerable[untyped], ?threshold: threshold?, ?field: field?, ?name: String?, ?cancel: Cancel?) { (decide_result) -> void } -> nil
395
+ | (DecideQuestion, Enumerable[untyped], ?name: String?, ?cancel: Cancel?) { (decide_result) -> void } -> nil
396
+ def self.choose: (String, untyped, choices: Array[String | Symbol], ?threshold: Float?, ?field: field?, ?descriptions: Hash[String | Symbol, String]?, ?name: String?, ?cancel: Cancel?) -> choose_result
397
+ | (ChooseQuestion, untyped, ?name: String?, ?cancel: Cancel?) -> choose_result
398
+ def self.choose_each: (String, Enumerable[untyped], choices: Array[String | Symbol], ?threshold: Float?, ?field: field?, ?descriptions: Hash[String | Symbol, String]?, ?name: String?, ?cancel: Cancel?) -> Rows[choose_result]
399
+ | (ChooseQuestion, Enumerable[untyped], ?name: String?, ?cancel: Cancel?) -> Rows[choose_result]
400
+ | (String, Enumerable[untyped], choices: Array[String | Symbol], ?threshold: Float?, ?field: field?, ?name: String?, ?cancel: Cancel?) { (choose_result) -> void } -> nil
401
+ | (ChooseQuestion, Enumerable[untyped], ?name: String?, ?cancel: Cancel?) { (choose_result) -> void } -> nil
402
+ def self.tag: (String, untyped, labels: Array[String | Symbol], ?threshold: Float?, ?field: field?, ?descriptions: Hash[String | Symbol, String]?, ?name: String?, ?cancel: Cancel?) -> tag_result
403
+ | (TagQuestion, untyped, ?name: String?, ?cancel: Cancel?) -> tag_result
404
+ def self.tag_each: (String, Enumerable[untyped], labels: Array[String | Symbol], ?threshold: Float?, ?field: field?, ?descriptions: Hash[String | Symbol, String]?, ?name: String?, ?cancel: Cancel?) -> Rows[tag_result]
405
+ | (TagQuestion, Enumerable[untyped], ?name: String?, ?cancel: Cancel?) -> Rows[tag_result]
406
+ | (String, Enumerable[untyped], labels: Array[String | Symbol], ?threshold: Float?, ?field: field?, ?name: String?, ?cancel: Cancel?) { (tag_result) -> void } -> nil
407
+ | (TagQuestion, Enumerable[untyped], ?name: String?, ?cancel: Cancel?) { (tag_result) -> void } -> nil
408
+ def self.score: (String, untyped, levels: Array[String | Symbol], ?field: field?, ?descriptions: Hash[String | Symbol, String]?, ?name: String?, ?cancel: Cancel?) -> score_result
409
+ | (ScoreQuestion, untyped, ?name: String?, ?cancel: Cancel?) -> score_result
410
+ def self.score_each: (String, Enumerable[untyped], levels: Array[String | Symbol], ?field: field?, ?descriptions: Hash[String | Symbol, String]?, ?name: String?, ?cancel: Cancel?) -> Rows[score_result]
411
+ | (ScoreQuestion, Enumerable[untyped], ?name: String?, ?cancel: Cancel?) -> Rows[score_result]
412
+ | (String, Enumerable[untyped], levels: Array[String | Symbol], ?field: field?, ?name: String?, ?cancel: Cancel?) { (score_result) -> void } -> nil
413
+ | (ScoreQuestion, Enumerable[untyped], ?name: String?, ?cancel: Cancel?) { (score_result) -> void } -> nil
414
+ def self.filter: (String, Enumerable[untyped], ?threshold: threshold?, ?field: field?, ?yes_means: String?, ?no_means: String?, ?name: String?, ?cancel: Cancel?) -> Enumerator[untyped, void]
415
+ | (FilterQuestion, Enumerable[untyped], ?name: String?, ?cancel: Cancel?) -> Enumerator[untyped, void]
416
+ | (String, Enumerable[untyped], ?threshold: threshold?, ?field: field?, ?yes_means: String?, ?no_means: String?, ?name: String?, ?cancel: Cancel?) { (untyped) -> void } -> nil
417
+ | (FilterQuestion, Enumerable[untyped], ?name: String?, ?cancel: Cancel?) { (untyped) -> void } -> nil
418
+ def self.rank: (String, Enumerable[untyped], levels: Array[String | Symbol], ?top: Integer?, ?field: field?, ?descriptions: Hash[String | Symbol, String]?, ?name: String?, ?cancel: Cancel?) -> Rows[RankRow]
419
+ | (RankQuestion, Enumerable[untyped], ?name: String?, ?cancel: Cancel?) -> Rows[RankRow]
420
+ | (String, Enumerable[untyped], levels: Array[String | Symbol], ?top: Integer?, ?field: field?, ?descriptions: Hash[String | Symbol, String]?, ?name: String?, ?cancel: Cancel?) { (RankRow) -> void } -> nil
421
+ | (RankQuestion, Enumerable[untyped], ?name: String?, ?cancel: Cancel?) { (RankRow) -> void } -> nil
422
+ def self.find: (String, untyped, ?threshold: Float?, ?field: field?, ?name: String?, ?cancel: Cancel?) -> find_result
423
+ | (FindQuestion, untyped, ?name: String?, ?cancel: Cancel?) -> find_result
424
+ def self.find_each: (String, Enumerable[untyped], ?threshold: Float?, ?field: field?, ?name: String?, ?cancel: Cancel?) -> Rows[find_result]
425
+ | (FindQuestion, Enumerable[untyped], ?name: String?, ?cancel: Cancel?) -> Rows[find_result]
426
+ | (String, Enumerable[untyped], ?threshold: Float?, ?field: field?, ?name: String?, ?cancel: Cancel?) { (find_result) -> void } -> nil
427
+ | (FindQuestion, Enumerable[untyped], ?name: String?, ?cancel: Cancel?) { (find_result) -> void } -> nil
428
+ def self.recognize: (untyped, kinds: Array[String | Symbol], ?threshold: Float?, ?field: field?, ?name: String?, ?cancel: Cancel?) -> recognize_result
429
+ def self.recognize_each: (Enumerable[untyped], kinds: Array[String | Symbol], ?threshold: Float?, ?field: field?, ?name: String?, ?cancel: Cancel?) -> Rows[recognize_result]
430
+ | (Enumerable[untyped], kinds: Array[String | Symbol], ?threshold: Float?, ?field: field?, ?name: String?, ?cancel: Cancel?) { (recognize_result) -> void } -> nil
431
+ def self.relate: (untyped, rules: Array[RelationRule], ?threshold: Float?, ?field: field?, ?name: String?, ?cancel: Cancel?) -> relate_result
432
+ def self.relate_each: (Enumerable[untyped], rules: Array[RelationRule], ?threshold: Float?, ?field: field?, ?name: String?, ?cancel: Cancel?) -> Rows[relate_result]
433
+ | (Enumerable[untyped], rules: Array[RelationRule], ?threshold: Float?, ?field: field?, ?name: String?, ?cancel: Cancel?) { (relate_result) -> void } -> nil
434
+ def self.annotate: (AnnotationQuestions | Toolbox | Hash[String | Symbol, annotation_question], untyped, ?field: field?, ?name: String?, ?cancel: Cancel?) -> annotate_result
435
+ | (AnnotateQuestion, untyped, ?name: String?, ?cancel: Cancel?) -> annotate_result
436
+ def self.annotate_each: (AnnotationQuestions | Toolbox | Hash[String | Symbol, annotation_question], Enumerable[untyped], ?field: field?, ?name: String?, ?cancel: Cancel?) -> Rows[annotate_result]
437
+ | (AnnotateQuestion, Enumerable[untyped], ?name: String?, ?cancel: Cancel?) -> Rows[annotate_result]
438
+ | (AnnotationQuestions | Toolbox | Hash[String | Symbol, annotation_question], Enumerable[untyped], ?field: field?, ?name: String?, ?cancel: Cancel?) { (annotate_result) -> void } -> nil
439
+ | (AnnotateQuestion, Enumerable[untyped], ?name: String?, ?cancel: Cancel?) { (annotate_result) -> void } -> nil
440
+ end