OpenOffice可以从控制台计算字数吗?

ddj*_*kic 5 console openoffice.org word-count

我有一个小问题,我需要在控制台中计算字数以阅读doc,docx,pptx,ppt,xls,xlsx,odt,pdf等...所以不要建议我| wc -w或grep,因为它们仅与文本或控制台输出一起使用,并且它们仅计算空格,并且在日语,中文,阿拉伯语,印度教,希伯来语中,它们使用不同的分隔符,因此单词计数错误,我尝试对此进行计数

pdftotext file.pdf -| wc -w
/usr/local/bin/docx2txt.pl < file.docx | wc -w
/usr/local/bin/pptx2txt.pl < file.pptx | wc -w
antiword file.doc -| wc -w 
antiword file.word -| wc -w
Run Code Online (Sandbox Code Playgroud)

在某些情况下,microsoft单词,openoffice悲伤的1000个单词,并且如果语言为(日语,中文,印度语...),则计数器返回10或300个单词,但是如果我使用普通字符,那么我没有问题,那么最大的错误是某些情况下,少3个字符的女巫是“ OK”

我尝试使用soffice,openoffice进行转换,然后尝试WC -w,但是我什至无法进行转换,

soffice --headless --nofirststartwizard --accept=socket,host=127.0.0.1,port=8100; --convert-to pdf some.pdf /var/www/domains/vocabridge.com/devel/temp_files/23/0/??_1000_words_Docx.docx 
Run Code Online (Sandbox Code Playgroud)

要么

 openoffice.org  --headless  --convert-to  ........
Run Code Online (Sandbox Code Playgroud)

要么

openoffice.org3 --invisible 
Run Code Online (Sandbox Code Playgroud)

因此,如果有人知道任何可以正确计数的方法或使用openoffice或其他任何内容或Linux通过控制台显示文档统计信息,请共享它

谢谢。