Jarbas's picture
Upload dataset
a9f165e verified
|
Raw
History Blame
9.46 kB
metadata
license: apache-2.0
task_categories:
  - token-classification
language:
  - ca
  - da
  - de
  - en
  - es
  - eu
  - fr
  - gl
  - it
  - nl
  - pt
tags:
  - keyword-extraction
  - search-term-extraction
  - query-understanding
  - voice-assistant
  - topic-extraction
  - ovos
pretty_name: Multilingual Search-Term Extraction
size_categories:
  - 10K<n<100K
configs:
  - config_name: ca
    data_files:
      - split: train
        path: ca/train-*
      - split: test
        path: ca/test-*
  - config_name: da
    data_files:
      - split: train
        path: da/train-*
      - split: test
        path: da/test-*
  - config_name: de
    data_files:
      - split: train
        path: de/train-*
      - split: test
        path: de/test-*
  - config_name: en
    data_files:
      - split: train
        path: en/train-*
      - split: test
        path: en/test-*
  - config_name: es
    data_files:
      - split: train
        path: es/train-*
      - split: test
        path: es/test-*
  - config_name: eu
    data_files:
      - split: train
        path: eu/train-*
      - split: test
        path: eu/test-*
  - config_name: fr
    data_files:
      - split: train
        path: fr/train-*
      - split: test
        path: fr/test-*
  - config_name: gl
    data_files:
      - split: train
        path: gl/train-*
      - split: test
        path: gl/test-*
  - config_name: it
    data_files:
      - split: train
        path: it/train-*
      - split: test
        path: it/test-*
  - config_name: nl
    data_files:
      - split: train
        path: nl/train-*
      - split: test
        path: nl/test-*
  - config_name: pt
    data_files:
      - split: train
        path: pt/train-*
      - split: test
        path: pt/test-*
dataset_info:
  - config_name: ca
    features:
      - name: lang
        dtype: string
      - name: tokens
        list: string
      - name: tags
        list:
          class_label:
            names:
              '0': O
              '1': B-KW
              '2': I-KW
      - name: text
        dtype: string
      - name: keyword
        dtype: string
      - name: source
        dtype: string
    splits:
      - name: train
        num_bytes: 1197430
        num_examples: 5641
      - name: test
        num_bytes: 215786
        num_examples: 1500
    download_size: 1062253
    dataset_size: 1413216
  - config_name: da
    features:
      - name: lang
        dtype: string
      - name: tokens
        list: string
      - name: tags
        list:
          class_label:
            names:
              '0': O
              '1': B-KW
              '2': I-KW
      - name: text
        dtype: string
      - name: keyword
        dtype: string
      - name: source
        dtype: string
    splits:
      - name: train
        num_bytes: 930479
        num_examples: 4893
      - name: test
        num_bytes: 201595
        num_examples: 1500
    download_size: 850252
    dataset_size: 1132074
  - config_name: de
    features:
      - name: lang
        dtype: string
      - name: tokens
        list: string
      - name: tags
        list:
          class_label:
            names:
              '0': O
              '1': B-KW
              '2': I-KW
      - name: text
        dtype: string
      - name: keyword
        dtype: string
      - name: source
        dtype: string
    splits:
      - name: train
        num_bytes: 1005777
        num_examples: 4902
      - name: test
        num_bytes: 215451
        num_examples: 1500
    download_size: 921793
    dataset_size: 1221228

Multilingual Search-Term Extraction

Token-level labels marking, in a voice-assistant query, the search term — the minimal topic string you would hand to a knowledge base or search engine. Given "what is the speed of light?" the target is "speed of light"; given "set volume to fifty" the target is nothing (there is no topic to look up).

The task is not document keyphrase extraction and not full intent/slot NLU. It answers one question: what do I search for? — the input the OVOS common-query / DuckDuckGo / Wikipedia skills send downstream.

Task & label scheme

Sequence labeling with three tags per token:

tag meaning
O not part of the search term
B-KW first token of a search-term span
I-KW continuation of a search-term span

Contiguous B-KW/I-KW tokens form the search term; an utterance with no topic (smart-home, timers, volume…) is all O. These negatives are kept on purpose — the extractor runs behind an intent gate but should still not hallucinate a topic where there is none.

