Public Query Service

The LAILAPS neurolinguistic query suggestion service provide a RestFul API. It is trained based on a life science corpus, which has more than 1.5 billion terms and their corresponding life science definition. The corpus was trained with PubMed articles and UniProt database descriptions.

The API endpoint URL is:

http://webapps.ipk-gatersleben.de/lailapssuggestion/api/v1/semanticsuggestion/{query}

The RestFul services support the HTTP GET method. The parameter {query} , is the original query for which you want to get suggestions.
The result is returned in JSON format:

{"suggestions":[<suggestions>]}

Example API call
Query for alternatives for "heading date":

http://webapps.ipk-gatersleben.de/lailapssuggestion/api/v1/semanticsuggestion/heading date

JSON result is:

{"suggestions":["ghd7","panicle","tillering","hd3a","qtls controlling"]}

Local Installation

If you want to deploy your own suggestion service, you can follow next steps:
  • 1. Data download: the application may be download from http://dx.doi.org/10.5447/IPK/2016/2 , which includes the trained model file pubmedcorpus_phrase.bin and a java web application lailapssuggestion.war.
  • 2. Java Development Kit (JDK) installation: we strongly recommend you download and install Java SE Development Kit 7( http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html ), and then edit JAVA_HOME to point to where the JDK software is located.
  • 3. Apache Tomcat installation: download the Binary Distributions of version 7.0.X and decompress it to your hard drive.
  • 4. Suggestion service installation: decompress the lailapssuggestion.war file to your hard drive, this step could be done in command line model:
    jar -xvf lailapssuggestion.war
    There you can see a "lailapssuggestion" folder under your current folder. Then, edit the file lailapssuggestion\WEB-INF\classes\application.properties, set the parameter "corpus.location" to your pubmedcorpus_phrase.bin file path;
    corpus.location=/lailaps/pubmedcorpus_phrase_f.bin
    
    then edit the file lailapssuggestion\WEB-INF\classes\log4j.xml, and set the parameter "File"(under the File appender item) to your log file path.
    <appender name="FILE" class="org.apache.log4j.RollingFileAppender">		
    		<param name="maxFileSize" value="1000KB" />
            <param name="maxBackupIndex" value="2" />
            <param name="File" value="/lailaps/lailaps.log" />
            <param name="threshold" value="INFO" />
    		<layout class="org.apache.log4j.PatternLayout">
    			<param name="ConversionPattern" value="%p at (%d{MM/dd/yyyy/HH:mm:ss}) - [%x] %c{1}.%M(%L) | %m%n" />
    		</layout>
    </appender>
    
    The final step is to copy the folder "lailapssuggestion" to the sub folder "webapps" of your Apache Tomcat installation path. Then, go to the sub folder "bin" of your Apache Tomcat installation path, run the command line "startup.bat"(Windows platform) or "sh startup.sh"(Unix platform).
  • Please note :
    1. Please give at least 6GB heap memory to your Java virtual machine, you can find more detail information about how to set Java virtual machine heap memory at here http://docs.oracle.com/cd/E15523_01/web.1111/e13814/jvm_tuning.htm .
    2. The source code of query suggestion service project is available at: https://bitbucket.org/ipk_bit_team/bioescorte-suggestion , this is a Java Maven project, the project can be compiled with the command
    mvn clean compile
    and can be packed as web application with the command
    mvn clean package
    .