public static void main (String[] args) throws FileNotFoundException, IOException { // Process the command-line options CommandOption.setSummary (Classifier2Info.class, "A tool for printing information about saved classifiers."); CommandOption.process (Classifier2Info.class, args); // Print some helpful messages for error cases if (args.length == 0) { CommandOption.getList(Classifier2Info.class).printUsage(false); System.exit (-1); } // Read in the classifier Classifier classifier; try { ObjectInputStream ois = new ObjectInputStream (new FileInputStream (classifierFile.value)); classifier = (Classifier) ois.readObject(); ois.close(); } catch (Exception e) { e.printStackTrace(); throw new IllegalArgumentException ("Couldn't read classifier "+classifierFile.value); } classifier.print (); }
public static void main (String[] args) throws FileNotFoundException, IOException { // Process the command-line options CommandOption.setSummary (Classifier2Info.class, "A tool for printing information about saved classifiers."); CommandOption.process (Classifier2Info.class, args); // Print some helpful messages for error cases if (args.length == 0) { CommandOption.getList(Classifier2Info.class).printUsage(false); System.exit (-1); } // Read in the classifier Classifier classifier; try { ObjectInputStream ois = new ObjectInputStream (new FileInputStream (classifierFile.value)); classifier = (Classifier) ois.readObject(); ois.close(); } catch (Exception e) { e.printStackTrace(); throw new IllegalArgumentException ("Couldn't read classifier "+classifierFile.value); } classifier.print (); }
public static void main (String[] args) throws FileNotFoundException, IOException { // Process the command-line options CommandOption.setSummary (Classifier2Info.class, "A tool for printing information about saved classifiers."); CommandOption.process (Classifier2Info.class, args); // Print some helpful messages for error cases if (args.length == 0) { CommandOption.getList(Classifier2Info.class).printUsage(false); System.exit (-1); } // Read in the classifier Classifier classifier; try { ObjectInputStream ois = new ObjectInputStream (new FileInputStream (classifierFile.value)); classifier = (Classifier) ois.readObject(); ois.close(); } catch (Exception e) { e.printStackTrace(); throw new IllegalArgumentException ("Couldn't read classifier "+classifierFile.value); } classifier.print (); }
.instanceFrom(new Instance(txt, null, null, null))); System.out.println("LABELL " + classification.getLabeling()); c.print();