Schema

Each row: lang, tokens (list[str], quebra_frases tokenizer), tags (ClassLabel sequence), text, keyword (the target string), source.

Configs & splits

One config per language (ca da de en es eu fr gl it nl pt), each with:

  • train — ~50k rows total (templated + synthetic; see Provenance).
  • test — a curated gold split (~16k rows total) from human-authored eval sets.
from datasets import load_dataset
ds = load_dataset("TigreGotico/search-term-extraction", "en")  # train + test

Provenance

Derived from permissively licensed OpenVoiceOS resources and one local-LLM step. The source field on every row records where it came from:

source what label quality
slot_filling OVOS locale {query} templates (ovos-localize) deterministic (slot span)
intents_eval intents-for-eval templates (Apache-2.0) deterministic (content slots)
massive massive-templates, the MASSIVE corpus (Apache-2.0) deterministic (content slots)
music music_queries_templates (MIT) deterministic (slot span)
common_query real questions from ovos-common-query-intents silver — span labelled by a local Gemma model, validated as a verbatim substring
generated questions invented by a local Gemma model silver — synthetic

The test (gold) split is the -test configs of intents-for-eval and MASSIVE (human-authored utterances with gold slot annotations).

How this dataset was generated

The whole dataset is produced by build_dataset.py in the crf_query_xtract repo (--dry-run-able; deterministic given a seed except for the LLM steps). One span-labelling routine is shared by every source: tokenise with quebra_frases, locate the target value as a token subsequence, and tag that span B-KW/ I-KW — labels therefore always align to the published tokens.

  1. Template sources — deterministic, no LLM. slot_filling, intents_eval, massive and music come from OVOS / MASSIVE {slot} templates. Slots are filled from each template's own example values; the content slot (the search term) is labelled, other slots are filled but left O, and (a|b) alternations are expanded with ovos-spec-tools. Templates whose only slots are constrained (time, volume…) become all-O negatives.
  2. common_query — local-LLM labelling. Real questions from ovos-common-query-intents carry no markup, so a locally-hosted Gemma model (ggml-org/gemma-4-26B-A4B-it, run on the maintainer's own hardware) is asked for the search-term substring; a result is kept only if it is a verbatim substring of the question (otherwise dropped). Treat these as silver.
  3. generated — local-LLM synthesis. The same Gemma model invents extra natural questions and their search term, kept under the same substring check. A small synthetic top-up, mainly for thin languages.
  4. Gold (test) split. Taken verbatim from the human-authored -test configs of intents-for-eval and MASSIVE; the search term is the content-slot value(s) from those datasets' own gold annotations. No LLM labelling.

Transparency on AI involvement

  • The construction pipeline, the labelling heuristics, and this card were written by Anthropic's Claude operating as an autonomous coding agent. Claude wrote code and documentation — it did not author or label any row of data.
  • All in-dataset LLM labelling and synthesis (steps 2–3) were done by a local open-weights Gemma model, not by Claude. Roughly 1.5% of train rows are LLM-touched (common_query + generated); the rest are template-derived.
  • The gold split contains no model-generated labels.

Quality, scope & limitations

  • Gold vs silver. The test split is curated; in train, common_query and generated are LLM-labelled and the templated sources use a content-slot heuristic (a fixed all-list of entity slot names). Treat train as silver.
  • Synthetic distribution. Most train rows are templates filled with entities; the real-query distribution differs. common_query and the gold split are the most natural.
  • What counts as the term follows the source slot boundaries, so leading articles can be included ("the speed of light"). Multi-entity utterances concatenate spans in surface order.
  • Coverage is uneven: eu and gl are thin (no MASSIVE coverage).

Intended use

Train or evaluate a topic/search-term extractor that sits between intent classification and a search/KB backend. Works for sequence-labeling models (CRF, token classifiers) or as supervision for an LLM. The reference model trained on it is crf_query_xtract.

License & attribution

Apache-2.0. Built from OpenVoiceOS datasets (Apache-2.0 / MIT) and the MASSIVE corpus (Apache-2.0); please credit those upstreams alongside this dataset.