You are viewing the PKP Support Forum | PKP Home Wiki

Lucene integration (text-extraction and stemming)

OJS development discussion, enhancement requests, third-party patches and plug-ins.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
Developer Resources:

Documentation: The OJS Technical Reference and the OJS API Reference are both available from the OJS Documentation page.

Git: You can access our public Git Repository here. Comprehensive Git usage instructions are available on the wiki.

Bugzilla: You can access our Bugzilla report tracker here.

Search: You can use our Google Custom Search to search across our main website, the support forum, and Bugzilla.

Questions and discussion are welcome, but if you have a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a technical support question, try the OJS Technical Support subforum.

Lucene integration (text-extraction and stemming)

Postby libranto » Sat May 29, 2010 1:05 am

Hi dear contributors,

I need to integrate Lucene search capabilities to my journal management system. As you know, Lucene has PHP port but it is not enough to develop sufficient IR systems. I think, some core components ara missing on Php side :( Frist, you need to extract text from various media formats (.doc, pdf, html. etc.). Second and very important issiue is stemming capabilities (improves ~ %40 retrieval performans for small repositories) from many languages. For those reasons you need to use 3rd part tools or to convert 3rd part tools to php but i think first solution is fast and easy to implement.

I want to develope a jar file gets some parameters (file path, language, status (insert, update or delete), journalid, dc contents etc.) from console. First, jar file will use Apache Tika (text-extraction library consists of many text and metadata extraction libraries, such as pdfbox etc.) for text extraction from various media formats. Then, will entegrate hard stemming algorithms for various languages. This jar file also will create and update Lucene index. Your programming language is not important just create an index and search this index with other Lucene ports. I want to use Lucene Php port on search side (again, need to use jar file for stemming search words/tokens on Php side).

But I have some problems. If i develope core IR system wiht java, some of application hosting organizations (for example some of universities) will ban exec function or jar execution because of security reasons! So, i will write once, but not run everywhere :( I'm not a Php expert, this will be my first experiment. So, i need your knowlegde. Is there any different ways for exracting text from various media formats and stemming algorithms library consists of different languages for php? Or free webservice handles this issiues? Which tools PKP developers are using for not facing this problems?

Thanks time and consideration,
Posts: 3
Joined: Fri May 28, 2010 10:13 pm

Re: Lucene integration (text-extraction and stemming)

Postby asmecher » Sat May 29, 2010 6:43 am

Hi libranto,

We do have plans to integrate with Lucene -- they are still in planning, but this is a definite goal. We do have some experience with the Zend Framework port of Lucene to PHP, but as you note, it's not currently complete enough to offer a full replacement for Lucene/SOLR.

Text extraction from media formats is already supported by OJS in the form of external tools. These are configured in the config.inc.php file by MIME type and generally work quite well.

I'm not familiar with a good implementation of the more complex text manipulation operations such as stemming in PHP; I suspect Java-land libraries are the best way to go for these features.

Because of the difficulty in finding a host that will support both PHP and Java, we'll support these features as options for those who need them, but will also continue to support PHP-only basic indexing and searching features.

Alec Smecher
Public Knowledge Project Team
Posts: 9922
Joined: Wed Aug 10, 2005 12:56 pm

Return to OJS Development

Who is online

Users browsing this forum: No registered users and 3 guests