<commit_before>/**
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you 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 org.apache.jena.riot;

import static org.apache.jena.riot.WebContent.contentTypeN3 ;
import static org.apache.jena.riot.WebContent.contentTypeN3Alt1 ;
import static org.apache.jena.riot.WebContent.contentTypeN3Alt2 ;
import static org.apache.jena.riot.WebContent.contentTypeNQuads ;
import static org.apache.jena.riot.WebContent.contentTypeNQuadsAlt1 ;
import static org.apache.jena.riot.WebContent.contentTypeNQuadsAlt2 ;
import static org.apache.jena.riot.WebContent.contentTypeNTriples ;
import static org.apache.jena.riot.WebContent.contentTypeNTriplesAlt ;
import static org.apache.jena.riot.WebContent.contentTypeRDFJSON ;
import static org.apache.jena.riot.WebContent.contentTypeRDFXML ;
import static org.apache.jena.riot.WebContent.contentTypeTriG ;
import static org.apache.jena.riot.WebContent.contentTypeTriGAlt1 ;
import static org.apache.jena.riot.WebContent.contentTypeTriGAlt2 ;
import static org.apache.jena.riot.WebContent.contentTypeTurtle ;
import static org.apache.jena.riot.WebContent.contentTypeTurtleAlt1 ;
import static org.apache.jena.riot.WebContent.contentTypeTurtleAlt2 ;

import java.util.Collection ;
import java.util.Collections ;
import java.util.Locale ;
import java.util.Map ;

import org.apache.jena.atlas.lib.DS ;
import org.apache.jena.atlas.web.ContentType ;

import com.hp.hpl.jena.util.FileUtils ;

/** Central registry of RDF langauges and syntaxes.
 * @see RDFParserRegistry
 */
public class RDFLanguages
{
    // Display names
    public static final String strLangRDFXML     = "RDF/XML" ;
    public static final String strLangTurtle     = "Turtle" ;
    public static final String strLangNTriples   = "N-Triples" ;
    public static final String strLangN3         = "N3" ;
    public static final String strLangRDFJSON    = "RDF/JSON" ;
    public static final String strLangNQuads     = "N-Quads" ;
    public static final String strLangTriG       = "TriG" ;
    
    /** RDF/XML */
    public static final Lang RDFXML   = LangBuilder.create(strLangRDFXML, contentTypeRDFXML)
                                                .addAltNames("RDFXML", "RDF/XML-ABBREV", "RDFXML-ABBREV")
                                                .addFileExtensions("rdf","owl","xml")
                                                .build() ;
    
    /** Turtle */
    public static final Lang TURTLE   = LangBuilder.create(strLangTurtle, contentTypeTurtle)
                                                .addAltNames("TTL")
                                                .addAltContentTypes(contentTypeTurtleAlt1, contentTypeTurtleAlt2)
                                                .addFileExtensions("ttl")
                                                //.addFileExtensions("n3")
                                                .build() ;
    /** Common abbreviation for TURTLE */
    public static final Lang TTL    = TURTLE ;
    
    /** N3 (treat as Turtle) */
    public static final Lang N3   = LangBuilder.create(strLangN3, contentTypeN3)
                                                .addAltContentTypes(contentTypeN3, contentTypeN3Alt1, contentTypeN3Alt2)
                                                .addFileExtensions("n3")
                                                .build() ;
    
    /** N-Triples */
    public static final Lang NTRIPLES = LangBuilder.create(strLangNTriples, contentTypeNTriples)
                                                .addAltNames("NT", "NTriples", "NTriple", "N-Triple", "N-Triples")
                                                .addAltContentTypes(contentTypeNTriplesAlt)
                                                .addFileExtensions("nt")
                                                .build() ;
    /** Common abbreviation for NTRIPLES */
    public static final Lang NT     = NTRIPLES ;

    /** RDF/JSON (this is not JSON-LD) */
    public static final Lang RDFJSON  = LangBuilder.create(strLangRDFJSON, contentTypeRDFJSON)
                                                .addAltNames("RDFJSON")
                                                .addFileExtensions("rj", "json")
                                                .build() ;
    
