Git Product home page Git Product logo

bulk's Introduction

bulk

Bulk is a quick developer tool to apply some bulk labels. Given a prepared dataset with 2d embeddings it can generate an interface that allows you to quickly add some bulk, albeit less precice, annotations.

Install

git clone https://github.com/JulesBelveze/bulk.git

Disclaimer

The original tool from koaning can be found here, but I forked the project and kept working on my fork as our use cases were different.

Usage

To use bulk, you'll first need to prepare a csv file.

Note The example below uses the universal sentence encoder but you're totally free to use what-ever text embedding tool that you like. You may also enjoy whatlies or sentence transformers. You will need to install these tools seperately.

import pandas as pd
from umap import UMAP
from sentence_transformers import SentenceTransformer

# Load the universal sentence encoder
model = SentenceTransformer("sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2")

# Load original dataset
df = pd.read_csv("original.csv")

# Apply embeddings 
X = model.encode(df['text'])

# Reduce the dimensions with UMAP
umap = UMAP()
X_tfm = umap.fit_transform(X)

# Apply coordinates
df['x'] = X_tfm[:, 0]
df['y'] = X_tfm[:, 1]
df.to_csv("ready.csv")

You can now use this ready.csv file to apply some bulk labelling.

python3 -m bulk text ready.csv

Usecase

The interface may help you label very quickly. It enables you to directly create tabs on Label Studio to either correct or create labels.

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.