hfqa

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package hfqa loads Hugging Face extractive-QA datasets in the SQuAD JSON format into an amoxtli evaluation corpus + query set. The format is shared by several real-document, Wikipedia-based datasets across languages — SQuAD (English), squad_es (Spanish), PIAF/FQuAD (French), MLQA, XQuAD — so a single loader turns any of them into a passage-retrieval benchmark: each unique paragraph becomes a corpus document, and each question becomes a query whose relevant source is the paragraph it was written from.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

func Load(path, lang, name string) (*eval.Corpus, *eval.Dataset, error)

Load reads a SQuAD-format dataset from path, tagging every document and query with lang. It returns the corpus (unique paragraphs) and the query set (answerable questions). name labels the resulting dataset/corpus.

func Read

func Read(r io.Reader, lang, name string) (*eval.Corpus, *eval.Dataset, error)

Read decodes a SQuAD-format dataset from r. See Load.

Types

This section is empty.

Jump to

Keyboard shortcuts

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