public static void main(String[] args) {
        
        if(args.length==0) {
            args= new String[2];
            
            args[0] = "-i";
            args[1] = "/home/xavi/file.xml";
            
        }
        
        CmdOptionTester optionTester = new CmdOptionTester();
        CmdOptions parser = new CmdOptions();

        Option oinput = parser.addStringOption('i', "input");
        Option ometadata = parser.addBooleanOption('m', "metadata");
//        Option oformat = parser.addStringOption('f', "format");
        Option ooutdir = parser.addStringOption('o', "output");
        
        try {
            parser.parse(args);
        } catch (IllegalOptionValueException ex) {
            Logger.getLogger(Corpus2Moses.class.getName()).log(Level.SEVERE, null, ex);
        } catch (UnknownOptionException ex) {
            Logger.getLogger(Corpus2Moses.class.getName()).log(Level.SEVERE, null, ex);
        }
        

        String input = optionTester.testFile(parser, oinput, false, false, true);
        boolean withMetadata = optionTester.testBoolean(parser, ometadata);
        //String format = (String) parser.getOptionValue(oformat, "word");

        Corpus2Moses c = new Corpus2Moses();
        c.setOutput(null);
        if (withMetadata) {
            c.withMetadata();
        }

        //c.setFormat(format);
        c.getText(input);
    }