dataset

package
v0.0.0-...-e0cd53d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 2, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("dataset: not found")

ErrNotFound is returned by Load if the requested dataset is not on disk.

View Source
var Names = []string{
	"enwiki-20231020-pages-articles1.xml-p1p41242",
	"enwiki-20231020-pages-articles2.xml-p41243p151573",
	"enwiki-20231020-pages-articles3.xml-p151574p311329",
	"enwiki-20231020-pages-articles4.xml-p311330p558391",
	"enwiki-20231020-pages-articles5.xml-p558392p958045",
	"enwiki-20231020-pages-articles6.xml-p958046p1483661",
}

Names contains the name of known dataset.

Functions

This section is empty.

Types

type Dataset

type Dataset struct {
	io.Reader
	// contains filtered or unexported fields
}

Dataset represents a group of wiki pages.

func Download

func Download(name string, progress ProgressFunc) (*Dataset, error)

Download downloads the given dataset.

func Load

func Load(name string) (*Dataset, error)

Load loads a dataset from disk.

func (*Dataset) Close

func (d *Dataset) Close() error

Close closes the dataset.

func (*Dataset) Name

func (d *Dataset) Name() string

Name returns the name of the dataset.

func (*Dataset) Size

func (d *Dataset) Size() int64

Size returns the size of the dataset.

type Datasets

type Datasets []*Dataset

Datasets represents a group of dataset.

func (Datasets) Close

func (datasets Datasets) Close() error

Close closes all the datasets.

type ProgressFunc

type ProgressFunc func(n int64, r io.Reader) io.Reader

ProgressFunc is an optional function enabling the caller to wrap the reader and follow the download progress.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL