poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From IndianAtTech <indianatt...@gmail.com>
Subject Re: Need Help!
Date Mon, 20 Dec 2004 05:36:16 GMT
I suggest you to use Text Mining API which is built from POI libraries only

here is the site link http://www.textmining.org/

here is example

org.textmining.text.extraction.WordExtractor _word;
_word = new org.textmining.text.extraction.WordExtractor();
//initialise the TEXTMINING-POI word object


InputStream      _wordInput = new FileInputStream(strDocName);
String wordTextBuffer = _word.extractText(_wordInput); 
System.out.println(wordTextBuffer);
_wordInput.close(); //close the input stream
_word = null;
_wordInput = null;


Best Regards
Sudhakar


On Mon, 20 Dec 2004 09:57:29 +0800 (CST), rec liu
<recliu2002@yahoo.com.cn> wrote:
> Hello,
> I got some code from intenet. which extrator ms word file to text file.
> i try it in English, it do right. but in case of Chinese characters. it
> will short some.that's to say,only part of content was saved ,part of
> them lost. no matter it short or long file. why? what can i do? my code
> as follows:
> public boolean Extrator(){
> try
> {
> file = new WordDocument(fileName);
> 
> //Writer out = new BufferedWriter(new FileWriter(outFileName));
> Writer out = new OutputStreamWriter(new
> FileOutputStream(outFileName),"utf-8");
> file.writeAllText(out);
> 
> //file.closeDoc();
> out.flush();
> out.close();
> } catch(Throwable t){
> t.printStackTrace();
> return false;
> }
> return true;
> }
> }
> thanks.
> jack
> 
> 
> ---------------------------------
> Do You Yahoo!?
> 150万曲MP3疯狂搜,带您闯入音乐殿堂
> 美女明星应有尽有,搜遍美图、艳图和酷图
> 1G就是1000兆,雅虎电邮自助扩容!
>

---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-user-help@jakarta.apache.org


Mime
View raw message