dbpediaSpotlight: Download annotations from the DBpedia Spotlight service

Description Usage Arguments Value Examples

Description

Download annotations from the DBpedia Spotlight service

Usage

1
2
dbpediaSpotlight(text, apiURL = "dbpedia", responseFileName = "",
  verbose = TRUE)

Arguments

text

The text to be processed. Character vectors are currently not supported

apiURL

The URL of the API service. By default, the official DBpedia Spotlight API will be used. If "sztaki" is set, then the one hosted by sztaki.hu will be used. A custom URL can be specified as well.

responseFileName

If specified, this will be the file where the json response is saved, otherwise only the data frame will be returned by this function. This file will contain the results of the analysis along with a record of the original text to be parsed.

verbose

Whether curl should be verbose when sending and retrieving the data from the API

Value

A data frame containing information related to the entities extracted from the text.

Examples

1
2
3
4
5
6
library(DBpediaSpotlightR)
dbpediaSpotlight("Berlin was the capital of the Kingdom of Prussia")
dbpediaSpotlight("Berlin was the capital of the Kingdom of Prussia", apiURL="sztaki")
dbpediaSpotlight("Berlin was the capital of the Kingdom of Prussia",
                 apiURL="sztaki",
                 responseFileName="Berlin.json")

cbdavis/DBpediaSpotlightR documentation built on May 13, 2019, 1:49 p.m.