KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > textmining > text > extraction > Test


1 package org.textmining.text.extraction;
2
3 import java.io.*;
4 /**
5  * Title:
6  * Description:
7  * Copyright: Copyright (c) 2003
8  * Company:
9  * @author
10  * @version 1.0
11  */

12
13 class Test
14 {
15
16   public Test()
17   {
18   }
19   public static void main(String JavaDoc[] args)
20   {
21     try
22     {
23       WordExtractor extractor = new WordExtractor();
24       String JavaDoc 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 JavaDoc e)
32     {
33       e.printStackTrace();
34     }
35   }
36 }
Popular Tags