Custom Extractor in SPARQL

Hi there,

How to use custom extractor in SPARQL?
What IRI to prescribe for this Extractor?

prefix docs: tag:stardog:examples:docs:

?obj :text ?someText.
service docs:WordCountExtractor {
[] docs:text ?someText;
tag:stardog:example:wordcount ?wordcount.

Thank. I apologize for my knowledge of the language.


The word count extractor is an example of an extractor in Stardog BITES framework. BITES works on files ingested by the BITES API, not on SPARQL query results. Although we do support calling named entity recognition as a SPARQL service, this is not possible with other BITES extractors.

If you have already ingested a document with BITES using the word count extractor, you can query the extracted RDF which is contained in a named graph for each document. The following query will return all BITES documents and their word count:

select *
  graph ?g {
    ?doc <tag:stardog:example:wordcount> ?wordCount

Hope this helps,

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.