Skip to main content

APACHE STANBOL

Apache Stanbol - Website  - https://stanbol.apache.org/docs/trunk/tutorial.html

Stanbol helps to model a semantic relationship around NLP. Given a document it can find the main concepts like NER and gives link to these entities into DBPedia or Enterprise database.

The steps to follow to use Stanbol :

1) Use RESTFul aPI
2) Use Java API

Using RestFul API
----------------------------------

Step 1: export MAVEN_OPTS="-Xmx1024M -XX:MaxPermSize=256M"
Step 2 : svn co http://svn.apache.org/repos/asf/stanbol/trunk stanbol
Step 3:  mvn clean install (From downloaded stanbol directory)
Step 4: java -Xmx1g -jar stable/target/org.apache.stanbol.launchers.stable-{snapshot-version}-SNAPSHOT.jar (give your corresponding stanbol jar name)
Step 5 : Open http://localhost:8080in web browser
Step 6 : The stanbol options are available now. For ex. enhancer we can use as we click on that and give a text , we will get the corresponding NERs and its related DBPedia links.

Otherwise Step 7 : curl -X POST -H "Accept: text/turtle" -H "Content-type: text/plain" \ --data "The Stanbol enhancer can detect famous cities such as Paris and people such as Bob Marley." \ http://localhost:8080/enhancer

We will get the results.


Java API :
----------------
We can download and integrate Apache Stanbol Client API into Java from
https://github.com/zaizi/apache-stanbol-client .


after downloading the file and unzipping import into eclipse as java maven project. The we can use the enhance from the code below :

public class Sample {

public static void main(String[] args) throws StanbolServiceException, StanbolClientException  {
    Sample sample = new Sample();
    sample.SimpleContentEnhancement();
}

public void SimpleContentEnhancement() throws StanbolServiceException, StanbolClientException{
    final StanbolClientFactory factory = new StanbolClientFactory("http://localhost:8080");
    final Enhancer client = factory.createEnhancerClient();
    EnhancerParameters parameters = EnhancerParameters.
                builder().
                buildDefault("Paris is the capital of France");
    EnhancementStructure eRes = client.enhance(parameters);
    eRes.getBestAnnotations();

    for(TextAnnotation ta: eRes.getTextAnnotations()){
        System.out.println("********************************************");
        System.out.println("Selection Context: " + ta.getSelectionContext());
        System.out.println("Selected Text: " + ta.getSelectedText());
        System.out.println("Engine: " + ta.getCreator());
        System.out.println("Candidates: ");
        for(EntityAnnotation ea:eRes.getEntityAnnotations(ta))
              System.out.println("\t" + ea.getEntityLabel() + " - " + ea.getEntityReference());
    }
}
}



(U can refer to the actual documents in this link : -
https://github.com/zaizi/apache-stanbol-client )


The above pgm will give the output as : -



 

 


 




Comments

Popular posts from this blog

A Rule Based Question Answering System in Malayalam corpus Using Vibhakthi and POS Tag Analysis

INTRODUCTION The main goal of Question Answering system is to process requests in natural language form and to provide the accurate short answers to them. Most of the web Browsers we are using today handles QA tasks as information retrieval. So instead of retrieving the precise answers we get all documents similar to our query. Rather than keyword based queries natural language expressions would be processed by efficient QA systems. Mainly there are two types of QA systems: closed domain question answering systems and open domain question answering system . Also questions can be of different forms: factoid, list, definition, description . Here we focus on factoid type question answering. In Malayalam no efficient question answering systems exist now. Other than keyword processing we need natural language processing techniques for the QA system in Malayalam. Hence this work is important in Malayalam NLP related works. Importance of Karaka Thoery and Vibhakthis for Indian Language ...

List of Computer Vision APIs

Computer Vision APIs Different computer vision tools and APIs are : Google CV Watson VR Amazon R Microsoft CV Clarif.ai Cloudsight Scale https://www.scaleapi.com/image-annotation Imagga vize.ai https://vize.ai/ http://www.recognize.im/ Moodstocks ( http://www.moodstocks.com/pricing/ ) * Kooaba ( http://www.kooaba.com/en/plans_a... ) * IQ Engines ( https://www.iqengines.com/pricing/ ) * LTU technologies ( http://www.ltutech.com/ ) Camfind - Image recognition back-end for the popular app CamFind. Take advantage of the leading image recognition platform through an easy to use web API. Recognize API | Mashape - Vufind Recognize is a real-time image recognition API for classification and monetization of photos and videos. Recognize uses object recognition to uncover meaning and metadata of photos and videos for contextual image commerce and advertising. Kooaba - Our cloud-based image recognition solutions mak...