Hi Oliver,
first of all, thank you for your quick reply.

On 6 November 2011 09:50, Olivier Grisel <[email protected]> wrote:
> 2011/11/6 Paolo Castagna <[email protected]>:
>> Hi,
>> I have never used Apache Stanbol and I'd like to try it with a small
>> HelloWorld Java example to learn how to interact/use Stanbol
>> programmatically rather than via REST / HTTP. Is it possible?
>>
>> I found a list of interesting "Enhancement Engines" [1], can someone
>> help me (or point me at if there is one) to write a small HellWorld
>> Java example with Stanbol?
>>
>> Let's say I have some text and I want to try the "Named Entity
>> Extraction Enhancement Engine" or the "Named Entity Tagging Engine"
>> how do I do this with a Java program (not via REST / HTTP)?
>
> Hi Paolo,
>
> There is no such documentation yet unfortunately.

I don't mind, is there some code example or unit test somewhere I could
look at to see how to use one of the "Enhancement Engines"?

> In order to achieve
> this you will have to startup a felix runtime (or any other OSGi
> runtime such as Eclipse Equinox for instance) and deploy the
> InMemoryJobManager, the engines you mention, the entityhub and the
> dbpedia referenced site configuration and their dependencies (you have
> the exact list of bundles in the list.xml file of the stable
> launcher), then wrap your text into a content item and use the job
> manager.

Is it possible to add a dependency to one or more Stanbol modules and
avoid using an OSGi runtime (such Apache Felix and/or Eclipse Equinox)?

> We should definitely write an "embedding Stanbol in a Java
> application" how to but this has not been done yet.

Or just one small/short Hello World Stanbol Java examples people can look
at to start using Stanbol in 2 minutes.

>
>> PS:
>> I had a quick look at the sources, there are many modules [2]... is
>> there a map?
>> By the way, I checked Stanbol out and I was able to install it (via
>> mvn clean install... 24 minutes :-)), but mvn package failed for me.
>
> What kind of error did you get? Which version of mvn are you using?

I was using Maven v2.2.1.
I noticed that after I run mvn clean install, if I run mvn clean package it
works (probably because some necessary artifact in this case is already
in my Maven local repository.
However, if your cache does not have any org.apache.stanbol artifact
in it, when I run mvn clean package I get this error:

Missing:
----------
1) 
org.apache.stanbol:org.apache.stanbol.commons.stanboltools.datafileprovider:jar:0.9.0-incubating-SNAPSHOT

[...]

  Path to dependency:
        1) 
org.apache.stanbol:org.apache.stanbol.commons.solr.core:bundle:0.9.0-incubating-SNAPSHOT
        2) 
org.apache.stanbol:org.apache.stanbol.commons.stanboltools.datafileprovider:jar:0.9.0-incubating-SNAPSHOT

This is not really important, I can work around that using mvn clean install.

But, I'd really like to run a first Hello World example with Stanbol from
Java. That will get me started and I can learn the rest myself.

Thanks,
Paolo

>
> --
> Olivier
> http://twitter.com/ogrisel - http://github.com/ogrisel
>

Reply via email to