LabWired
회로 설계·펌웨어 실행·변형 비교·Playground 결과 확인, 오픈소스, 무료 체험
개인 계정의 공개 저장소 소유자는 GitHub로 로그인해 운영자를 확인하고 소개를 직접 관리할 수 있습니다. 관리자 승인은 필요하지 않습니다.
로그인한 뒤 확인 파일을 만들어 이 저장소의 기본 브랜치에 30분 안에 커밋해 주세요. 다른 브랜치나 포크의 파일은 인정하지 않습니다. 파일을 올린 뒤 아래에서 확인하면 관리자 승인 없이 관리할 수 있습니다. 자격을 유지하려면 파일을 남겨 두세요.
로그인이 필요하면 로그인 화면으로 이동합니다. 로그인 후 이곳으로 돌아와 원하는 확인 버튼을 다시 눌러 주세요.
프로젝트 폴더에서 /nomorevibe verify를 실행하면 소유권을 확인하고 소개를 직접 관리할 수 있습니다.
1분 만에 확인하기메이커가 쓴 소개는 위의 한 줄이 전부입니다. 더 자세한 내용은 저장소 README에서 읽을 수 있습니다. 저장소 README ↗
README 전체를 불러오는 중입니다.
README 전문 보기 ↗textnoisr: Adding random noise to a datasettextnoisr is a python package that allows to add random noise to a text dataset,
and to control very accurately the quality of the result.
You can install it using pip:
pip install textnoisr
For a reproducible install with the exact dependency versions textnoisr was tested with,
use the constraints.txt attached to each GitHub release:
pip install textnoisr==X.Y.Z -c https://github.com/preligens-lab/textnoisr/releases/download/vX.Y.Z/constraints.txt
To contribute, install uv and run uv sync, then e.g. uv run pytest.
Here is an example if your dataset consists on the first few lines of the Zen of python:
Raw text
The Zen of Python, by Tim Peters
Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
...
Noisy text
TheO Zen of Python, by Tim Pfter
BzeautiUful is ebtter than ugly.
Eqxplicin is better than imlicit.
Simple is beateUr than comdplex.
Complex is better than comwlicated.
Flat is bejAter than neseed.
...
Four types of "actions" are implemented:
The general philosophy of the package is that only one single parameter is needed to control the noise level. This "noise level" is applied character-wise, and corresponds roughly to the probability for a character to be impacted.
More precisely, this noise level is calibrated so that the Character Error Rate of a noised dataset converges to this value as the amount of text increases.
Why a whole package for such a simple task?
In the case of inserting, deleting and substituting characters at random with a probability $p$, the Character Error Rate is only the average number of those operations, so it will converge to the input value $p$ due to the Law of Large Numbers.
However, the case of swapping consecutive characters is not trivial at all for two reasons:
First, swapping two characters is not an "atomic operation" with respect to the Character Error Rate metric.
Second, we do not want to swap repeatedly the same character over and over again if the probability to apply the swap action is high: STEAM → TSEAM TSEAM → TESAM TESAM → TEASM TEASM → TEAMS This would be equivalent to STEAM → TEAMS, so this cannot be considered "swapping consecutive characters". To avoid this behavior, we must avoid swapping a character if it has just been swapped. This breaks the independency between one character and the following one, and makes the Law of Large Numbers not applicable.
We use Markov Chains to model the swapping of characters. This allows us to compute and correct the corresponding bias in order to make itstraightforward for the user to get the desired Character Error Rate, as if the Law of Large Number could beapplied!
All the details of this unbiasing are here. The goal of this package is for the user to be confident on the result without worrying about the implementation details.
The documentation follows this plan:
swap action.There is also a Medium article about this project.