Skip to content

Repository files navigation

AugLy-jp

Data augmentation for Japanese text, built on AugLy.

PyPI version Python 3.11 Test Coverage Ruff ty License

Installation

The current version requires Python 3.11. The latest PyPI release predates the uv migration, so install the current version from the main branch until the next release is published:

uv add "augly-jp @ git+https://github.com/chck/AugLy-jp.git@main"

Usage

from augly_jp import text as text_augmentations

text = "あらゆる現実をすべて自分のほうへねじ曲げたのだ"
augmented = text_augmentations.replace_synonym_words(text)
print(augmented)
Function Example output Description
replace_synonym_words あらゆる現実をすべて自身のほうへねじ曲げたのだ Substitutes words using the Sudachi synonym dictionary
replace_wordembs_words あらゆる現実をすべて関心のほうへねじ曲げたのだ Substitutes words using word embeddings
replace_fillmask_words つまり現実を、未来な未来まで変えたいんだ Generates substitutions with a masked language model
replace_backtranslation_sentences そして、ほかの人たちをそれぞれの道に安置しておられた Augments text through back translation

Development instructions are in CONTRIBUTING.md.

Licensed under the MIT License. Runtime models and datasets retain their own license terms.

About

Data Augmentation for Japanese Text on AugLy

Topics

Resources

Contributing

Stars

7 stars

Watchers

1 watching

Forks

Releases

Used by

Contributors

Languages