glitchlings 0.2.1__cp312-cp312-win_amd64.whl → 0.2.3__cp312-cp312-win_amd64.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.
- glitchlings/_zoo_rust.cp312-win_amd64.pyd +0 -0
- glitchlings/dlc/prime.py +44 -22
- glitchlings/main.py +17 -39
- glitchlings/util/__init__.py +30 -0
- glitchlings/zoo/__init__.py +96 -19
- glitchlings/zoo/_ocr_confusions.py +34 -0
- glitchlings/zoo/_rate.py +21 -0
- glitchlings/zoo/core.py +56 -52
- glitchlings/zoo/jargoyle.py +77 -16
- glitchlings/zoo/mim1c.py +24 -5
- glitchlings/zoo/ocr_confusions.tsv +30 -0
- glitchlings/zoo/redactyl.py +46 -9
- glitchlings/zoo/reduple.py +36 -8
- glitchlings/zoo/rushmore.py +40 -8
- glitchlings/zoo/scannequin.py +42 -37
- glitchlings/zoo/typogre.py +36 -8
- {glitchlings-0.2.1.dist-info → glitchlings-0.2.3.dist-info}/METADATA +28 -61
- glitchlings-0.2.3.dist-info/RECORD +26 -0
- glitchlings/_typogre_rust.cp312-win_amd64.pyd +0 -0
- glitchlings-0.2.1.dist-info/RECORD +0 -24
- {glitchlings-0.2.1.dist-info → glitchlings-0.2.3.dist-info}/WHEEL +0 -0
- {glitchlings-0.2.1.dist-info → glitchlings-0.2.3.dist-info}/entry_points.txt +0 -0
- {glitchlings-0.2.1.dist-info → glitchlings-0.2.3.dist-info}/licenses/LICENSE +0 -0
- {glitchlings-0.2.1.dist-info → glitchlings-0.2.3.dist-info}/top_level.txt +0 -0
glitchlings/zoo/scannequin.py
CHANGED
@@ -1,7 +1,10 @@
|
|
1
1
|
import re
|
2
2
|
import random
|
3
|
+
from typing import Any
|
3
4
|
|
5
|
+
from ._ocr_confusions import load_confusion_table
|
4
6
|
from .core import Glitchling, AttackWave, AttackOrder
|
7
|
+
from ._rate import resolve_rate
|
5
8
|
|
6
9
|
try:
|
7
10
|
from glitchlings._zoo_rust import ocr_artifacts as _ocr_artifacts_rust
|
@@ -12,14 +15,14 @@ except ImportError: # pragma: no cover - compiled extension not present
|
|
12
15
|
def _python_ocr_artifacts(
|
13
16
|
text: str,
|
14
17
|
*,
|
15
|
-
|
18
|
+
rate: float,
|
16
19
|
rng: random.Random,
|
17
20
|
) -> str:
|
18
21
|
"""Introduce OCR-like artifacts into text.
|
19
22
|
|
20
23
|
Parameters
|
21
24
|
- text: Input text to corrupt.
|
22
|
-
-
|
25
|
+
- rate: Max proportion of eligible confusion matches to replace (default 0.02).
|
23
26
|
- seed: Optional seed if `rng` not provided.
|
24
27
|
- rng: Optional RNG; overrides seed.
|
25
28
|
|
@@ -33,35 +36,9 @@ def _python_ocr_artifacts(
|
|
33
36
|
if not text:
|
34
37
|
return text
|
35
38
|
|
36
|
-
#
|
37
|
-
#
|
38
|
-
confusion_table
|
39
|
-
("li", ["h"]),
|
40
|
-
("h", ["li"]),
|
41
|
-
("rn", ["m"]),
|
42
|
-
("m", ["rn"]),
|
43
|
-
("cl", ["d"]),
|
44
|
-
("d", ["cl"]),
|
45
|
-
("I", ["l"]),
|
46
|
-
("l", ["I", "1"]),
|
47
|
-
("1", ["l", "I"]),
|
48
|
-
("0", ["O"]),
|
49
|
-
("O", ["0"]),
|
50
|
-
("B", ["8"]),
|
51
|
-
("8", ["B"]),
|
52
|
-
("S", ["5"]),
|
53
|
-
("5", ["S"]),
|
54
|
-
("Z", ["2"]),
|
55
|
-
("2", ["Z"]),
|
56
|
-
("G", ["6"]),
|
57
|
-
("6", ["G"]),
|
58
|
-
("“", ['"']),
|
59
|
-
("”", ['"']),
|
60
|
-
("‘", ["'"]),
|
61
|
-
("’", ["'"]),
|
62
|
-
("—", ["-"]), # em dash -> hyphen
|
63
|
-
("–", ["-"]), # en dash -> hyphen
|
64
|
-
]
|
39
|
+
# Keep the confusion definitions in a shared data file so both the Python
|
40
|
+
# and Rust implementations stay in sync.
|
41
|
+
confusion_table = load_confusion_table()
|
65
42
|
|
66
43
|
# Build candidate matches as (start, end, choices)
|
67
44
|
candidates: list[tuple[int, int, list[str]]] = []
|
@@ -78,7 +55,7 @@ def _python_ocr_artifacts(
|
|
78
55
|
return text
|
79
56
|
|
80
57
|
# Decide how many to replace
|
81
|
-
k = int(len(candidates) *
|
58
|
+
k = int(len(candidates) * rate)
|
82
59
|
if k <= 0:
|
83
60
|
return text
|
84
61
|
|
@@ -120,9 +97,11 @@ def _python_ocr_artifacts(
|
|
120
97
|
|
121
98
|
def ocr_artifacts(
|
122
99
|
text: str,
|
123
|
-
|
100
|
+
rate: float | None = None,
|
124
101
|
seed: int | None = None,
|
125
102
|
rng: random.Random | None = None,
|
103
|
+
*,
|
104
|
+
error_rate: float | None = None,
|
126
105
|
) -> str:
|
127
106
|
"""Introduce OCR-like artifacts into text.
|
128
107
|
|
@@ -132,13 +111,22 @@ def ocr_artifacts(
|
|
132
111
|
if not text:
|
133
112
|
return text
|
134
113
|
|
114
|
+
effective_rate = resolve_rate(
|
115
|
+
rate=rate,
|
116
|
+
legacy_value=error_rate,
|
117
|
+
default=0.02,
|
118
|
+
legacy_name="error_rate",
|
119
|
+
)
|
120
|
+
|
135
121
|
if rng is None:
|
136
122
|
rng = random.Random(seed)
|
137
123
|
|
124
|
+
clamped_rate = max(0.0, effective_rate)
|
125
|
+
|
138
126
|
if _ocr_artifacts_rust is not None:
|
139
|
-
return _ocr_artifacts_rust(text,
|
127
|
+
return _ocr_artifacts_rust(text, clamped_rate, rng)
|
140
128
|
|
141
|
-
return _python_ocr_artifacts(text,
|
129
|
+
return _python_ocr_artifacts(text, rate=clamped_rate, rng=rng)
|
142
130
|
|
143
131
|
|
144
132
|
class Scannequin(Glitchling):
|
@@ -147,18 +135,35 @@ class Scannequin(Glitchling):
|
|
147
135
|
def __init__(
|
148
136
|
self,
|
149
137
|
*,
|
150
|
-
|
138
|
+
rate: float | None = None,
|
139
|
+
error_rate: float | None = None,
|
151
140
|
seed: int | None = None,
|
152
141
|
) -> None:
|
142
|
+
self._param_aliases = {"error_rate": "rate"}
|
143
|
+
effective_rate = resolve_rate(
|
144
|
+
rate=rate,
|
145
|
+
legacy_value=error_rate,
|
146
|
+
default=0.02,
|
147
|
+
legacy_name="error_rate",
|
148
|
+
)
|
153
149
|
super().__init__(
|
154
150
|
name="Scannequin",
|
155
151
|
corruption_function=ocr_artifacts,
|
156
152
|
scope=AttackWave.CHARACTER,
|
157
153
|
order=AttackOrder.LATE,
|
158
154
|
seed=seed,
|
159
|
-
|
155
|
+
rate=effective_rate,
|
160
156
|
)
|
161
157
|
|
158
|
+
def pipeline_operation(self) -> dict[str, Any] | None:
|
159
|
+
rate = self.kwargs.get("rate")
|
160
|
+
if rate is None:
|
161
|
+
rate = self.kwargs.get("error_rate")
|
162
|
+
if rate is None:
|
163
|
+
return None
|
164
|
+
return {"type": "ocr", "error_rate": float(rate)}
|
165
|
+
|
166
|
+
|
162
167
|
|
163
168
|
scannequin = Scannequin()
|
164
169
|
|
glitchlings/zoo/typogre.py
CHANGED
@@ -1,13 +1,15 @@
|
|
1
1
|
from __future__ import annotations
|
2
2
|
|
3
|
+
import math
|
3
4
|
import random
|
4
5
|
from typing import Optional
|
5
6
|
|
6
7
|
from .core import Glitchling, AttackWave, AttackOrder
|
8
|
+
from ._rate import resolve_rate
|
7
9
|
from ..util import KEYNEIGHBORS
|
8
10
|
|
9
11
|
try:
|
10
|
-
from glitchlings.
|
12
|
+
from glitchlings._zoo_rust import fatfinger as _fatfinger_rust
|
11
13
|
except ImportError: # pragma: no cover - compiled extension not present
|
12
14
|
_fatfinger_rust = None
|
13
15
|
|
@@ -87,12 +89,17 @@ def _python_draw_eligible_index(
|
|
87
89
|
def _fatfinger_python(
|
88
90
|
text: str,
|
89
91
|
*,
|
90
|
-
|
92
|
+
rate: float,
|
91
93
|
layout: dict[str, list[str]],
|
92
94
|
rng: random.Random,
|
93
95
|
) -> str:
|
96
|
+
if rate <= 0.0:
|
97
|
+
return text
|
98
|
+
|
94
99
|
s = text
|
95
|
-
max_changes =
|
100
|
+
max_changes = math.ceil(len(s) * rate)
|
101
|
+
if max_changes == 0:
|
102
|
+
return s
|
96
103
|
|
97
104
|
positional_actions = ("char_swap", "missing_char", "extra_char", "nearby_char")
|
98
105
|
global_actions = ("skipped_space", "random_space", "unichar", "repeated_char")
|
@@ -136,24 +143,37 @@ def _fatfinger_python(
|
|
136
143
|
|
137
144
|
def fatfinger(
|
138
145
|
text: str,
|
139
|
-
|
146
|
+
rate: float | None = None,
|
140
147
|
keyboard: str = "CURATOR_QWERTY",
|
141
148
|
seed: int | None = None,
|
142
149
|
rng: random.Random | None = None,
|
150
|
+
*,
|
151
|
+
max_change_rate: float | None = None,
|
143
152
|
) -> str:
|
144
153
|
"""Introduce character-level "fat finger" edits with a Rust fast path."""
|
145
154
|
|
155
|
+
effective_rate = resolve_rate(
|
156
|
+
rate=rate,
|
157
|
+
legacy_value=max_change_rate,
|
158
|
+
default=0.02,
|
159
|
+
legacy_name="max_change_rate",
|
160
|
+
)
|
161
|
+
|
146
162
|
if rng is None:
|
147
163
|
rng = random.Random(seed)
|
148
164
|
if not text:
|
149
165
|
return ""
|
150
166
|
|
167
|
+
clamped_rate = max(0.0, effective_rate)
|
168
|
+
if clamped_rate == 0.0:
|
169
|
+
return text
|
170
|
+
|
151
171
|
layout = getattr(KEYNEIGHBORS, keyboard)
|
152
172
|
|
153
173
|
if _fatfinger_rust is not None:
|
154
|
-
return _fatfinger_rust(text, max_change_rate=
|
174
|
+
return _fatfinger_rust(text, max_change_rate=clamped_rate, layout=layout, rng=rng)
|
155
175
|
|
156
|
-
return _fatfinger_python(text,
|
176
|
+
return _fatfinger_python(text, rate=clamped_rate, layout=layout, rng=rng)
|
157
177
|
|
158
178
|
|
159
179
|
class Typogre(Glitchling):
|
@@ -162,17 +182,25 @@ class Typogre(Glitchling):
|
|
162
182
|
def __init__(
|
163
183
|
self,
|
164
184
|
*,
|
165
|
-
|
185
|
+
rate: float | None = None,
|
186
|
+
max_change_rate: float | None = None,
|
166
187
|
keyboard: str = "CURATOR_QWERTY",
|
167
188
|
seed: int | None = None,
|
168
189
|
) -> None:
|
190
|
+
self._param_aliases = {"max_change_rate": "rate"}
|
191
|
+
effective_rate = resolve_rate(
|
192
|
+
rate=rate,
|
193
|
+
legacy_value=max_change_rate,
|
194
|
+
default=0.02,
|
195
|
+
legacy_name="max_change_rate",
|
196
|
+
)
|
169
197
|
super().__init__(
|
170
198
|
name="Typogre",
|
171
199
|
corruption_function=fatfinger,
|
172
200
|
scope=AttackWave.CHARACTER,
|
173
201
|
order=AttackOrder.EARLY,
|
174
202
|
seed=seed,
|
175
|
-
|
203
|
+
rate=effective_rate,
|
176
204
|
keyboard=keyboard,
|
177
205
|
)
|
178
206
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: glitchlings
|
3
|
-
Version: 0.2.
|
3
|
+
Version: 0.2.3
|
4
4
|
Summary: Monsters for your language games.
|
5
5
|
Author: osoleve
|
6
6
|
License: Apache License
|
@@ -215,6 +215,8 @@ Classifier: Intended Audience :: Developers
|
|
215
215
|
Classifier: License :: OSI Approved :: Apache Software License
|
216
216
|
Classifier: Programming Language :: Python
|
217
217
|
Classifier: Programming Language :: Python :: 3
|
218
|
+
Classifier: Programming Language :: Python :: 3.10
|
219
|
+
Classifier: Programming Language :: Python :: 3.11
|
218
220
|
Classifier: Programming Language :: Python :: 3.12
|
219
221
|
Classifier: Programming Language :: Rust
|
220
222
|
Classifier: Operating System :: MacOS :: MacOS X
|
@@ -223,7 +225,7 @@ Classifier: Operating System :: POSIX :: Linux
|
|
223
225
|
Classifier: Operating System :: OS Independent
|
224
226
|
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
225
227
|
Classifier: Topic :: Software Development :: Testing
|
226
|
-
Requires-Python: >=3.
|
228
|
+
Requires-Python: >=3.10
|
227
229
|
Description-Content-Type: text/markdown
|
228
230
|
License-File: LICENSE
|
229
231
|
Requires-Dist: confusable-homoglyphs>=3.3.1
|
@@ -232,11 +234,14 @@ Provides-Extra: hf
|
|
232
234
|
Requires-Dist: datasets>=4.0.0; extra == "hf"
|
233
235
|
Provides-Extra: wordnet
|
234
236
|
Requires-Dist: nltk>=3.9.1; extra == "wordnet"
|
237
|
+
Requires-Dist: numpy<=2.0,>=1.24; extra == "wordnet"
|
235
238
|
Provides-Extra: prime
|
236
239
|
Requires-Dist: verifiers>=0.1.3.post0; extra == "prime"
|
237
240
|
Provides-Extra: dev
|
238
241
|
Requires-Dist: pytest>=8.0.0; extra == "dev"
|
239
242
|
Requires-Dist: hypothesis>=6.140.0; extra == "dev"
|
243
|
+
Requires-Dist: nltk>=3.9.1; extra == "dev"
|
244
|
+
Requires-Dist: numpy<=2.0,>=1.24; extra == "dev"
|
240
245
|
Dynamic: license-file
|
241
246
|
|
242
247
|
#
|
@@ -277,14 +282,16 @@ After all, what good is general intelligence if it can't handle a little chaos?
|
|
277
282
|
pip install -U glitchlings
|
278
283
|
```
|
279
284
|
|
285
|
+
> Glitchlings requires Python 3.10 or newer.
|
286
|
+
|
280
287
|
```python
|
281
288
|
from glitchlings import Gaggle, SAMPLE_TEXT, Typogre, Mim1c, Reduple, Rushmore
|
282
289
|
|
283
290
|
gaggle = Gaggle([
|
284
|
-
Typogre(
|
285
|
-
Mim1c(
|
291
|
+
Typogre(rate=0.03),
|
292
|
+
Mim1c(rate=0.02),
|
286
293
|
Reduple(seed=404),
|
287
|
-
Rushmore(
|
294
|
+
Rushmore(rate=0.02),
|
288
295
|
])
|
289
296
|
|
290
297
|
print(gaggle(SAMPLE_TEXT))
|
@@ -292,52 +299,9 @@ print(gaggle(SAMPLE_TEXT))
|
|
292
299
|
|
293
300
|
> Onҽ mھrning, wһen Gregor Samƽa woke from trouble𝐝 𝑑reams, he found himself transformed in his bed into a horrible vermin٠ He l lay on his armour-like back, and if he lifted his head a little he could see his brown belly, slightlh domed and divided by arches ino stiff sections. The bedding was adly able to cover it and and seemed ready to slide off any moment. His many legxs, pitifully thin compared with the size of the the rest of him, waved about helplessly ashe looked looked.
|
294
301
|
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
- **Direct invocation** – Instantiate a glitchling (or `Gaggle`) and call it on strings, iterables, or datasets. Keep the seed stable to make every run deterministic.
|
300
|
-
- **Dataset corruption** – After ``import glitchlings.dlc.huggingface``, call ``Dataset.glitch(...)`` (or a `Gaggle`'s `.corrupt_dataset`) to perturb a Hugging Face `datasets.Dataset` and return a corrupted copy for training or evaluation.
|
301
|
-
|
302
|
-
### Rust pipeline acceleration (opt-in)
|
303
|
-
|
304
|
-
The refactored Rust pipeline can execute multiple glitchlings without
|
305
|
-
bouncing back through Python, but it is gated behind a feature flag so
|
306
|
-
teams can roll it out gradually. After compiling the Rust extension
|
307
|
-
(`python -m cibuildwheel --output-dir dist`) set
|
308
|
-
`GLITCHLINGS_RUST_PIPELINE=1` (or `true`, `yes`, `on`) before importing
|
309
|
-
`glitchlings`. When the flag is set and the extension is available,
|
310
|
-
`Gaggle` automatically batches compatible glitchlings into the Rust
|
311
|
-
pipeline; otherwise it transparently falls back to the legacy Python
|
312
|
-
loop.
|
313
|
-
|
314
|
-
### Prime Intellect environments
|
315
|
-
|
316
|
-
After `pip install -e .[prime]`, the `glitchlings.dlc.prime.load_environment` helper mirrors `verifiers.load_environment` for Prime Intellect scenarios while optionally applying glitchlings before returning the environment:
|
317
|
-
|
318
|
-
```python
|
319
|
-
from glitchlings import Mim1c, Typogre
|
320
|
-
from glitchlings.dlc.prime import echo_chamber, load_environment
|
321
|
-
|
322
|
-
env = load_environment(
|
323
|
-
"osoleve/syllabify-en",
|
324
|
-
glitchlings=[Mim1c(replacement_rate=0.01), Typogre(max_change_rate=0.02)],
|
325
|
-
seed=404,
|
326
|
-
)
|
327
|
-
|
328
|
-
# Spin up an echo chamber that corrupts a dataset column and
|
329
|
-
# rewards models for perfectly restoring it
|
330
|
-
practice_env = echo_chamber(
|
331
|
-
"osoleve/clean-room",
|
332
|
-
column="text",
|
333
|
-
glitchlings=["Typogre", "Mim1c"],
|
334
|
-
reward_function=lambda prompt, completion, answer: float(completion == answer),
|
335
|
-
)
|
336
|
-
```
|
337
|
-
|
338
|
-
Skip the `glitchlings` argument to receive an untouched verifier dataset, and
|
339
|
-
override `reward_function` when you want to evaluate completions with a custom
|
340
|
-
scoring routine.
|
302
|
+
Consult the [Glitchlings Usage Guide](docs/index.md)
|
303
|
+
for end-to-end instructions spanning the Python API, CLI, HuggingFace and Prime Intellect
|
304
|
+
integrations, and the feature-flagged Rust pipeline.
|
341
305
|
|
342
306
|
## Motivation
|
343
307
|
|
@@ -353,8 +317,8 @@ Glitchlings are standard Python classes, so you can instantiate them with whatev
|
|
353
317
|
```python
|
354
318
|
from glitchlings import Gaggle, Typogre, Mim1c
|
355
319
|
|
356
|
-
custom_typogre = Typogre(
|
357
|
-
selective_mimic = Mim1c(
|
320
|
+
custom_typogre = Typogre(rate=0.1)
|
321
|
+
selective_mimic = Mim1c(rate=0.05, classes=["LATIN", "GREEK"])
|
358
322
|
|
359
323
|
gaggle = Gaggle([custom_typogre, selective_mimic], seed=99)
|
360
324
|
print(gaggle("Summoned heroes do not fear the glitch."))
|
@@ -384,11 +348,14 @@ glitchlings --list
|
|
384
348
|
# Run Typogre against the contents of a file and inspect the diff.
|
385
349
|
glitchlings -g typogre --file documents/report.txt --diff
|
386
350
|
|
351
|
+
# Configure glitchlings inline by passing keyword arguments.
|
352
|
+
glitchlings -g "Typogre(rate=0.05)" "Ghouls just wanna have fun"
|
353
|
+
|
387
354
|
# Pipe text straight into the CLI for an on-the-fly corruption.
|
388
355
|
echo "Beware LLM-written flavor-text" | glitchlings -g mim1c
|
389
356
|
```
|
390
357
|
|
391
|
-
Use `--help` for a complete breakdown of available options.
|
358
|
+
Use `--help` for a complete breakdown of available options, including support for parameterised glitchlings via `-g "Name(arg=value, ...)"` to mirror the Python API.
|
392
359
|
|
393
360
|
## Development
|
394
361
|
|
@@ -406,7 +373,7 @@ _What a nice word, would be a shame if something happened to it._
|
|
406
373
|
>
|
407
374
|
> Args
|
408
375
|
>
|
409
|
-
> - `
|
376
|
+
> - `rate (float)`: The maximum number of edits to make as a percentage of the length (default: 0.02, 2%).
|
410
377
|
> - `keyboard (str)`: Keyboard layout key-neighbor map to use (default: "CURATOR_QWERTY"; also accepts "QWERTY", "DVORAK", "COLEMAK", and "AZERTY").
|
411
378
|
> - `seed (int)`: The random seed for reproducibility (default: 151).
|
412
379
|
|
@@ -418,7 +385,7 @@ _Wait, was that...?_
|
|
418
385
|
>
|
419
386
|
> Args
|
420
387
|
>
|
421
|
-
> - `
|
388
|
+
> - `rate (float)`: The maximum proportion of characters to replace (default: 0.02, 2%).
|
422
389
|
> - `classes (list[str] | "all")`: Restrict replacements to these Unicode script classes (default: ["LATIN", "GREEK", "CYRILLIC"]).
|
423
390
|
> - `banned_characters (Collection[str])`: Characters that must never appear as replacements (default: none).
|
424
391
|
> - `seed (int)`: The random seed for reproducibility (default: 151).
|
@@ -431,7 +398,7 @@ _How can a computer need reading glasses?_
|
|
431
398
|
>
|
432
399
|
> Args
|
433
400
|
>
|
434
|
-
> - `
|
401
|
+
> - `rate (float)`: The maximum proportion of eligible confusion spans to replace (default: 0.02, 2%).
|
435
402
|
> - `seed (int)`: The random seed for reproducibility (default: 151).
|
436
403
|
|
437
404
|
### Jargoyle
|
@@ -442,7 +409,7 @@ _Uh oh. The worst person you know just bought a thesaurus._
|
|
442
409
|
>
|
443
410
|
> Args
|
444
411
|
>
|
445
|
-
> - `
|
412
|
+
> - `rate (float)`: The maximum proportion of words to replace (default: 0.1, 10%).
|
446
413
|
> - `part_of_speech`: The WordNet part(s) of speech to target (default: nouns). Accepts `wn.NOUN`, `wn.VERB`, `wn.ADJ`, `wn.ADV`, any iterable of those tags, or the string `"any"` to include them all.
|
447
414
|
> - `seed (int)`: The random seed for reproducibility (default: 151).
|
448
415
|
|
@@ -454,7 +421,7 @@ _Did you say that or did I?_
|
|
454
421
|
>
|
455
422
|
> Args
|
456
423
|
>
|
457
|
-
> - `
|
424
|
+
> - `rate (float)`: The maximum proportion of words to reduplicate (default: 0.05, 5%).
|
458
425
|
> - `seed (int)`: The random seed for reproducibility (default: 151).
|
459
426
|
|
460
427
|
### Rushmore
|
@@ -465,7 +432,7 @@ _I accidentally an entire word._
|
|
465
432
|
>
|
466
433
|
> Args
|
467
434
|
>
|
468
|
-
> - `
|
435
|
+
> - `rate (float)`: The maximum proportion of words to delete (default: 0.01, 1%).
|
469
436
|
> - `seed (int)`: The random seed for reproducibility (default: 151).
|
470
437
|
|
471
438
|
### Redactyl
|
@@ -477,7 +444,7 @@ _Oops, that was my black highlighter._
|
|
477
444
|
> ### Args
|
478
445
|
>
|
479
446
|
> - `replacement_char (str)`: The character to use for redaction (default: █).
|
480
|
-
> - `
|
447
|
+
> - `rate (float)`: The maximum proportion of words to redact (default: 0.05, 5%).
|
481
448
|
> - `merge_adjacent (bool)`: Whether to redact the space between adjacent redacted words (default: False).
|
482
449
|
> - `seed (int)`: The random seed for reproducibility (default: 151).
|
483
450
|
|
@@ -0,0 +1,26 @@
|
|
1
|
+
glitchlings/__init__.py,sha256=w8heFqUejrXM_9NNlM9CQnIGkmGUyBV29acg3WsocXA,622
|
2
|
+
glitchlings/__main__.py,sha256=pqNe1C9hMf8pap4oh6x6yo2h4Nsa2RFSaMWHfGtNXj0,130
|
3
|
+
glitchlings/_zoo_rust.cp312-win_amd64.pyd,sha256=08xnERw5xVGeKk4DT4g1_NWmyHwiDlqt8UtLxR1jk9k,1989632
|
4
|
+
glitchlings/main.py,sha256=QrSSLWcKh1_NDfJDGh-3UVKdI7AkzfMy6Jz1ouxIgnE,6149
|
5
|
+
glitchlings/dlc/__init__.py,sha256=IHD-GGhVFb7SVzErvf2YCJkOR4wGo0nFHXkn_daMvS8,146
|
6
|
+
glitchlings/dlc/huggingface.py,sha256=PIesnDIEvyJxj1IuLw2P9nVPTr4Nv81XM7w2axfyhkA,3029
|
7
|
+
glitchlings/dlc/prime.py,sha256=hySyYBncUM-49j6JtrHYO6c3HpbG2vTt2EYZnOJ85C0,8972
|
8
|
+
glitchlings/util/__init__.py,sha256=GoyQuHTfGRkHzuZwJji6QWSiGd_LHa9QiyjjEpBFW7E,4679
|
9
|
+
glitchlings/zoo/__init__.py,sha256=kYKKlNvEwKtrD26E1hfde33rkN83CMf_h5AQFGjQyBQ,4312
|
10
|
+
glitchlings/zoo/_ocr_confusions.py,sha256=W59Aa5MBDwRF65f8GV-6XwGAmlR5Uk7pa5qvHvhIYdY,1252
|
11
|
+
glitchlings/zoo/_rate.py,sha256=EYUWXYyR2IK0zYBWyBOlnUjDxU32JE9mZTZeodVx5CA,548
|
12
|
+
glitchlings/zoo/core.py,sha256=QKHmzmONNkiA3RdfgLdNx-FPFwoH4Bm-Tkc3vSCHNpc,14412
|
13
|
+
glitchlings/zoo/jargoyle.py,sha256=1fnL_8bv1Y-T2h1C6NRzIylYyOuAUI-BiMReFewqh00,11002
|
14
|
+
glitchlings/zoo/mim1c.py,sha256=3ddNOzWgLABuEOh5T98Xk439ejx-YHGI7ErXET03Crc,3537
|
15
|
+
glitchlings/zoo/ocr_confusions.tsv,sha256=S-IJEYCIXYKT1Uu7Id8Lnvg5pw528yNigTtWUdnMv9k,213
|
16
|
+
glitchlings/zoo/redactyl.py,sha256=dM3W59xLhuiS8t5jXETc_L8EEhRN1CpLazBnVPiSknk,4834
|
17
|
+
glitchlings/zoo/reduple.py,sha256=9jid6tCvCaiSxWSPMNuHWZitd7et60RRFYeek3S0ElU,3641
|
18
|
+
glitchlings/zoo/rushmore.py,sha256=pJy3g_H1z8PNoHitvD3-HsytAuE0U6FOdsdaKZy6OqY,3680
|
19
|
+
glitchlings/zoo/scannequin.py,sha256=TJyNYTTIB7rxZH3XKIETy0YVf4EjsMgGWYmYaxH9jxU,5030
|
20
|
+
glitchlings/zoo/typogre.py,sha256=olTTXDmFkVQ3r-T1vxm2mLomRvIDXHrNHfgin316wzE,6221
|
21
|
+
glitchlings-0.2.3.dist-info/licenses/LICENSE,sha256=EFEP1evBfHaxsMTBjxm0sZVRp2wct8QLvHE1saII5FI,11538
|
22
|
+
glitchlings-0.2.3.dist-info/METADATA,sha256=oiBG6ir6cxTdmOHfNJ4A3FXoTGJRnXk2Qebs2OMX7ZY,26696
|
23
|
+
glitchlings-0.2.3.dist-info/WHEEL,sha256=8UP9x9puWI0P1V_d7K2oMTBqfeLNm21CTzZ_Ptr0NXU,101
|
24
|
+
glitchlings-0.2.3.dist-info/entry_points.txt,sha256=kGOwuAsjFDLtztLisaXtOouq9wFVMOJg5FzaAkg-Hto,54
|
25
|
+
glitchlings-0.2.3.dist-info/top_level.txt,sha256=VHFNBrLjtDwPCYXbGKi6o17Eueedi81eNbR3hBOoST0,12
|
26
|
+
glitchlings-0.2.3.dist-info/RECORD,,
|
Binary file
|
@@ -1,24 +0,0 @@
|
|
1
|
-
glitchlings/__init__.py,sha256=w8heFqUejrXM_9NNlM9CQnIGkmGUyBV29acg3WsocXA,622
|
2
|
-
glitchlings/__main__.py,sha256=pqNe1C9hMf8pap4oh6x6yo2h4Nsa2RFSaMWHfGtNXj0,130
|
3
|
-
glitchlings/_typogre_rust.cp312-win_amd64.pyd,sha256=k3PiIXoMQdZX8hMDkooQI4Rg2MH8YuHuq2rK7r5-8o4,265728
|
4
|
-
glitchlings/_zoo_rust.cp312-win_amd64.pyd,sha256=SXku4dvAYyulH-ALhuxJ_A0UareKExQn6gQ75l8fBlk,1943040
|
5
|
-
glitchlings/main.py,sha256=LIFZjSRlE4HiozHUhlIlEIelM6oCJii3GIsuTHW51DI,6547
|
6
|
-
glitchlings/dlc/__init__.py,sha256=IHD-GGhVFb7SVzErvf2YCJkOR4wGo0nFHXkn_daMvS8,146
|
7
|
-
glitchlings/dlc/huggingface.py,sha256=PIesnDIEvyJxj1IuLw2P9nVPTr4Nv81XM7w2axfyhkA,3029
|
8
|
-
glitchlings/dlc/prime.py,sha256=oKVAVWSD-aa-LqDsctSLXzq0JW2RaIc1l2859ogr4lY,8107
|
9
|
-
glitchlings/util/__init__.py,sha256=uGdfyq-RgEKu1nqrNbf-FoQRqnadjKME2aXbnK8hhuI,4169
|
10
|
-
glitchlings/zoo/__init__.py,sha256=_tE2DXkTmQwsojvCeY1ddAE7QkOvZSMTV6c8JzP_CEw,1401
|
11
|
-
glitchlings/zoo/core.py,sha256=aGGc0M97QeKM5rsQjTZs3fhIVac0g8A72mW4u72YnD0,14373
|
12
|
-
glitchlings/zoo/jargoyle.py,sha256=BCaJ5gzxCun3-K1Kh3-xweLc2mzcEWgRKnLNln3bbaA,8747
|
13
|
-
glitchlings/zoo/mim1c.py,sha256=YHFELu3fpY_9VxRavYfCoAWZYp-HZBXdiLk4DTKdqcY,2979
|
14
|
-
glitchlings/zoo/redactyl.py,sha256=vD7XixZEMmu_xXVNzf3AY7OvdRV1iE_sEqqDrAU4mPM,3674
|
15
|
-
glitchlings/zoo/reduple.py,sha256=WuMpmuZrf5x7JneiRjDF2Y0beEAn7j1DPCV2BuuTuRY,2873
|
16
|
-
glitchlings/zoo/rushmore.py,sha256=dAiv53B_6Zg-zNG5aW8YobJevyBV586HtJVlZqgcGR8,2790
|
17
|
-
glitchlings/zoo/scannequin.py,sha256=gwrbHpcCTp-SHXuQyQoqvw4pYzEogCjFdWPTGlmwURA,4796
|
18
|
-
glitchlings/zoo/typogre.py,sha256=gr-c7qy1OpvyaAJgomwdfkGFACJiXc1DAiCtQTxrhVI,5542
|
19
|
-
glitchlings-0.2.1.dist-info/licenses/LICENSE,sha256=EFEP1evBfHaxsMTBjxm0sZVRp2wct8QLvHE1saII5FI,11538
|
20
|
-
glitchlings-0.2.1.dist-info/METADATA,sha256=6ekbj9GPLZgsJxKO-ZyOgyuGinxEsJlKxD-vdePvNe8,28243
|
21
|
-
glitchlings-0.2.1.dist-info/WHEEL,sha256=8UP9x9puWI0P1V_d7K2oMTBqfeLNm21CTzZ_Ptr0NXU,101
|
22
|
-
glitchlings-0.2.1.dist-info/entry_points.txt,sha256=kGOwuAsjFDLtztLisaXtOouq9wFVMOJg5FzaAkg-Hto,54
|
23
|
-
glitchlings-0.2.1.dist-info/top_level.txt,sha256=VHFNBrLjtDwPCYXbGKi6o17Eueedi81eNbR3hBOoST0,12
|
24
|
-
glitchlings-0.2.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|