Skip to main content

pypi badge GPL License

webcorpus is an end-to-end tool used to crawl and generate datasets from the crawled data. It can be used to generate monolingual corpora and has various processors to create labelled datasets automatically. webcorpus is particulary suited for low-resource languages which need automated methods for creating large-scale datasets.

This project has been used to generate IndicCorp, a large-scale corpora for Indic languages, and some datasets for IndicGLUE.

Installation

Make sure you have java installed on your system. Next, install it using pip:

sudo pip3 install webcorpus

Usage

To build the dataset, we first need to crawl the web and then process the crawls to create the final dataset.

Step 1: Crawling Sources

To start crawling websites, you first need to start the webcorpus crawling server:

webcorpus start

Once the server has started, you can start crawls using the following command.

webcorpus crawl --path <path> --name <name> --url <url> --log <path> [--host <ip address>]

You can see the status of the crawls anytime by executing:

webcorpus log [--host <ip address>]

The last two steps can also been remotely, which can be useful in distributed mode where you are running multiple webcorpus servers.

Step 2: Processing Corpus
webcorpus process --operation <operation code> --lang <lang code> --input <input path> --output <output path>

Currently, the following processing operations are supported: extract_arts, extract_sents, extract_genres, archive.

Metadata

Release files for webcorpus 0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for webcorpus 0.2
File Size Uploaded
webcorpus-0.2.tar.gz 35.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for webcorpus 0.2
File Interpreter ABI Platform
webcorpus-0.2-py3-none-any.whl Python 3 none any Details

Total release size: 90.5 kB

Release files / webcorpus-0.2.tar.gz

Download URL webcorpus-0.2.tar.gz
Size 35.4 kB
Tags Source
SHA-256 checksum
How to use checksums
36c6a63027936309fcbda4e0957d23007b78639e873925ba43360f51350aedfc
BLAKE2b-256 checksum
How to use checksums
1e2e8ff88ca95c23f989ba067b9b2c390350059d41d1415b10bdad85d2450b4d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.2

Release files / webcorpus-0.2-py3-none-any.whl

Download URL webcorpus-0.2-py3-none-any.whl
Size 55.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e21533ef788ed23f13b29947ee4c93a32e4f7d890b13c6d97ff49f9e0432b36c
BLAKE2b-256 checksum
How to use checksums
f4745fb341a62ee85233198ac15b87fb8023ebd78d62109cfb8dd07b09268e7c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.2

Release history Release notifications | RSS feed

This release

0.2 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page