Language-specific#

Do note that some augmentations such as the wordnet_synonym.v1 is a language-specific augmentation, but as it is not implemented independently for each language it is not listed here.

Danish#

augmenty.lang.da.augmenters#

augmenty.lang.da.augmenters.create_da_historical_noun_casing_augmenter_v1(level: float) Callable[[Language, Example], Iterator[Example]][source]#

Creates an augmenter that capitalizes nouns.

Parameters:

level – The probabiliy to upper case a noun.

Returns:

The augmenter.

augmenty.lang.da.augmenters.create_da_æøå_replace_augmenter_v1(level: float) Callable[[Language, Example], Iterator[Example]][source]#

Creates an augmenter that augments æ, ø, and å into their spelling variants ae, oe, aa.

Parameters:

level – probability to augment æ, ø or å.

Returns:

The desired augmenter.

Example

>>> import augmenty
>>> from spacy.lang.en import English
>>> nlp = English()
>>> augmenter = augmenty.load("da_æøå_replace_v1", level=0.1)
>>> texts = ["æ ø Å"]
>>> list(augmenty.texts(texts, augmenter, nlp))
["ae oe Aa"]