Display SKOS Relations and Properties about Extracted Concepts
Display SKOS Relations and Properties about Extracted Concepts
Note
Whenever you make changes to your PoolParty Thesaurus project, you have to first refresh the extraction model before executing the extractor again.
SKOS Relations
The PoolParty Extractor can also provide more information from the thesaurus about the extracted concepts. The parameters 'useRelatedConcepts', 'useTransitiveBroaderConcepts' and 'useTransitiveBroaderTopConcepts' return the related concepts, all broader concepts and the broader top concepts respectively.
Request
{{url}}/extractor/api/extract?text=Daiquiri is a family of cocktails whose main ingredients are rum, citrus, and sugar or other sweetener.&projectId={{project}}&language=en&numberOfTerms=0&useTransitiveBroaderConcepts=true&useTransitiveBroaderTopConcepts=true&useRelatedConcepts=true
The information is returned under the tags 'relatedConcepts', 'transitiveBroaderConcepts' and 'transitiveBroaderTopConcepts'.
Click to expand the result:
{ "concepts": [ { "id": "1E034541-9963-0001-EE48-B5D068201D43:https://nextrelease-cons.semantic-web.at/cocktails/bab016bd-2fd5-4809-bfe7-3225d25f116d@en", "project": "1E034541-9963-0001-EE48-B5D068201D43", "score": 100, "uri": "https://nextrelease-cons.semantic-web.at/cocktails/bab016bd-2fd5-4809-bfe7-3225d25f116d", "language": "en", "prefLabel": "Daiquiri", "altLabels": [ "Banana daiquiri", "Daiquiris", "Daquiri", "Daikiri", "Banana daikiri", "Daiquiri (cocktail)", "Daquari", "Strawberry daiquiri" ], "conceptSchemes": [ { "uri": "https://nextrelease-cons.semantic-web.at/cocktails/8d052dfc-44bf-4985-8ce3-4564570a161b", "title": "Cocktails" } ], "relatedConcepts": [ "https://nextrelease-cons.semantic-web.at/cocktails/bee1e709-b317-4f46-b06f-a22367baefdf", "https://nextrelease-cons.semantic-web.at/cocktails/60d3a991-48d3-4e73-9d62-5961893fd311", "https://nextrelease-cons.semantic-web.at/cocktails/bca7bc6d-6709-48b8-ae52-fe194c212398" ], "transitiveBroaderConcepts": [ "https://nextrelease-cons.semantic-web.at/cocktails/5ac37bec-e4b9-4d43-9bcc-8d6954903c25", "https://nextrelease-cons.semantic-web.at/cocktails/caae2ea0-7e60-400b-a2bb-14ef79720668", "https://nextrelease-cons.semantic-web.at/cocktails/7516b400-963a-4151-8fdc-f6b23bad1dd5" ], "transitiveBroaderTopConcepts": [ "https://nextrelease-cons.semantic-web.at/cocktails/5ac37bec-e4b9-4d43-9bcc-8d6954903c25", "https://nextrelease-cons.semantic-web.at/cocktails/7516b400-963a-4151-8fdc-f6b23bad1dd5" ], "frequencyInDocument": 1 }, { "id": "1E034541-9963-0001-EE48-B5D068201D43:https://nextrelease-cons.semantic-web.at/cocktails/e98ac9a3-64f3-4cc5-8d0d-cf8684b0e7d1@en", "project": "1E034541-9963-0001-EE48-B5D068201D43", "score": 31, "uri": "https://nextrelease-cons.semantic-web.at/cocktails/e98ac9a3-64f3-4cc5-8d0d-cf8684b0e7d1", "language": "en", "prefLabel": "Rum", "altLabels": [ "Jamaica Spirits", "Gunpowder Rum", "Caña blanca", "Gold rum", "Coconut rum", "Rum (beverage)", "Jamaica Spirit", "Spiced Rum", "Spiced rum", "Cane spirit", "Cuban rum", "Hard rum" ], "conceptSchemes": [ { "uri": "https://nextrelease-cons.semantic-web.at/cocktails/591cf89a-57af-49b8-9042-3fc77408c93e", "title": "Beverages" } ], "transitiveBroaderConcepts": [ "https://nextrelease-cons.semantic-web.at/cocktails/f3000285-36b0-4ffe-af90-740c2dd8fff5", "https://nextrelease-cons.semantic-web.at/cocktails/403d1249-f37f-4f43-bebf-8dde9677d886" ], "transitiveBroaderTopConcepts": [ "https://nextrelease-cons.semantic-web.at/cocktails/f3000285-36b0-4ffe-af90-740c2dd8fff5", "https://nextrelease-cons.semantic-web.at/cocktails/403d1249-f37f-4f43-bebf-8dde9677d886" ], "frequencyInDocument": 1 }, { "id": "1E034541-9963-0001-EE48-B5D068201D43:https://nextrelease-cons.semantic-web.at/cocktails/3c94f5fc-4664-4177-a880-88643c0be9c1@en", "project": "1E034541-9963-0001-EE48-B5D068201D43", "score": 19, "uri": "https://nextrelease-cons.semantic-web.at/cocktails/3c94f5fc-4664-4177-a880-88643c0be9c1", "language": "en", "prefLabel": "Sugar", "altLabels": [ "Sugary", "-Ose", "Shurger", "Sugar crops", "Cube sugar", "Foreign matter in refined sugar", "Sugar lumps", "Molten sugar", "Berry sugar", "Refined sugar", "White refined sugar", "Sugar Crystals", "Sugar trade", "Suggar", "Sweet salt", "Lump sugar", "Raw Sugar", "Sugar buzz", "Sugar cube", "White sugar", "Sugar engineering", "Sugars", "White Sugar" ], "conceptSchemes": [ { "uri": "https://nextrelease-cons.semantic-web.at/cocktails/87384ce8-f20a-4201-b06d-3e0b8d832e5d", "title": "Sweeteners" } ], "frequencyInDocument": 1 } ] }
Custom Types and Properties
Concepts can also have specific RDF types (in addition to the type skos:Concept
that all concepts in a SKOS thesaurus have). This information is returned by the parameter 'useTypes'.
Request
{{url}}/extractor/api/extract?text=Daiquiri is a family of cocktails whose main ingredients are rum, citrus, and sugar or other sweetener.&projectId={{project}}&language=en&useTypes=true&numberOfTerms=0
In the result we can see that 'Daiquiri' is also of the type cocktail, depicted by the URIhttps://nextrelease-cons.semantic-web.at/cocktail-ontology/Cocktail
.
It shows also that 'Sugar' is of types 'Garnish': https://nextrelease-cons.semantic-web.at/cocktail-ontology/Garnish
as well as 'Ingredients'https://nextrelease-cons.semantic-web.at/cocktail-ontology/Ingredients
.
Click to expand the result:
{ "concepts": [ { "id": "1E034541-9963-0001-EE48-B5D068201D43:https://nextrelease-cons.semantic-web.at/cocktails/bab016bd-2fd5-4809-bfe7-3225d25f116d@en", "project": "1E034541-9963-0001-EE48-B5D068201D43", "score": 100, "uri": "https://nextrelease-cons.semantic-web.at/cocktails/bab016bd-2fd5-4809-bfe7-3225d25f116d", "language": "en", "prefLabel": "Daiquiri", "altLabels": [ "Banana daiquiri", "Daiquiris", "Daquiri", "Daikiri", "Banana daikiri", "Daiquiri (cocktail)", "Daquari", "Strawberry daiquiri" ], "conceptSchemes": [ { "uri": "https://nextrelease-cons.semantic-web.at/cocktails/8d052dfc-44bf-4985-8ce3-4564570a161b", "title": "Cocktails" } ], "customSchemeTypes": [ { "uri": "http://www.w3.org/2004/02/skos/core#Concept", "label": "Concept" }, { "uri": "https://nextrelease-cons.semantic-web.at/cocktail-ontology/Cocktail" } ], "frequencyInDocument": 1 }, { "id": "1E034541-9963-0001-EE48-B5D068201D43:https://nextrelease-cons.semantic-web.at/cocktails/e98ac9a3-64f3-4cc5-8d0d-cf8684b0e7d1@en", "project": "1E034541-9963-0001-EE48-B5D068201D43", "score": 31, "uri": "https://nextrelease-cons.semantic-web.at/cocktails/e98ac9a3-64f3-4cc5-8d0d-cf8684b0e7d1", "language": "en", "prefLabel": "Rum", "altLabels": [ "Jamaica Spirits", "Gunpowder Rum", "Caña blanca", "Gold rum", "Coconut rum", "Rum (beverage)", "Jamaica Spirit", "Spiced Rum", "Spiced rum", "Cane spirit", "Cuban rum", "Hard rum" ], "conceptSchemes": [ { "uri": "https://nextrelease-cons.semantic-web.at/cocktails/591cf89a-57af-49b8-9042-3fc77408c93e", "title": "Beverages" } ], "customSchemeTypes": [ { "uri": "https://nextrelease-cons.semantic-web.at/cocktail-ontology/Ingredients" }, { "uri": "https://nextrelease-cons.semantic-web.at/cocktail-ontology/Beverages" }, { "uri": "http://www.w3.org/2004/02/skos/core#Concept", "label": "Concept" }, { "uri": "https://nextrelease-cons.semantic-web.at/cocktail-ontology/Alcoholic-Beverages" } ], "frequencyInDocument": 1 }, { "id": "1E034541-9963-0001-EE48-B5D068201D43:https://nextrelease-cons.semantic-web.at/cocktails/3c94f5fc-4664-4177-a880-88643c0be9c1@en", "project": "1E034541-9963-0001-EE48-B5D068201D43", "score": 19, "uri": "https://nextrelease-cons.semantic-web.at/cocktails/3c94f5fc-4664-4177-a880-88643c0be9c1", "language": "en", "prefLabel": "Sugar", "altLabels": [ "Sugary", "-Ose", "Shurger", "Sugar crops", "Cube sugar", "Foreign matter in refined sugar", "Sugar lumps", "Molten sugar", "Berry sugar", "Refined sugar", "White refined sugar", "Sugar Crystals", "Sugar trade", "Suggar", "Sweet salt", "Lump sugar", "Raw Sugar", "Sugar buzz", "Sugar cube", "White sugar", "Sugar engineering", "Sugars", "White Sugar" ], "conceptSchemes": [ { "uri": "https://nextrelease-cons.semantic-web.at/cocktails/87384ce8-f20a-4201-b06d-3e0b8d832e5d", "title": "Sweeteners" } ], "customSchemeTypes": [ { "uri": "http://www.w3.org/2004/02/skos/core#Concept", "label": "Concept" }, { "uri": "https://nextrelease-cons.semantic-web.at/cocktail-ontology/Garnish" }, { "uri": "https://nextrelease-cons.semantic-web.at/cocktail-ontology/Ingredients" } ], "frequencyInDocument": 1 } ] }
Concepts can have a lot of custom defined information as well. This information is returned by using the parameter 'properties'. You can specify a list of URIs of the properties one wants to see or just specify 'all' to get all information that is available:
Request
{{url}}/extractor/api/extract?text=Daiquiri is a family of cocktails whose main ingredients are rum, citrus, and sugar or other sweetener.&projectId={{project}}&language=en&numberOfTerms=0&properties=all
This custom information has two parts.
Custom attributes are literals (that is, they are just text) and are returned under 'customAttributes'.
Custom relations are links to other concepts in the thesaurus and they are returned under 'customRelations'.
In this example we can see that there is information about the preparation of a cocktail and how it is served (attributes), and which ingredients a cocktail has (relations).
Click to expand the result:
{ "concepts": [ { "id": "1E034541-9963-0001-EE48-B5D068201D43:https://nextrelease-cons.semantic-web.at/cocktails/bab016bd-2fd5-4809-bfe7-3225d25f116d@en", "project": "1E034541-9963-0001-EE48-B5D068201D43", "score": 100, "uri": "https://nextrelease-cons.semantic-web.at/cocktails/bab016bd-2fd5-4809-bfe7-3225d25f116d", "language": "en", "prefLabel": "Daiquiri", "altLabels": [ "Banana daiquiri", "Daiquiris", "Daquiri", "Daikiri", "Banana daikiri", "Daiquiri (cocktail)", "Daquari", "Strawberry daiquiri" ], "conceptSchemes": [ { "uri": "https://nextrelease-cons.semantic-web.at/cocktails/8d052dfc-44bf-4985-8ce3-4564570a161b", "title": "Cocktails" } ], "customRelations": [ { "property": "https://nextrelease-cons.semantic-web.at/cocktail-ontology/uses_2", "object": "https://nextrelease-cons.semantic-web.at/cocktails/021c85c0-a60a-4414-8fd8-bd3383b794f1" }, { "property": "https://nextrelease-cons.semantic-web.at/cocktail-ontology/consists-of", "object": "https://nextrelease-cons.semantic-web.at/cocktails/f5cd2a2b-2153-4b7e-ae79-678b939765ca" }, { "property": "https://nextrelease-cons.semantic-web.at/cocktail-ontology/iba", "object": "http://www.iba-world.com/index.php?option=com_content&id=193&Itemid=532" }, { "property": "https://nextrelease-cons.semantic-web.at/cocktail-ontology/consists-of", "object": "https://nextrelease-cons.semantic-web.at/cocktails/71210bd1-3071-4533-8da4-fe0f7d7694a0" }, { "property": "https://nextrelease-cons.semantic-web.at/cocktail-ontology/consists-of", "object": "https://nextrelease-cons.semantic-web.at/cocktails/88f5de3d-3de4-4a2f-9523-50bc7bb06600" }, { "property": "https://nextrelease-cons.semantic-web.at/cocktail-ontology/image", "object": "http://upload.wikimedia.org/wikipedia/commons/thumb/7/7a/Daiquiri_drink.jpg/440px-Daiquiri_drink.jpg" }, { "property": "https://nextrelease-cons.semantic-web.at/cocktail-ontology/uses", "object": "https://nextrelease-cons.semantic-web.at/cocktails/19dee0d8-fd30-469f-9ecd-91c902ff717c" } ], "customAttributes": [ { "property": "https://nextrelease-cons.semantic-web.at/cocktail-ontology/preparation", "literal": { "label": "Pour all ingredients into shaker with ice cubes. Shake well. Strain in chilled cocktail glass.", "language": "en", "datatype": { "localName": "langString", "namespace": "http://www.w3.org/1999/02/22-rdf-syntax-ns#" } } }, { "property": "https://nextrelease-cons.semantic-web.at/cocktail-ontology/served", "literal": { "label": "Straight up; without ice", "language": "en", "datatype": { "localName": "langString", "namespace": "http://www.w3.org/1999/02/22-rdf-syntax-ns#" } } }, { "property": "http://purl.org/dc/terms/modified", "literal": { "label": "2017-04-26T11:41:00.000Z", "language": null, "datatype": { "localName": "dateTime", "namespace": "http://www.w3.org/2001/XMLSchema#" } } } ], "frequencyInDocument": 1 }, { "id": "1E034541-9963-0001-EE48-B5D068201D43:https://nextrelease-cons.semantic-web.at/cocktails/e98ac9a3-64f3-4cc5-8d0d-cf8684b0e7d1@en", "project": "1E034541-9963-0001-EE48-B5D068201D43", "score": 31, "uri": "https://nextrelease-cons.semantic-web.at/cocktails/e98ac9a3-64f3-4cc5-8d0d-cf8684b0e7d1", "language": "en", "prefLabel": "Rum", "altLabels": [ "Jamaica Spirits", "Gunpowder Rum", "Caña blanca", "Gold rum", "Coconut rum", "Rum (beverage)", "Jamaica Spirit", "Spiced Rum", "Spiced rum", "Cane spirit", "Cuban rum", "Hard rum" ], "conceptSchemes": [ { "uri": "https://nextrelease-cons.semantic-web.at/cocktails/591cf89a-57af-49b8-9042-3fc77408c93e", "title": "Beverages" } ], "customRelations": [ { "property": "https://nextrelease-cons.semantic-web.at/cocktail-ontology/image_3", "object": "http://preview.poolparty.biz/sparqlingCocktails/resources/images/rum.png" }, { "property": "https://nextrelease-cons.semantic-web.at/cocktail-ontology/is-part-of", "object": "https://nextrelease-cons.semantic-web.at/cocktails/4d15a643-f7c7-4ee5-8f56-4ebd2bcf74b5" } ], "customAttributes": [ { "property": "http://purl.org/dc/terms/modified", "literal": { "label": "2017-04-26T11:40:57.000Z", "language": null, "datatype": { "localName": "dateTime", "namespace": "http://www.w3.org/2001/XMLSchema#" } } } ], "frequencyInDocument": 1 }, { "id": "1E034541-9963-0001-EE48-B5D068201D43:https://nextrelease-cons.semantic-web.at/cocktails/3c94f5fc-4664-4177-a880-88643c0be9c1@en", "project": "1E034541-9963-0001-EE48-B5D068201D43", "score": 19, "uri": "https://nextrelease-cons.semantic-web.at/cocktails/3c94f5fc-4664-4177-a880-88643c0be9c1", "language": "en", "prefLabel": "Sugar", "altLabels": [ "Sugary", "-Ose", "Shurger", "Sugar crops", "Cube sugar", "Foreign matter in refined sugar", "Sugar lumps", "Molten sugar", "Berry sugar", "Refined sugar", "White refined sugar", "Sugar Crystals", "Sugar trade", "Suggar", "Sweet salt", "Lump sugar", "Raw Sugar", "Sugar buzz", "Sugar cube", "White sugar", "Sugar engineering", "Sugars", "White Sugar" ], "conceptSchemes": [ { "uri": "https://nextrelease-cons.semantic-web.at/cocktails/87384ce8-f20a-4201-b06d-3e0b8d832e5d", "title": "Sweeteners" } ], "customRelations": [ { "property": "https://nextrelease-cons.semantic-web.at/cocktail-ontology/is-part-of", "object": "https://nextrelease-cons.semantic-web.at/cocktails/1576f08f-5936-4071-b85e-d4e85f31c303" }, { "property": "https://nextrelease-cons.semantic-web.at/cocktail-ontology/is-part-of", "object": "https://nextrelease-cons.semantic-web.at/cocktails/bee1e709-b317-4f46-b06f-a22367baefdf" }, { "property": "https://nextrelease-cons.semantic-web.at/cocktail-ontology/is-used-by_2", "object": "https://nextrelease-cons.semantic-web.at/cocktails/bca7bc6d-6709-48b8-ae52-fe194c212398" }, { "property": "https://nextrelease-cons.semantic-web.at/cocktail-ontology/is-part-of", "object": "https://nextrelease-cons.semantic-web.at/cocktails/fb278b46-3c67-48b0-b9eb-7ea037294f5f" }, { "property": "https://nextrelease-cons.semantic-web.at/cocktail-ontology/is-used-by_2", "object": "https://nextrelease-cons.semantic-web.at/cocktails/236b36df-93ca-4408-836c-133ace53798a" }, { "property": "https://nextrelease-cons.semantic-web.at/cocktail-ontology/is-part-of", "object": "https://nextrelease-cons.semantic-web.at/cocktails/61a18ebf-fd92-4ef1-8ab1-bfd3c26867b9" }, { "property": "https://nextrelease-cons.semantic-web.at/cocktail-ontology/is-part-of", "object": "https://nextrelease-cons.semantic-web.at/cocktails/b33091cd-8c57-45e3-a89b-9de91ffce1e8" } ], "customAttributes": [ { "property": "http://purl.org/dc/terms/modified", "literal": { "label": "2017-06-13T15:05:56.000Z", "language": null, "datatype": { "localName": "dateTime", "namespace": "http://www.w3.org/2001/XMLSchema#" } } } ], "frequencyInDocument": 1 } ] }