    /** TriG */
    public static final Lang TRIG     = LangBuilder.create(strLangTriG, contentTypeTriG)
                                                .addAltContentTypes(contentTypeTriGAlt1, contentTypeTriGAlt2)
                                                .addFileExtensions("trig")
                                                .build() ;<commit_msg>Remove .owl as a file extension for RDF/XML.<commit_after>/**
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you 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 org.apache.jena.riot;

import static org.apache.jena.riot.WebContent.contentTypeN3 ;
import static org.apache.jena.riot.WebContent.contentTypeN3Alt1 ;
import static org.apache.jena.riot.WebContent.contentTypeN3Alt2 ;
import static org.apache.jena.riot.WebContent.contentTypeNQuads ;
import static org.apache.jena.riot.WebContent.contentTypeNQuadsAlt1 ;
import static org.apache.jena.riot.WebContent.contentTypeNQuadsAlt2 ;
import static org.apache.jena.riot.WebContent.contentTypeNTriples ;
import static org.apache.jena.riot.WebContent.contentTypeNTriplesAlt ;
import static org.apache.jena.riot.WebContent.contentTypeRDFJSON ;
import static org.apache.jena.riot.WebContent.contentTypeRDFXML ;
import static org.apache.jena.riot.WebContent.contentTypeTriG ;
import static org.apache.jena.riot.WebContent.contentTypeTriGAlt1 ;
import static org.apache.jena.riot.WebContent.contentTypeTriGAlt2 ;
import static org.apache.jena.riot.WebContent.contentTypeTurtle ;
import static org.apache.jena.riot.WebContent.contentTypeTurtleAlt1 ;
import static org.apache.jena.riot.WebContent.contentTypeTurtleAlt2 ;

import java.util.Collection ;
import java.util.Collections ;
import java.util.Locale ;
import java.util.Map ;

import org.apache.jena.atlas.lib.DS ;
import org.apache.jena.atlas.web.ContentType ;

import com.hp.hpl.jena.util.FileUtils ;

/** Central registry of RDF langauges and syntaxes.
 * @see RDFParserRegistry
 */
public class RDFLanguages
{
    // Display names
    public static final String strLangRDFXML     = "RDF/XML" ;
    public static final String strLangTurtle     = "Turtle" ;
    public static final String strLangNTriples   = "N-Triples" ;
    public static final String strLangN3         = "N3" ;
    public static final String strLangRDFJSON    = "RDF/JSON" ;
    public static final String strLangNQuads     = "N-Quads" ;
    public static final String strLangTriG       = "TriG" ;
    
    /** RDF/XML */
    public static final Lang RDFXML   = LangBuilder.create(strLangRDFXML, contentTypeRDFXML)
                                                .addAltNames("RDFXML", "RDF/XML-ABBREV", "RDFXML-ABBREV")
                                                .addFileExtensions("rdf", "xml")
                                                .build() ;
    
    /** Turtle */
    public static final Lang TURTLE   = LangBuilder.create(strLangTurtle, contentTypeTurtle)
                                                .addAltNames("TTL")
                                                .addAltContentTypes(contentTypeTurtleAlt1, contentTypeTurtleAlt2)
                                                .addFileExtensions("ttl")
                                                .build() ;
    /** Common abbreviation for TURTLE */
    public static final Lang TTL    = TURTLE ;
    
    /** N3 (treat as Turtle) */
    public static final Lang N3   = LangBuilder.create(strLangN3, contentTypeN3)
                                                .addAltContentTypes(contentTypeN3, contentTypeN3Alt1, contentTypeN3Alt2)
                                                .addFileExtensions("n3")
                                                .build() ;
    
    /** N-Triples */
    public static final Lang NTRIPLES = LangBuilder.create(strLangNTriples, contentTypeNTriples)
                                                .addAltNames("NT", "NTriples", "NTriple", "N-Triple", "N-Triples")
                                                .addAltContentTypes(contentTypeNTriplesAlt)
                                                .addFileExtensions("nt")
                                                .build() ;
    /** Common abbreviation for NTRIPLES */
    public static final Lang NT     = NTRIPLES ;

    /** RDF/JSON (this is not JSON-LD) */
    public static final Lang RDFJSON  = LangBuilder.create(strLangRDFJSON, contentTypeRDFJSON)
                                                .addAltNames("RDFJSON")
                                                .addFileExtensions("rj", "json")
                                                .build() ;
    
    /** TriG */
    public static final Lang TRIG     = LangBuilder.create(strLangTriG, contentTypeTriG)
                                                .addAltContentTypes(contentTypeTriGAlt1, contentTypeTriGAlt2)
                                                .addFileExtensions("trig")
                                                .build() ;
{'fraction_non_alphanumeric': 0.08116241888460453, 'fraction_numerical': 0.005924950625411455, 'mean_word_length': 1.9473392461197339, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 82, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1790599', 'n_tokens_mistral': 2763, 'n_tokens_neox': 2682, 'n_words': 687}