public static void main(String[] args) {
        if (args.length == 0) {

            Lexicon2Synonims l = new Lexicon2Synonims();
            l.setOutput(null);
            l.getText("/home/xavi/extraction/out.xml");
        } else {


            CmdOptionTester optionTester = new CmdOptionTester();
            CmdOptions parser = new CmdOptions();

            Option oinput = parser.addStringOption('i', "input");
            Option olemma = parser.addBooleanOption('l',"lemma");

            try {
                parser.parse(args);
            } catch (IllegalOptionValueException ex) {
                Logger.getLogger(AttestedGTSorter.class.getName()).log(Level.SEVERE, null, ex);
            } catch (UnknownOptionException ex) {
                Logger.getLogger(AttestedGTSorter.class.getName()).log(Level.SEVERE, null, ex);
            }

            String input = optionTester.testFile(parser, oinput, false, false, true);
            boolean lemma = optionTester.testBoolean(parser, olemma);

            Lexicon2Synonims l = new Lexicon2Synonims();
            l.setOutput(null);
            if(lemma) {
                l.setLemmaBased();
            }
            l.getText(input);
        }


    }