<commit_before>package v1batch

import (
	"net/http"

	v1payload "github.com/nerdalize/nerd/nerd/client/batch/v1/payload"
)

//ClientDatasetInterface is an interface so client dataset calls can be mocked.
type ClientDatasetInterface interface {
	CreateDataset(projectID string) (output *v1payload.CreateDatasetOutput, err error)
	ListDatasets(projectID, tag string) (output *v1payload.ListDatasetsOutput, err error)
	DescribeDataset(projectID, id string) (output *v1payload.DescribeDatasetOutput, err error)
}

//CreateDataset creates a new dataset.
func (c *Client) CreateDataset(projectID string) (output *v1payload.CreateDatasetOutput, err error) {
	input := &v1payload.CreateDatasetInput{}
	output = &v1payload.CreateDatasetOutput{}
	return output, c.doRequest(http.MethodPost, createPath(projectID, datasetEndpoint), input, output)
}

//DescribeDataset gets a dataset by ID.
func (c *Client) DescribeDataset(projectID, id string) (output *v1payload.DescribeDatasetOutput, err error) {
	input := &v1payload.DescribeDatasetInput{}
	output = &v1payload.DescribeDatasetOutput{}
	return output, c.doRequest(http.MethodGet, createPath(projectID, datasetEndpoint, id), input, output)
}

//ListDatasets gets a dataset by ID.
func (c *Client) ListDatasets(projectID, tag string) (output *v1payload.ListDatasetsOutput, err error) {
	input := &v1payload.ListDatasetsInput{Tag: tag}
	output = &v1payload.ListDatasetsOutput{}
	return output, c.doRequest(http.MethodGet, createPath(projectID, datasetEndpoint), input, output)
}
<commit_msg>Add tag query paramater<commit_after>package v1batch

import (
	"net/http"

	v1payload "github.com/nerdalize/nerd/nerd/client/batch/v1/payload"
)

//ClientDatasetInterface is an interface so client dataset calls can be mocked.
type ClientDatasetInterface interface {
	CreateDataset(projectID string) (output *v1payload.CreateDatasetOutput, err error)
	ListDatasets(projectID, tag string) (output *v1payload.ListDatasetsOutput, err error)
	DescribeDataset(projectID, id string) (output *v1payload.DescribeDatasetOutput, err error)
}

//CreateDataset creates a new dataset.
func (c *Client) CreateDataset(projectID string) (output *v1payload.CreateDatasetOutput, err error) {
	input := &v1payload.CreateDatasetInput{}
	output = &v1payload.CreateDatasetOutput{}
	return output, c.doRequest(http.MethodPost, createPath(projectID, datasetEndpoint), input, output)
}

//DescribeDataset gets a dataset by ID.
func (c *Client) DescribeDataset(projectID, id string) (output *v1payload.DescribeDatasetOutput, err error) {
	input := &v1payload.DescribeDatasetInput{}
	output = &v1payload.DescribeDatasetOutput{}
	return output, c.doRequest(http.MethodGet, createPath(projectID, datasetEndpoint, id), input, output)
}

//ListDatasets gets a dataset by ID.
func (c *Client) ListDatasets(projectID, tag string) (output *v1payload.ListDatasetsOutput, err error) {
	output = &v1payload.ListDatasetsOutput{}
	return output, c.doRequest(http.MethodGet, createPath(projectID, datasetEndpoint)+"?tag="+tag, nil, output)
}

{'fraction_non_alphanumeric': 0.10583580613254204, 'fraction_numerical': 0.009561490273656445, 'mean_word_length': 6.779487179487179, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7197648', 'n_tokens_mistral': 912, 'n_tokens_neox': 969, 'n_words': 242}