Skip to content

Commit

Permalink
Merge pull request #205 from KennethEnevoldsen/update-docs
Browse files Browse the repository at this point in the history
docs: move example to correct function
  • Loading branch information
KennethEnevoldsen authored Oct 6, 2023
2 parents 6456c68 + 8aeae27 commit ce3ffc5
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/augmenty/augment_utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ def combine(
Returns:
The combined augmenter
Example:
>>> char_swap_augmenter = augmenty.load("char_swap_v1", level=.02)
>>> synonym_augmenter = augmenty.load("wordnet_synonym_v1", level=1, lang="en")
>>> combined_aug = augmenty.combine([char_swap_augmenter, synonym_augmenter])
>>> # combine doc using two augmenters
>>> augmented_docs = list(augmenty.docs(docs, augmenter=combined_aug, nlp=nlp_en_md))
"""

def apply_multiple_augmenters(nlp: Language, example: Example):
Expand All @@ -42,13 +50,6 @@ def set_doc_level(
Returns:
The combined augmenter
Example:
>>> char_swap_augmenter = augmenty.load("char_swap_v1", level=.02)
>>> synonym_augmenter = augmenty.load("wordnet_synonym_v1", level=1, lang="en")
>>> combined_aug = augmenty.combine([char_swap_augmenter, synonym_augmenter])
>>> # combine doc using two augmenters
>>> augmented_docs = list(augmenty.docs(docs, augmenter=combined_aug, nlp=nlp_en_md))
"""

def __augment(nlp: Language, example: Example):
Expand Down

0 comments on commit ce3ffc5

Please sign in to comment.