private CSVParams getOverride(Metadata metadata, TextAndCSVConfig textAndCSVConfig) {
        String override = metadata.get(TikaCoreProperties.CONTENT_TYPE_USER_OVERRIDE);
        if (override == null) {
            return new CSVParams();
        }
        MediaType mediaType = MediaType.parse(override);
        if (mediaType == null) {
            return new CSVParams();
        }
        String charsetString = mediaType.getParameters().get(CHARSET);
        Charset charset = null;
        if (charsetString != null) {
            try {
                charset = Charset.forName(charsetString);
            } catch (UnsupportedCharsetException e) {
                //swallow
            }
        }
        if (!isCSVOrTSV(mediaType)) {
            return new CSVParams(mediaType, charset);
        }

        String delimiterName = mediaType.getParameters().get(DELIMITER);
        if (delimiterName == null) {
            return new CSVParams(mediaType, charset);
        }
        if (textAndCSVConfig.getNameToDelimiterMap().containsKey(delimiterName)) {
            return new CSVParams(mediaType, charset,
                    (char) textAndCSVConfig.getNameToDelimiterMap().get(delimiterName));
        }
        if (delimiterName.length() == 1) {
            return new CSVParams(mediaType, charset, delimiterName.charAt(0));
        }
        //TODO: log bad/unrecognized delimiter string
        return new CSVParams(mediaType, charset);
    }
minimum confidence score that there's enough
evidence to determine csv/tsv vs. txt
tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-text-module/src/main/java/org/apache/tika/parser/csv/TextAndCSVParser.java