memgentic-native 0.4.0__tar.gz
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.
- memgentic_native-0.4.0/.gitignore +1 -0
- memgentic_native-0.4.0/Cargo.lock +373 -0
- memgentic_native-0.4.0/Cargo.toml +18 -0
- memgentic_native-0.4.0/PKG-INFO +6 -0
- memgentic_native-0.4.0/pyproject.toml +13 -0
- memgentic_native-0.4.0/src/graph/knowledge.rs +433 -0
- memgentic_native-0.4.0/src/graph/mod.rs +8 -0
- memgentic_native-0.4.0/src/lib.rs +44 -0
- memgentic_native-0.4.0/src/parsers/chatgpt.rs +192 -0
- memgentic_native-0.4.0/src/parsers/jsonl.rs +162 -0
- memgentic_native-0.4.0/src/parsers/markdown.rs +86 -0
- memgentic_native-0.4.0/src/parsers/mod.rs +17 -0
- memgentic_native-0.4.0/src/parsers/protobuf.rs +212 -0
- memgentic_native-0.4.0/src/textproc/classify.rs +311 -0
- memgentic_native-0.4.0/src/textproc/entities.rs +89 -0
- memgentic_native-0.4.0/src/textproc/mod.rs +57 -0
- memgentic_native-0.4.0/src/textproc/noise.rs +106 -0
- memgentic_native-0.4.0/src/textproc/overlap.rs +69 -0
- memgentic_native-0.4.0/src/textproc/scrubber.rs +250 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/target/
|
|
@@ -0,0 +1,373 @@
|
|
|
1
|
+
# This file is automatically @generated by Cargo.
|
|
2
|
+
# It is not intended for manual editing.
|
|
3
|
+
version = 4
|
|
4
|
+
|
|
5
|
+
[[package]]
|
|
6
|
+
name = "aho-corasick"
|
|
7
|
+
version = "1.1.4"
|
|
8
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
9
|
+
checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301"
|
|
10
|
+
dependencies = [
|
|
11
|
+
"memchr",
|
|
12
|
+
]
|
|
13
|
+
|
|
14
|
+
[[package]]
|
|
15
|
+
name = "autocfg"
|
|
16
|
+
version = "1.5.0"
|
|
17
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
18
|
+
checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8"
|
|
19
|
+
|
|
20
|
+
[[package]]
|
|
21
|
+
name = "cfg-if"
|
|
22
|
+
version = "1.0.4"
|
|
23
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
24
|
+
checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
|
|
25
|
+
|
|
26
|
+
[[package]]
|
|
27
|
+
name = "crossbeam-deque"
|
|
28
|
+
version = "0.8.6"
|
|
29
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
30
|
+
checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51"
|
|
31
|
+
dependencies = [
|
|
32
|
+
"crossbeam-epoch",
|
|
33
|
+
"crossbeam-utils",
|
|
34
|
+
]
|
|
35
|
+
|
|
36
|
+
[[package]]
|
|
37
|
+
name = "crossbeam-epoch"
|
|
38
|
+
version = "0.9.18"
|
|
39
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
40
|
+
checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e"
|
|
41
|
+
dependencies = [
|
|
42
|
+
"crossbeam-utils",
|
|
43
|
+
]
|
|
44
|
+
|
|
45
|
+
[[package]]
|
|
46
|
+
name = "crossbeam-utils"
|
|
47
|
+
version = "0.8.21"
|
|
48
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
49
|
+
checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28"
|
|
50
|
+
|
|
51
|
+
[[package]]
|
|
52
|
+
name = "either"
|
|
53
|
+
version = "1.15.0"
|
|
54
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
55
|
+
checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719"
|
|
56
|
+
|
|
57
|
+
[[package]]
|
|
58
|
+
name = "equivalent"
|
|
59
|
+
version = "1.0.2"
|
|
60
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
61
|
+
checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f"
|
|
62
|
+
|
|
63
|
+
[[package]]
|
|
64
|
+
name = "fixedbitset"
|
|
65
|
+
version = "0.4.2"
|
|
66
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
67
|
+
checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80"
|
|
68
|
+
|
|
69
|
+
[[package]]
|
|
70
|
+
name = "hashbrown"
|
|
71
|
+
version = "0.17.0"
|
|
72
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
73
|
+
checksum = "4f467dd6dccf739c208452f8014c75c18bb8301b050ad1cfb27153803edb0f51"
|
|
74
|
+
|
|
75
|
+
[[package]]
|
|
76
|
+
name = "heck"
|
|
77
|
+
version = "0.5.0"
|
|
78
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
79
|
+
checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
|
|
80
|
+
|
|
81
|
+
[[package]]
|
|
82
|
+
name = "indexmap"
|
|
83
|
+
version = "2.14.0"
|
|
84
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
85
|
+
checksum = "d466e9454f08e4a911e14806c24e16fba1b4c121d1ea474396f396069cf949d9"
|
|
86
|
+
dependencies = [
|
|
87
|
+
"equivalent",
|
|
88
|
+
"hashbrown",
|
|
89
|
+
]
|
|
90
|
+
|
|
91
|
+
[[package]]
|
|
92
|
+
name = "indoc"
|
|
93
|
+
version = "2.0.7"
|
|
94
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
95
|
+
checksum = "79cf5c93f93228cf8efb3ba362535fb11199ac548a09ce117c9b1adc3030d706"
|
|
96
|
+
dependencies = [
|
|
97
|
+
"rustversion",
|
|
98
|
+
]
|
|
99
|
+
|
|
100
|
+
[[package]]
|
|
101
|
+
name = "itoa"
|
|
102
|
+
version = "1.0.18"
|
|
103
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
104
|
+
checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682"
|
|
105
|
+
|
|
106
|
+
[[package]]
|
|
107
|
+
name = "libc"
|
|
108
|
+
version = "0.2.184"
|
|
109
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
110
|
+
checksum = "48f5d2a454e16a5ea0f4ced81bd44e4cfc7bd3a507b61887c99fd3538b28e4af"
|
|
111
|
+
|
|
112
|
+
[[package]]
|
|
113
|
+
name = "memchr"
|
|
114
|
+
version = "2.8.0"
|
|
115
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
116
|
+
checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79"
|
|
117
|
+
|
|
118
|
+
[[package]]
|
|
119
|
+
name = "memgentic-native"
|
|
120
|
+
version = "0.4.0"
|
|
121
|
+
dependencies = [
|
|
122
|
+
"petgraph",
|
|
123
|
+
"pyo3",
|
|
124
|
+
"rayon",
|
|
125
|
+
"regex",
|
|
126
|
+
"serde",
|
|
127
|
+
"serde_json",
|
|
128
|
+
]
|
|
129
|
+
|
|
130
|
+
[[package]]
|
|
131
|
+
name = "memoffset"
|
|
132
|
+
version = "0.9.1"
|
|
133
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
134
|
+
checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a"
|
|
135
|
+
dependencies = [
|
|
136
|
+
"autocfg",
|
|
137
|
+
]
|
|
138
|
+
|
|
139
|
+
[[package]]
|
|
140
|
+
name = "once_cell"
|
|
141
|
+
version = "1.21.4"
|
|
142
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
143
|
+
checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
|
|
144
|
+
|
|
145
|
+
[[package]]
|
|
146
|
+
name = "petgraph"
|
|
147
|
+
version = "0.6.5"
|
|
148
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
149
|
+
checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db"
|
|
150
|
+
dependencies = [
|
|
151
|
+
"fixedbitset",
|
|
152
|
+
"indexmap",
|
|
153
|
+
]
|
|
154
|
+
|
|
155
|
+
[[package]]
|
|
156
|
+
name = "portable-atomic"
|
|
157
|
+
version = "1.13.1"
|
|
158
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
159
|
+
checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49"
|
|
160
|
+
|
|
161
|
+
[[package]]
|
|
162
|
+
name = "proc-macro2"
|
|
163
|
+
version = "1.0.106"
|
|
164
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
165
|
+
checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934"
|
|
166
|
+
dependencies = [
|
|
167
|
+
"unicode-ident",
|
|
168
|
+
]
|
|
169
|
+
|
|
170
|
+
[[package]]
|
|
171
|
+
name = "pyo3"
|
|
172
|
+
version = "0.22.6"
|
|
173
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
174
|
+
checksum = "f402062616ab18202ae8319da13fa4279883a2b8a9d9f83f20dbade813ce1884"
|
|
175
|
+
dependencies = [
|
|
176
|
+
"cfg-if",
|
|
177
|
+
"indoc",
|
|
178
|
+
"libc",
|
|
179
|
+
"memoffset",
|
|
180
|
+
"once_cell",
|
|
181
|
+
"portable-atomic",
|
|
182
|
+
"pyo3-build-config",
|
|
183
|
+
"pyo3-ffi",
|
|
184
|
+
"pyo3-macros",
|
|
185
|
+
"unindent",
|
|
186
|
+
]
|
|
187
|
+
|
|
188
|
+
[[package]]
|
|
189
|
+
name = "pyo3-build-config"
|
|
190
|
+
version = "0.22.6"
|
|
191
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
192
|
+
checksum = "b14b5775b5ff446dd1056212d778012cbe8a0fbffd368029fd9e25b514479c38"
|
|
193
|
+
dependencies = [
|
|
194
|
+
"once_cell",
|
|
195
|
+
"target-lexicon",
|
|
196
|
+
]
|
|
197
|
+
|
|
198
|
+
[[package]]
|
|
199
|
+
name = "pyo3-ffi"
|
|
200
|
+
version = "0.22.6"
|
|
201
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
202
|
+
checksum = "9ab5bcf04a2cdcbb50c7d6105de943f543f9ed92af55818fd17b660390fc8636"
|
|
203
|
+
dependencies = [
|
|
204
|
+
"libc",
|
|
205
|
+
"pyo3-build-config",
|
|
206
|
+
]
|
|
207
|
+
|
|
208
|
+
[[package]]
|
|
209
|
+
name = "pyo3-macros"
|
|
210
|
+
version = "0.22.6"
|
|
211
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
212
|
+
checksum = "0fd24d897903a9e6d80b968368a34e1525aeb719d568dba8b3d4bfa5dc67d453"
|
|
213
|
+
dependencies = [
|
|
214
|
+
"proc-macro2",
|
|
215
|
+
"pyo3-macros-backend",
|
|
216
|
+
"quote",
|
|
217
|
+
"syn",
|
|
218
|
+
]
|
|
219
|
+
|
|
220
|
+
[[package]]
|
|
221
|
+
name = "pyo3-macros-backend"
|
|
222
|
+
version = "0.22.6"
|
|
223
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
224
|
+
checksum = "36c011a03ba1e50152b4b394b479826cad97e7a21eb52df179cd91ac411cbfbe"
|
|
225
|
+
dependencies = [
|
|
226
|
+
"heck",
|
|
227
|
+
"proc-macro2",
|
|
228
|
+
"pyo3-build-config",
|
|
229
|
+
"quote",
|
|
230
|
+
"syn",
|
|
231
|
+
]
|
|
232
|
+
|
|
233
|
+
[[package]]
|
|
234
|
+
name = "quote"
|
|
235
|
+
version = "1.0.45"
|
|
236
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
237
|
+
checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924"
|
|
238
|
+
dependencies = [
|
|
239
|
+
"proc-macro2",
|
|
240
|
+
]
|
|
241
|
+
|
|
242
|
+
[[package]]
|
|
243
|
+
name = "rayon"
|
|
244
|
+
version = "1.11.0"
|
|
245
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
246
|
+
checksum = "368f01d005bf8fd9b1206fb6fa653e6c4a81ceb1466406b81792d87c5677a58f"
|
|
247
|
+
dependencies = [
|
|
248
|
+
"either",
|
|
249
|
+
"rayon-core",
|
|
250
|
+
]
|
|
251
|
+
|
|
252
|
+
[[package]]
|
|
253
|
+
name = "rayon-core"
|
|
254
|
+
version = "1.13.0"
|
|
255
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
256
|
+
checksum = "22e18b0f0062d30d4230b2e85ff77fdfe4326feb054b9783a3460d8435c8ab91"
|
|
257
|
+
dependencies = [
|
|
258
|
+
"crossbeam-deque",
|
|
259
|
+
"crossbeam-utils",
|
|
260
|
+
]
|
|
261
|
+
|
|
262
|
+
[[package]]
|
|
263
|
+
name = "regex"
|
|
264
|
+
version = "1.12.3"
|
|
265
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
266
|
+
checksum = "e10754a14b9137dd7b1e3e5b0493cc9171fdd105e0ab477f51b72e7f3ac0e276"
|
|
267
|
+
dependencies = [
|
|
268
|
+
"aho-corasick",
|
|
269
|
+
"memchr",
|
|
270
|
+
"regex-automata",
|
|
271
|
+
"regex-syntax",
|
|
272
|
+
]
|
|
273
|
+
|
|
274
|
+
[[package]]
|
|
275
|
+
name = "regex-automata"
|
|
276
|
+
version = "0.4.14"
|
|
277
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
278
|
+
checksum = "6e1dd4122fc1595e8162618945476892eefca7b88c52820e74af6262213cae8f"
|
|
279
|
+
dependencies = [
|
|
280
|
+
"aho-corasick",
|
|
281
|
+
"memchr",
|
|
282
|
+
"regex-syntax",
|
|
283
|
+
]
|
|
284
|
+
|
|
285
|
+
[[package]]
|
|
286
|
+
name = "regex-syntax"
|
|
287
|
+
version = "0.8.10"
|
|
288
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
289
|
+
checksum = "dc897dd8d9e8bd1ed8cdad82b5966c3e0ecae09fb1907d58efaa013543185d0a"
|
|
290
|
+
|
|
291
|
+
[[package]]
|
|
292
|
+
name = "rustversion"
|
|
293
|
+
version = "1.0.22"
|
|
294
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
295
|
+
checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d"
|
|
296
|
+
|
|
297
|
+
[[package]]
|
|
298
|
+
name = "serde"
|
|
299
|
+
version = "1.0.228"
|
|
300
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
301
|
+
checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e"
|
|
302
|
+
dependencies = [
|
|
303
|
+
"serde_core",
|
|
304
|
+
"serde_derive",
|
|
305
|
+
]
|
|
306
|
+
|
|
307
|
+
[[package]]
|
|
308
|
+
name = "serde_core"
|
|
309
|
+
version = "1.0.228"
|
|
310
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
311
|
+
checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad"
|
|
312
|
+
dependencies = [
|
|
313
|
+
"serde_derive",
|
|
314
|
+
]
|
|
315
|
+
|
|
316
|
+
[[package]]
|
|
317
|
+
name = "serde_derive"
|
|
318
|
+
version = "1.0.228"
|
|
319
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
320
|
+
checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79"
|
|
321
|
+
dependencies = [
|
|
322
|
+
"proc-macro2",
|
|
323
|
+
"quote",
|
|
324
|
+
"syn",
|
|
325
|
+
]
|
|
326
|
+
|
|
327
|
+
[[package]]
|
|
328
|
+
name = "serde_json"
|
|
329
|
+
version = "1.0.149"
|
|
330
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
331
|
+
checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86"
|
|
332
|
+
dependencies = [
|
|
333
|
+
"itoa",
|
|
334
|
+
"memchr",
|
|
335
|
+
"serde",
|
|
336
|
+
"serde_core",
|
|
337
|
+
"zmij",
|
|
338
|
+
]
|
|
339
|
+
|
|
340
|
+
[[package]]
|
|
341
|
+
name = "syn"
|
|
342
|
+
version = "2.0.117"
|
|
343
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
344
|
+
checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99"
|
|
345
|
+
dependencies = [
|
|
346
|
+
"proc-macro2",
|
|
347
|
+
"quote",
|
|
348
|
+
"unicode-ident",
|
|
349
|
+
]
|
|
350
|
+
|
|
351
|
+
[[package]]
|
|
352
|
+
name = "target-lexicon"
|
|
353
|
+
version = "0.12.16"
|
|
354
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
355
|
+
checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1"
|
|
356
|
+
|
|
357
|
+
[[package]]
|
|
358
|
+
name = "unicode-ident"
|
|
359
|
+
version = "1.0.24"
|
|
360
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
361
|
+
checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
|
|
362
|
+
|
|
363
|
+
[[package]]
|
|
364
|
+
name = "unindent"
|
|
365
|
+
version = "0.2.4"
|
|
366
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
367
|
+
checksum = "7264e107f553ccae879d21fbea1d6724ac785e8c3bfc762137959b5802826ef3"
|
|
368
|
+
|
|
369
|
+
[[package]]
|
|
370
|
+
name = "zmij"
|
|
371
|
+
version = "1.0.21"
|
|
372
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
373
|
+
checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa"
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
[package]
|
|
2
|
+
name = "memgentic-native"
|
|
3
|
+
version = "0.4.0"
|
|
4
|
+
edition = "2021"
|
|
5
|
+
license = "Apache-2.0"
|
|
6
|
+
description = "Native Rust acceleration for Memgentic — text processing, parsers, and knowledge graph"
|
|
7
|
+
|
|
8
|
+
[lib]
|
|
9
|
+
name = "memgentic_native"
|
|
10
|
+
crate-type = ["cdylib"]
|
|
11
|
+
|
|
12
|
+
[dependencies]
|
|
13
|
+
pyo3 = { version = "0.22", features = ["extension-module"] }
|
|
14
|
+
regex = "1"
|
|
15
|
+
rayon = "1"
|
|
16
|
+
serde = { version = "1", features = ["derive"] }
|
|
17
|
+
serde_json = "1"
|
|
18
|
+
petgraph = "0.6"
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["maturin>=1.0,<2.0"]
|
|
3
|
+
build-backend = "maturin"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "memgentic-native"
|
|
7
|
+
version = "0.4.0"
|
|
8
|
+
description = "Native Rust acceleration for Memgentic"
|
|
9
|
+
requires-python = ">=3.11"
|
|
10
|
+
license = "Apache-2.0"
|
|
11
|
+
|
|
12
|
+
[tool.maturin]
|
|
13
|
+
features = ["pyo3/extension-module"]
|