<commit_before>/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package summarizer;

//import org.opencompare.MyPCMPrinter;

import org.opencompare.api.java.*;
import org.opencompare.api.java.impl.io.KMFJSONLoader;
import org.opencompare.api.java.io.PCMLoader;

import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.List;


/**
 *
 * @author NOYAF-PC
 */
public class Main {

    public static void main(String[] args) throws IOException {
        // Define a file representing a PCM to load
        File pcmFile = new File("pcms/example.pcm");
        //File pcmFile = new File("pcms/model/Comparison_of_Macintosh_models_1.pcm");
        
        PCMLoader loader = new KMFJSONLoader();
        List<PCMContainer> pcmContainers = loader.load(pcmFile);        
        PCM pcm = pcmContainers.get(0).getPcm(); //Rcupre le PCM
        
        //Begin format
        StringBuilder builder = new StringBuilder();
        builder.append("{ \"features\": [ ");
        
        for(Feature feature: pcm.getConcreteFeatures()){
            
            List<Cell> cells = feature.getCells(); //Rcupre l'ensemble des cellules de ce feature (domaine)
            Filtre filtre = new FiltreImpl();
            Regle regle = new Regle(cells);
                        
            //Construction du feature
            builder.append("{\"nom\": \"").append(feature.getName()).append("\",");
            builder.append("\"types\": [ ");
            <commit_msg>Résolution du problème de virgule en trop<commit_after>/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package summarizer;

//import org.opencompare.MyPCMPrinter;

import org.opencompare.api.java.*;
import org.opencompare.api.java.impl.io.KMFJSONLoader;
import org.opencompare.api.java.io.PCMLoader;

import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.List;


/**
 *
 * @author NOYAF-PC
 */
public class Main {

    public static void main(String[] args) throws IOException {
        // Dfinition du chemein d'accs au fichier pcm  manipuler
        File pcmFile = new File("pcms/example.pcm");
        //File pcmFile = new File("pcms/model/Comparison_of_Macintosh_models_1.pcm");
        
        PCMLoader loader = new KMFJSONLoader();
        List<PCMContainer> pcmContainers = loader.load(pcmFile);        
        PCM pcm = pcmContainers.get(0).getPcm(); //Rcupre le PCM
        
        //Begin format
        StringBuilder builder = new StringBuilder();
        builder.append("{ \"features\": [ ");
        
        for(Feature feature: pcm.getConcreteFeatures()){
            
            List<Cell> cells = feature.getCells(); //Rcupre l'ensemble des cellules de ce feature (domaine)
            Filtre filtre = new FiltreImpl();
            Regle regle = new Regle(cells);
                        
            //Construction du feature
            builder.append("{\"nom\": \"").append(feature.getName()).append("\",");
            builder.append("\"types\": [ ");
            
{'fraction_non_alphanumeric': 0.12100388407529131, 'fraction_numerical': 0.0011951000896325067, 'mean_word_length': 2.4802494802494803, 'pattern_counts': {'":': 6, '<': 7, '<?xml version=': 0, '>': 7, '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': '4209477', 'n_tokens_mistral': 980, 'n_tokens_neox': 965, 'n_words': 254}