public static void main(String[] args) throws Exception {

        String inputPath = "./data/training.txt";
        if(args.length > 0){
            inputPath = args[0];
        }

        List<String> lines = FileUtils.readLines(new File(inputPath));

        long start = System.currentTimeMillis();
        for (int i = 0; i+3 < lines.size(); i+=4) {
            Query view = new Query(lines.get(i+1).getBytes());
            Query query = new Query(lines.get(i+2).getBytes());
            ContainmentProblem problem = new ContainmentProblem(query, view, lines.get(i+3));
            if(problem.shouldMatch != -1){
                boolean expectedResult = problem.shouldMatch == 0;
                System.out.println(lines.get(i));
                boolean result = problem.containsNaive();
                if(result != expectedResult ){
                    System.out.println(String.format("view  %s\nquery %s\nexpected %s got %s",view, query,expectedResult, result));
                }

            } else {
//                System.out.println(lines.get(i));
                System.out.println(problem.containsNaive());
            }
        }
        System.out.println((System.currentTimeMillis()-start)+" ms");


    }