BITES questions

6 views
Skip to first unread message

Zachary Whitley

unread,
Nov 27, 2016, 12:14:33 PM11/27/16
to Stardog
I just have a couple of quick questions about BITES

The -r flag allows you to specify multiple extractors for "stardog doc put". Are they guaranteed to execute in the given order? It seems like you could make an extractor dependent on the results of a previous extraction and then the results would depend on the order they executed.

I'm guessing that multiple calls to "stardog doc put" with possibly different extractors are additive. Is that correct?

What would you suggest as the best way to pass parameters to an extractor? I can think of a couple of ways but I was wondering if you had a particular one in mind.

Is BITES exposed through the Rest API. I didn't see anything on apiary but I thought I'd ask. It would be cool to be able to post a document to Stardog. I would be easy to throw together a small webapp to do that but I thought I'd check to see if it was already there.

Thanks

--Zach

Jess Balint

unread,
Nov 27, 2016, 1:49:24 PM11/27/16
to sta...@clarkparsia.com

Hey Zach,

On Nov 27, 2016 11:14 AM, "Zachary Whitley" <zachary...@wavestrike.com> wrote:
>
> I just have a couple of quick questions about BITES
>
> The -r flag allows you to specify multiple extractors for "stardog doc put". Are they guaranteed to execute in the given order? It seems like you could make an extractor dependent on the results of a previous extraction and then the results would depend on the order they executed.
>

Iirc they should be executed in the order provided.

> I'm guessing that multiple calls to "stardog doc put" with possibly different extractors are additive. Is that correct?
>

It is not additive. The named graph for a document is cleared at the beginning of the put call.

Will add a feature request for this and give details about the other questions shortly.

Best,
Jess

> What would you suggest as the best way to pass parameters to an extractor? I can think of a couple of ways but I was wondering if you had a particular one in mind.
>
> Is BITES exposed through the Rest API. I didn't see anything on apiary but I thought I'd ask. It would be cool to be able to post a document to Stardog. I would be easy to throw together a small webapp to do that but I thought I'd check to see if it was already there.
>
> Thanks
>
> --Zach
>

> --
> -- --
> You received this message because you are subscribed to the C&P "Stardog" group.
> To post to this group, send email to sta...@clarkparsia.com
> To unsubscribe from this group, send email to
> stardog+u...@clarkparsia.com
> For more options, visit this group at
> http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en

Jess Balint

unread,
Nov 28, 2016, 1:02:22 PM11/28/16
to sta...@clarkparsia.com
On Sun, Nov 27, 2016 at 11:14 AM, Zachary Whitley <zachary...@wavestrike.com> wrote:
I just have a couple of quick questions about BITES

The -r flag allows you to specify multiple extractors for "stardog doc put". Are they guaranteed to execute in the given order? It seems like you could make an extractor dependent on the results of a previous extraction and then the results would depend on the order they executed.

I'm guessing that multiple calls to "stardog doc put" with possibly different extractors are additive. Is that correct?


I've added a new feature request for this as issue #3293.
 
What would you suggest as the best way to pass parameters to an extractor? I can think of a couple of ways but I was wondering if you had a particular one in mind.


It's a good point. Can you share a bit about your requirements and what types of parameters you need? The simplest approach would be to create different extractors for different classes of documents. If you need to pass arbitrary per-document parameters, it is only possible to add them to the index prior to extraction and access them in the extractor.
 
Is BITES exposed through the Rest API. I didn't see anything on apiary but I thought I'd ask. It would be cool to be able to post a document to Stardog. I would be easy to throw together a small webapp to do that but I thought I'd check to see if it was already there.


BITES calls are available through the Rest API. We'll get something up on Apiary shortly. Here are the endpoints:
  • GET      /{db}/docs/{key}    retrieve document
  • GET      /{db}/docs/size     get size of document store
  • POST     /{db}/docs          add documents
  • DELETE   /{db}/docs/{key}    delete document
  • DELETE   /{db}/docs          clear document store
You can add files with curl:
curl -v -u admin:admin -F "upload=@input.pdf;filename=mydocument.pdf" localhost:5820/db/docs

curl -v -u admin:admin -X POST -F upload=@input.pdf localhost:5820/db/docs
    Best,
    Jess
     
    Thanks

    --Zach

    --
    -- --
    You received this message because you are subscribed to the C&P "Stardog" group.
    To post to this group, send email to sta...@clarkparsia.com
    To unsubscribe from this group, send email to

    Zachary Whitley

    unread,
    Nov 29, 2016, 7:43:05 AM11/29/16
    to sta...@clarkparsia.com


    On Nov 28, 2016, at 1:02 PM, Jess Balint <je...@stardog.com> wrote:

    On Sun, Nov 27, 2016 at 11:14 AM, Zachary Whitley <zachary...@wavestrike.com> wrote:
    I just have a couple of quick questions about BITES

    The -r flag allows you to specify multiple extractors for "stardog doc put". Are they guaranteed to execute in the given order? It seems like you could make an extractor dependent on the results of a previous extraction and then the results would depend on the order they executed.

    I'm guessing that multiple calls to "stardog doc put" with possibly different extractors are additive. Is that correct?


    I've added a new feature request for this as issue #3293.

    Cool. Thanks. You can put it way down on the queue though.  I don't have a need but was just getting to know the feature and how it works and was wondering what would happen if you wanted to run additional extractors at a future time. I was also thinking about what it would take to create and manage entire processing pipelines. 

     
    What would you suggest as the best way to pass parameters to an extractor? I can think of a couple of ways but I was wondering if you had a particular one in mind.


    It's a good point. Can you share a bit about your requirements and what types of parameters you need? The simplest approach would be to create different extractors for different classes of documents. If you need to pass arbitrary per-document parameters, it is only possible to add them to the index prior to extraction and access them in the extractor.

    Again , no specific requirements, just dreaming of the possible. I was thinking of what it would take to integrate NIF 


     
    Is BITES exposed through the Rest API. I didn't see anything on apiary but I thought I'd ask. It would be cool to be able to post a document to Stardog. I would be easy to throw together a small webapp to do that but I thought I'd check to see if it was already there.


    BITES calls are available through the Rest API. We'll get something up on Apiary shortly. Here are the endpoints:
    • GET      /{db}/docs/{key}    retrieve document
    • GET      /{db}/docs/size     get size of document store
    • POST     /{db}/docs          add documents
    • DELETE   /{db}/docs/{key}    delete document
    • DELETE   /{db}/docs          clear document store
    You can add files with curl:
    curl -v -u admin:admin -F "upload=@input.pdf;filename=mydocument.pdf" localhost:5820/db/docs
    
    curl -v -u admin:admin -X POST -F upload=@input.pdf localhost:5820/db/docs
    
      Best,
      Jess

      Thanks. I suspected that it would be there ;)

       
      Thanks

      --Zach

      --
      -- --
      You received this message because you are subscribed to the C&P "Stardog" group.
      To post to this group, send email to sta...@clarkparsia.com
      To unsubscribe from this group, send email to
      stardog+unsubscribe@clarkparsia.com
      For more options, visit this group at
      http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en

      --
      -- --
      You received this message because you are subscribed to the C&P "Stardog" group.
      To post to this group, send email to sta...@clarkparsia.com
      To unsubscribe from this group, send email to
      ---
      You received this message because you are subscribed to the Google Groups "Stardog" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to stardog+u...@clarkparsia.com.
      Reply all
      Reply to author
      Forward
      0 new messages