-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- fixing percentage_outliers (was still there) - adding missingness for graphs - adding leet speak
- Loading branch information
Showing
9 changed files
with
347 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,149 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"id": "c695b94a-1032-46a3-9a97-421f1a4a43bd", | ||
"metadata": {}, | ||
"source": [ | ||
"# Adding typos to text" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 1, | ||
"id": "d940b272-c15a-4b3b-b068-bc7308599534", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"from badgers.generators.text.typos import SwapLettersGenerator, LeetSpeakGenerator" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 2, | ||
"id": "8d8acaee-95ca-4ac1-910d-6b79256564a7", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"X = \"the quick brown fox jumps over the lazy dog\".split(' ')" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "4da6eb3c-cd91-41ad-9db8-6a891bad6072", | ||
"metadata": {}, | ||
"source": [ | ||
"## Swapping letter randomly" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 3, | ||
"id": "196be517-21ee-4f50-8a3c-57b454fcc470", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"swap_letters = SwapLettersGenerator(swap_proba=1)" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 4, | ||
"id": "bdbb18f3-29fd-48e0-8450-8de9266dd75a", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"Xt, _ = swap_letters.generate(X.copy(), None)" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 5, | ||
"id": "4a2c09cb-9a50-474e-be2f-a9a8a9362748", | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"name": "stdout", | ||
"output_type": "stream", | ||
"text": [ | ||
"['the', 'quick', 'brown', 'fox', 'jumps', 'over', 'the', 'lazy', 'dog']\n", | ||
"['the', 'qucik', 'borwn', 'fox', 'jmups', 'oevr', 'the', 'lzay', 'dog']\n" | ||
] | ||
} | ||
], | ||
"source": [ | ||
"print(X)\n", | ||
"print(Xt)" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "d1c389f2-5ce5-4fe6-89d0-f8002949113e", | ||
"metadata": {}, | ||
"source": [ | ||
"## Leet Speak" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 6, | ||
"id": "43e634b8-2657-4e28-ac59-fa190298937d", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"leet_speak = LeetSpeakGenerator(replacement_proba=0.1)" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 7, | ||
"id": "0b6f7e67-e68a-446c-a8e7-25823895ea0f", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"Xt, _ = leet_speak.generate(X.copy(), None)" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 8, | ||
"id": "04d104f6-da91-4e50-981a-72b703903a6a", | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"name": "stdout", | ||
"output_type": "stream", | ||
"text": [ | ||
"['the', 'quick', 'brown', 'fox', 'jumps', 'over', 'the', 'lazy', 'dog']\n", | ||
"['th3', 'quick', 'br0w^', 'fox', 'ju|\\\\|\\\\ps', 'over', 'the', 'lazy', 'dog']\n" | ||
] | ||
} | ||
], | ||
"source": [ | ||
"print(X)\n", | ||
"print(Xt)" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Python 3 (ipykernel)", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.11.2" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 5 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build" | |
|
||
[project] | ||
name = "badgers" | ||
version = "0.0.2" | ||
version = "0.0.3" | ||
keywords = ["data quality", "bad data", "data science"] | ||
authors = [ | ||
{ name = "Julien Siebert", email = "[email protected]" }, | ||
|
@@ -15,17 +15,18 @@ maintainers = [ | |
description = "Badgers: bad data generators" | ||
readme = "README.md" | ||
requires-python = ">=3.8" | ||
license = {file = "LICENSE"} | ||
license = { file = "LICENSE" } | ||
classifiers = [ | ||
"Programming Language :: Python :: 3", | ||
"License :: OSI Approved :: BSD License", | ||
"Operating System :: OS Independent", | ||
"Development Status :: 1 - Planning", | ||
] | ||
dependencies = [ | ||
"numpy", | ||
"pandas", | ||
"scikit-learn", | ||
"numpy", | ||
"pandas", | ||
"scikit-learn", | ||
"networkx" | ||
] | ||
[project.urls] | ||
"Homepage" = "https://github.com/Fraunhofer-IESE/badgers" | ||
|
Empty file.
Oops, something went wrong.