Code Monkey home page Code Monkey logo

augmenty's Introduction

Augmenty: The cherry on top of your NLP pipeline

PyPI version python version Ruff github actions pytest github actions docs status

Augmenty is an augmentation library based on spaCy for augmenting texts. Besides a wide array of highly flexible augmenters, Augmenty provides a series of tools for working with augmenters, including combining and moderating augmenters. Augmenty differs from other augmentation libraries in that it corrects (as far as possible) the assigned labels under the augmentation, thus making many of the augmenters valid for training in a wider range of tasks.

๐Ÿ”ง Installation

To get started using augmenty simply install it using pip by running the following line in your terminal:

pip install augmenty

Do note that this is a minimal installation. As some augmenters requires additional packages please write the following line to install all dependencies.

pip install "augmenty[all]"

For more detailed instructions on installing augmenty, including specific language support, see the installation instructions.

๐Ÿ’ Simple Example

The following shows a simple example of how you can quickly augment text using Augmenty. For more on using augmenty see the usage guides.

import augmenty
import spacy

nlp = spacy.load("en_core_web_md")
# if not installed run: python -m spacy download en_core_web_md

doc = nlp("Augmenty is a great tool for text augmentation")

# check that the pipeline detects the entities (this done by SpaCy and is not a 100%)
print(doc.ents)
# (Augmenty,) is detected as an entity

doc.ents[0].label_
# 'GPE'. Depending on the model, the label might be different (e.g. 'ORG')

entity_augmenter = augmenty.load(
    "ents_replace_v1", ent_dict={"GPE": [["spaCy"], ["spaCy", "Universe"]]}, # label=GPE,
    level=1
)

for augmented_doc in augmenty.docs([doc], augmenter=entity_augmenter, nlp=nlp):
    print(augmented_doc)
spaCy Universe is a great tool for text augmentation.

๐Ÿ“– Documentation

Documentation
๐Ÿ“š Usage Guides Guides and instructions on how to use augmenty and its features.
๐Ÿ“ฐ News and changelog New additions, changes and version history.
๐ŸŽ› API References The detailed reference for augmenty's API. Including function documentation
๐Ÿ’ Augmenters Contains a full list of current augmenters in augmenty.
๐Ÿ™‹ FAQ Frequently asked question regarding augmenty
๐Ÿค How to contribute How to contribute to augmenty

๐Ÿ’ฌ Where to ask questions

Type
๐Ÿšจ Bug Reports GitHub Issue Tracker
๐ŸŽ Feature Requests & Ideas GitHub Issue Tracker
๐Ÿ‘ฉโ€๐Ÿ’ป Usage Questions GitHub Discussions
๐Ÿ—ฏ General Discussion GitHub Discussions
๐Ÿ’ Adding an Augmenter Adding an augmenter

augmenty's People

Contributors

kennethenevoldsen avatar pre-commit-ci[bot] avatar dependabot[bot] avatar eford36 avatar actions-user avatar qeterme avatar koaning avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.