1 package org.textmining.text.extraction; 2 3 import java.io.*; 4 12 13 class Test 14 { 15 16 public Test() 17 { 18 } 19 public static void main(String [] args) 20 { 21 try 22 { 23 WordExtractor extractor = new WordExtractor(); 24 String s = extractor.extractText(new FileInputStream(args[0])); 25 System.out.println(s); 26 OutputStreamWriter out = new OutputStreamWriter(new FileOutputStream("C:\\test.txt"), "UTF-16LE"); 27 out.write(s); 28 out.flush(); 29 out.close(); 30 } 31 catch (Exception e) 32 { 33 e.printStackTrace(); 34 } 35 } 36 } | Popular Tags |