<commit_before>package fr.openwide.core.commons.util.mime;

import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;

import com.google.common.collect.Lists;

public enum MediaType {
	
	// Applications
	APPLICATION_OCTET_STREAM("application/octet-stream"),
	APPLICATION_JAVASCRIPT("application/javascript", "js"),
	APPLICATION_XML("application/xml", "xml"),
	APPLICATION_JSON("application/json", "json"),
	APPLICATION_ZIP("application/zip", "zip"),
	APPLICATION_RAR("application/rar", "rar"),
	APPLICATION_7Z("application/x-7z-compressed", "7z"),
	APPLICATION_TAR_GZ("application/x-tgz", "tar.gz"),
	APPLICATION_KML("application/vnd.google-earth.kml+xml", "kml"),
	APPLICATION_KMZ("application/vnd.google-earth.kmz", "kmz"),
	APPLICATION_GPX("application/gpx+xml", "gpx"),
	APPLICATION_PDF("application/pdf", "pdf"),
	APPLICATION_SWF("application/x-shockwave-flash", "swf"),
	
	// Applications > MS Office
	APPLICATION_MS_WORD("application/msword", "doc"),
	APPLICATION_MS_EXCEL("application/vnd.ms-excel", "xls"),
	APPLICATION_MS_POWERPOINT("application/vnd.ms-powerpoint", "ppt"),
	
	APPLICATION_OPENXML_WORD("application/vnd.openxmlformats-officedocument.wordprocessingml.document", "docx"),
	APPLICATION_OPENXML_EXCEL("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "xlsx"),
	APPLICATION_OPENXML_POWERPOINT("application/vnd.openxmlformats-officedocument.presentationml.presentation", "pptx"),
	
	// Applications > Open Office
	APPLICATION_ODF_TEXT("application/vnd.oasis.opendocument.text", "odt"),
	APPLICATION_ODF_SPREADSHEET("application/vnd.oasis.opendocument.spreadsheet", "ods"),
	APPLICATION_ODF_PRESENTATION("application/vnd.oasis.opendocument.presentation", "odp"),
	APPLICATION_ODF_CHART("application/vnd.oasis.opendocument.chart", "odc"),
	
	// Text
	TEXT_PLAIN("text/plain", "plain"),
	TEXT_CSS("text/css", "css"),
	TEXT_CSV("text/csv", "csv"),
	TEXT_HTML("text/html", "html", Lists.newArrayList("htm")),
	TEXT_CALENDAR("text/calendar", "ics"),
	
	// Images
	IMAGE_ANY("image/*"),
	IMAGE_GIF("image/gif", "gif"),
	IMAGE_JPEG("image/jpeg", Lists.newArrayList("image/pjpeg"), "jpg", Lists.newArrayList("jpe", "jpeg")),
	IMAGE_PNG("image/png", Lists.newArrayList("image/x-png"), "png"),
	IMAGE_TIFF("image/tiff", "tif", Lists.newArrayList("tiff")),
	IMAGE_X_ICON("image/x-icon", "ico"),
	IMAGE_SVG("image/svg+xml", "svg"),
	IMAGE_BMP("image/x-ms-bmp", "bmp"),
	IMAGE_JPEG2000("image/jp2", "jp2"),
	IMAGE_PSD("image/x-photoshop", "psd"),
	
	// Video
	VIDEO_ANY("video/*"),
	
	// Audio
	AUDIO_ANY("audio/*")
	;

	private String primaryMimeType;
	
	private List<String> additionalMimeTypes = Lists.newArrayListWithExpectedSize(2);
	<commit_msg>MediaType : ajout de text/javascript et text/json.<commit_after>package fr.openwide.core.commons.util.mime;

import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;

import com.google.common.collect.Lists;

public enum MediaType {
	
	// Applications
	APPLICATION_OCTET_STREAM("application/octet-stream"),
	APPLICATION_JAVASCRIPT("application/javascript", "js"),
	APPLICATION_XML("application/xml", "xml"),
	APPLICATION_JSON("application/json", "json"),
	APPLICATION_ZIP("application/zip", "zip"),
	APPLICATION_RAR("application/rar", "rar"),
	APPLICATION_7Z("application/x-7z-compressed", "7z"),
	APPLICATION_TAR_GZ("application/x-tgz", "tar.gz"),
	APPLICATION_KML("application/vnd.google-earth.kml+xml", "kml"),
	APPLICATION_KMZ("application/vnd.google-earth.kmz", "kmz"),
	APPLICATION_GPX("application/gpx+xml", "gpx"),
	APPLICATION_PDF("application/pdf", "pdf"),
	APPLICATION_SWF("application/x-shockwave-flash", "swf"),
	
	// Applications > MS Office
	APPLICATION_MS_WORD("application/msword", "doc"),
	APPLICATION_MS_EXCEL("application/vnd.ms-excel", "xls"),
	APPLICATION_MS_POWERPOINT("application/vnd.ms-powerpoint", "ppt"),
	
	APPLICATION_OPENXML_WORD("application/vnd.openxmlformats-officedocument.wordprocessingml.document", "docx"),
	APPLICATION_OPENXML_EXCEL("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "xlsx"),
	APPLICATION_OPENXML_POWERPOINT("application/vnd.openxmlformats-officedocument.presentationml.presentation", "pptx"),
	
	// Applications > Open Office
	APPLICATION_ODF_TEXT("application/vnd.oasis.opendocument.text", "odt"),
	APPLICATION_ODF_SPREADSHEET("application/vnd.oasis.opendocument.spreadsheet", "ods"),
	APPLICATION_ODF_PRESENTATION("application/vnd.oasis.opendocument.presentation", "odp"),
	APPLICATION_ODF_CHART("application/vnd.oasis.opendocument.chart", "odc"),
	
	// Text
	TEXT_PLAIN("text/plain", "plain"),
	TEXT_CSS("text/css", "css"),
	TEXT_CSV("text/csv", "csv"),
	TEXT_HTML("text/html", "html", Lists.newArrayList("htm")),
	TEXT_CALENDAR("text/calendar", "ics"),
	TEXT_JAVASCRIPT("text/javascript", "js"),
	TEXT_JSON("text/json", "json"),
	
	// Images
	IMAGE_ANY("image/*"),
	IMAGE_GIF("image/gif", "gif"),
	IMAGE_JPEG("image/jpeg", Lists.newArrayList("image/pjpeg"), "jpg", Lists.newArrayList("jpe", "jpeg")),
	IMAGE_PNG("image/png", Lists.newArrayList("image/x-png"), "png"),
	IMAGE_TIFF("image/tiff", "tif", Lists.newArrayList("tiff")),
	IMAGE_X_ICON("image/x-icon", "ico"),
	IMAGE_SVG("image/svg+xml", "svg"),
	IMAGE_BMP("image/x-ms-bmp", "bmp"),
	IMAGE_JPEG2000("image/jp2", "jp2"),
	IMAGE_PSD("image/x-photoshop", "psd"),
	
	// Video
	VIDEO_ANY("video/*"),
	
	// Audio
	AUDIO_ANY("audio/*")
	;

	private String primaryMimeType;
	
	private List<String> additionalMimeTypes = Lists.newArrayListWithExpectedSize(2);
	
{'fraction_non_alphanumeric': 0.1793900018047284, 'fraction_numerical': 0.003609456776755098, 'mean_word_length': 7.296407185628743, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 16}, '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': '5331662', 'n_tokens_mistral': 2142, 'n_tokens_neox': 1974, 'n_words': 239}