Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use WikiData / DBpedia as one of data sources #9

Open
macbre opened this issue Mar 14, 2019 · 0 comments
Open

Use WikiData / DBpedia as one of data sources #9

macbre opened this issue Mar 14, 2019 · 0 comments

Comments

@macbre
Copy link
Contributor

macbre commented Mar 14, 2019

Search for entity

https://www.wikidata.org/w/api.php?action=wbsearchentities&search=Lionel%20Messi&language=en&limit=50

"Lionel Messi"
https://www.wikidata.org/wiki/Q615

{
    "searchinfo": {
        "search": "Lionel Messi"
    },
    "search": [
        {
            "repository": "",
            "id": "Q615",
            "concepturi": "http://www.wikidata.org/entity/Q615",
            "title": "Q615",
            "pageid": 899,
            "url": "//www.wikidata.org/wiki/Q615",
            "label": "Lionel Messi",
            "description": "Argentine association football player",
            "match": {
                "type": "label",
                "language": "en",
                "text": "Lionel Messi"
            }
        }
    ]
}

Get an entity

https://www.wikidata.org/w/api.php?action=wbgetentities&sites=enwiki&titles=Lionel%20Messi&languages=en

DBpedia

http://dbpedia.org/page/Lionel_Messi

$ curl -s 'http://dbpedia.org/data/Lionel_Messi.ntriples' | grep -E "height|birth"
<http://dbpedia.org/resource/Lionel_Messi>	<http://dbpedia.org/ontology/birthDate>	"1987-6-24"^^<http://www.w3.org/2001/XMLSchema#date> .
<http://dbpedia.org/resource/Lionel_Messi>	<http://dbpedia.org/ontology/birthPlace>	<http://dbpedia.org/resource/Rosario,_Santa_Fe> .
<http://dbpedia.org/resource/Lionel_Messi>	<http://purl.org/dc/terms/subject>	<http://dbpedia.org/resource/Category:1987_births> .
<http://dbpedia.org/resource/Lionel_Messi>	<http://dbpedia.org/ontology/birthDate>	"1987-06-24"^^<http://www.w3.org/2001/XMLSchema#date> .
<http://dbpedia.org/resource/Lionel_Messi>	<http://dbpedia.org/ontology/height>	"1.7"^^<http://www.w3.org/2001/XMLSchema#double> .
<http://dbpedia.org/resource/Lionel_Messi>	<http://dbpedia.org/ontology/Person/height>	"170.0"^^<http://dbpedia.org/datatype/centimetre> .
@macbre macbre changed the title Use WikiData as one of data sources Use WikiData / DBpedia as one of data sources Mar 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant