<commit_before>/*
 * Copyright 2014 Sonoport (Asia) Pte Ltd
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.sonoport.freesound.query.sound;

import java.util.Collections;
import java.util.Map;
import java.util.Set;

import com.sonoport.freesound.License;

/**
 * Query used to provide additional details relating to a previously uploaded sound. Sounds requiring these queries are
 * listed as 'Pending Description' in the 'Pending Uploads' query.
 */
public class DescribeSound extends AbstractSoundUploadQuery<DescribeSound> {

	/** Name of the parameter to pass the filename through as. */
	protected static final String UPLOAD_FILENAME_PARAMETER_NAME = "upload_filename";

	/** Path to API endpoint. */
	private static final String PATH = "/sounds/describe/";

	/** Name of the previously uploaded file. */
	private final String uploadFilename;

	/**
	 * @param uploadFilename Name of the previously uploaded file
	 * @param description Description to apply to sound
	 * @param license License to apply to sound<commit_msg>Added note about bug in freesound API [Issue #10]<commit_after>/*
 * Copyright 2014 Sonoport (Asia) Pte Ltd
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.sonoport.freesound.query.sound;

import java.util.Collections;
import java.util.Map;
import java.util.Set;

import com.sonoport.freesound.License;

/**
 * Query used to provide additional details relating to a previously uploaded sound. Sounds requiring these queries are
 * listed as 'Pending Description' in the 'Pending Uploads' query.
 *
 * Note that there is a bug in the API meaning that if the optional parameters (name and pack) are not specified, the
 * call will fail (with a 500 response). A bug has been raised with Freesound at:
 * https://github.com/MTG/freesound/issues/648
 */
public class DescribeSound extends AbstractSoundUploadQuery<DescribeSound> {

	/** Name of the parameter to pass the filename through as. */
	protected static final String UPLOAD_FILENAME_PARAMETER_NAME = "upload_filename";

	/** Path to API endpoint. */
	private static final String PATH = "/sounds/describe/";

	/** Name of the previously uploaded file. */
	private final String uploadFilename;

	/**
	 * @param uploadFilename Name of the previously uploaded file
	 * @param description Description to apply to sound
	 * @param license License to apply to sound
{'fraction_non_alphanumeric': 0.07669616519174041, 'fraction_numerical': 0.007079646017699115, 'mean_word_length': 4.130105900151286, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 1, 'lorem ipsum': 0, 'www.': 2, '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': '4555844', 'n_tokens_mistral': 887, 'n_tokens_neox': 863, 'n_words': 413}