<commit_before>package cn.edu.seu.kse.anubis.lpmln.solver;

import cn.edu.seu.kse.anubis.lpmln.model.SolverStats;
import cn.edu.seu.kse.anubis.lpmln.model.WeightedAnswerSet;
import cn.edu.seu.kse.anubis.util.CommandLineExecute;
import net.sf.json.JSONObject;
import net.sf.json.filters.MappingPropertyFilter;

import java.text.SimpleDateFormat;
import java.util.*;

/**
 * Created by 王彬 on 2016/8/31.
 */
public class BaseSolver {
    protected List<WeightedAnswerSet> weightedAs=null;
    protected List<WeightedAnswerSet> maxWeightAs=null;
    protected String maxWeight;
    protected SolverStats stats;
    protected String executeProfile;
    protected String marginalTime;
    protected String maximalTime;
    protected List<Long> executeTime=new ArrayList<>();
    protected SimpleDateFormat sdf=new SimpleDateFormat("HH:mm:ss.SSSS");

    public List<WeightedAnswerSet> call(String cmd){
        Date enter=new Date();
        String[] cmdres= CommandLineExecute.callShellwithReturn(cmd,0);
        Date cmdExit=new Date();
        List<WeightedAnswerSet> was=solverResultProcess(cmdres[0]);
        weightedAs=was;
        stats=genSolverStatisticsInfo();
        Date exit=new Date();

        StringBuilder sb=new StringBuilder();

        sb.append("进入推理核心时间：").append(sdf.format(enter)).append(System.lineSeparator());
        sb.append("推理机核心调用结束：").append(sdf.format(cmdExit)).append(System.lineSeparator());
        sb.append("推理结果预处理完成：").append(sdf.format(exit)).append(System.lineSeparator());


        executeTime.add(exit.getTime()-enter.getTime());
//        executeTime.add(cmdExit.getTime()-enter.getTime());
//        executeTime.add(exit.getTime()-cmdExit.getTime());<commit_msg>将推理机操作系统改为windows<commit_after>package cn.edu.seu.kse.anubis.lpmln.solver;

import cn.edu.seu.kse.anubis.lpmln.model.SolverStats;
import cn.edu.seu.kse.anubis.lpmln.model.WeightedAnswerSet;
import cn.edu.seu.kse.anubis.util.CommandLineExecute;
import net.sf.json.JSONObject;
import net.sf.json.filters.MappingPropertyFilter;

import java.text.SimpleDateFormat;
import java.util.*;

/**
 * Created by 王彬 on 2016/8/31.
 */
public class BaseSolver {
    protected List<WeightedAnswerSet> weightedAs=null;
    protected List<WeightedAnswerSet> maxWeightAs=null;
    protected String maxWeight;
    protected SolverStats stats;
    protected String executeProfile;
    protected String marginalTime;
    protected String maximalTime;
    protected List<Long> executeTime=new ArrayList<>();
    protected SimpleDateFormat sdf=new SimpleDateFormat("HH:mm:ss.SSSS");

    public List<WeightedAnswerSet> call(String cmd){
        Date enter=new Date();
        String[] cmdres= CommandLineExecute.callShellwithReturn(cmd,1);
        Date cmdExit=new Date();

//        System.out.println("result "+cmdres[0]);
        List<WeightedAnswerSet> was=solverResultProcess(cmdres[0]);
        weightedAs=was;
        stats=genSolverStatisticsInfo();
        Date exit=new Date();

        StringBuilder sb=new StringBuilder();

        sb.append("进入推理核心时间：").append(sdf.format(enter)).append(System.lineSeparator());
        sb.append("推理机核心调用结束：").append(sdf.format(cmdExit)).append(System.lineSeparator());
        sb.append("推理结果预处理完成：").append(sdf.format(exit)).append(System.lineSeparator());


        executeTime.add(exit.getTime()-enter.getTime());
//        executeTime.add(cmdExit.getTime()-enter.getTime());
//        executeTime.add(exit.getTime()-cmdExit.getTime());
{'fraction_non_alphanumeric': 0.13371757925072045, 'fraction_numerical': 0.00547550432276657, 'mean_word_length': 4.259090909090909, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, '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': '3402237', 'n_tokens_mistral': 1154, 'n_tokens_neox': 1151, 'n_words': 165}