Upload folder using huggingface_hub
Browse files- README.md +21 -0
- ies/ood_test.jsonl +11 -0
- ies/pairs_det.jsonl +170 -0
- ies/pairs_ies.jsonl +0 -0
- ies/pairs_refusal.jsonl +40 -0
- multistd/LICENSE +404 -0
- multistd/pairs_multistd.jsonl +0 -0
- scripts/build_multistd.py +79 -0
- scripts/build_refusals.py +71 -0
- scripts/describe_ground.py +136 -0
- scripts/eval_ies.py +122 -0
- scripts/extract_vocab.py +45 -0
- scripts/gen_ies_ground.py +210 -0
- scripts/iesval.py +102 -0
- scripts/vocab.json +0 -0
README.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
tags: [ies4, rdf, turtle, knowledge-graph, instruction-tuning, uk-government]
|
| 4 |
+
---
|
| 5 |
+
# IES4 Turtle Instruct — training data + eval harness
|
| 6 |
+
|
| 7 |
+
Instruction pairs for text -> IES4 (UK Gov Information Exchange Standard) RDF/Turtle, built
|
| 8 |
+
correct-by-construction with telicent-ies-tool and double-validated against the published
|
| 9 |
+
dstl/IES4 ontology. Companion dataset to fabsssss/qwen3-coder-30b-a3b-ies4.
|
| 10 |
+
|
| 11 |
+
- `ies/` — 1,799 IES pairs + refusal/boundary pairs + OOD test (**MIT**; ontology © Crown
|
| 12 |
+
copyright Dstl, MIT licence)
|
| 13 |
+
- `multistd/` — 450 ontology-conditioned extraction pairs derived from Text2KGBench
|
| 14 |
+
(Wikidata-TekGen) — **CC BY-SA 4.0** (see multistd/LICENSE). Attribution:
|
| 15 |
+
Mihindukulasooriya, Tiwari, Enguix, Lata — Text2KGBench, ISWC 2023.
|
| 16 |
+
- `scripts/` — generators, the term-membership + structural-conformance validators, and the
|
| 17 |
+
full eval harness (baseline-vs-tuned; validity / conformance / hallucination / namespace
|
| 18 |
+
fidelity / OOD).
|
| 19 |
+
|
| 20 |
+
Every IES graph passed both telicent validation and an independent term-membership check
|
| 21 |
+
(510 classes, 204 properties). Splits are by target graph (no paraphrase leakage).
|
ies/ood_test.jsonl
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Encode the following scenario as IES4 RDF/Turtle. Use only real IES4 terms, the 4D state/period pattern where relevant, the ies: and data: prefixes, and output only Turtle.\n\nScenario: Vladimir is evaluating three distinct scenarios involving a Distributed Denial of Service attack on Acme Inc., where Barry and Fred act as perpetrators in different combinations. He assigns a high confidence level to the first scenario, medium confidence to the second, and low confidence to the third. Each scenario represents a possible world where these individuals participate in the hacking incident. Vladimir acts as the sole assessor for all three evaluations."}, {"role": "assistant", "content": "@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .\n@prefix ies: <http://ies.data.gov.uk/ontology/ies4#> .\n@prefix data: <http://data.gov.uk/testdata#> .\n\ndata:Scenario1 a ies:PossibleWorld .\ndata:Scenario2 a ies:PossibleWorld .\ndata:Scenario3 a ies:PossibleWorld .\ndata:Vladimir a ies:Person .\ndata:Barry a ies:Person .\ndata:Fred a ies:Person .\ndata:ddosAttackOnAcmeInc a ies:Hacking .\n\ndata:BarHackingS3 ies:isPartOf data:Scenario3 ;\n ies:isParticipantIn data:ddosAttackOnAcmeInc ;\n ies:isParticipationOf data:Barry ;\n a ies:Perpetrator .\n\ndata:BarryHackingS2 ies:isPartOf data:Scenario2 ;\n ies:isParticipantIn data:ddosAttackOnAcmeInc ;\n ies:isParticipationOf data:Barry ;\n a ies:Perpetrator .\n\ndata:FreHackingS3 ies:isPartOf data:Scenario3 ;\n ies:isParticipantIn data:ddosAttackOnAcmeInc ;\n ies:isParticipationOf data:Fred ;\n a ies:Perpetrator .\n\ndata:FredHackingS1 ies:isPartOf data:Scenario1 ;\n ies:isParticipantIn data:ddosAttackOnAcmeInc ;\n ies:isParticipationOf data:Fred ;\n a ies:Perpetrator .\n\ndata:S1Assessment ies:assessed data:Scenario1 ;\n ies:hmlConfidence \"HIGH\" ;\n a ies:AssessToBeTrue .\n\ndata:S1Assessor ies:isParticipantIn data:S1Assessment ;\n ies:isParticipationOf data:Vladimir ;\n a ies:Assessor .\n\ndata:S2Assessment ies:assessed data:Scenario2 ;\n ies:hmlConfidence \"MEDIUM\" ;\n a ies:AssessToBeTrue .\n\ndata:S2Assessor ies:isParticipantIn data:S2Assessment ;\n ies:isParticipationOf data:Vladimir ;\n a ies:Assessor .\n\ndata:S3Assessment ies:assessed data:Scenario3 ;\n ies:hmlConfidence \"LOW\" ;\n a ies:AssessToBeTrue .\n\ndata:S3Assessor ies:isParticipantIn data:S3Assessment ;\n ies:isParticipationOf data:Vladimir ;\n a ies:Assessor ."}]}
|
| 2 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Encode the following scenario as IES4 RDF/Turtle. Use only real IES4 terms, the 4D state/period pattern where relevant, the ies: and data: prefixes, and output only Turtle.\n\nScenario: Fred was born with a mass of 3.0 kilograms, which is also recorded as 6.61 pounds. At a later medical appointment, Fred\u2019s mass was measured to be 25.0 kilograms."}, {"role": "assistant", "content": "@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .\n@prefix ies: <http://ies.data.gov.uk/ontology/ies4#> . \n@prefix data: <http://data.gov.uk/testdata#> .\n@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .\n\ndata:Fred a ies:Person .\ndata:FredBorn ies:isStartOf data:Fred ;\n ies:hasCharacteristic data:Mass1 .\ndata:FredAtMedical ies:isStateOf data:Fred ;\n ies:hasCharacteristic data:Mass2 .\ndata:Pounds a ies:UnitOfMeasure .\n\ndata:Mass1 a ies:Mass ;\n ies:hasValue [ \n a ies:ValueInKilograms ;\n ies:representationValue \"3.0\"^^xsd:decimal \n ] ,\n [ \n a ies:MeasureValue ;\n ies:representationValue \"6.61\"^^xsd:decimal ;\n ies:measureUnit data:Pounds\n ] .\ndata:Mass2 a ies:Mass ;\n ies:hasValue [ \n a ies:ValueInKilograms ;\n ies:representationValue \"25.0\"^^xsd:decimal \n ] ."}]}
|
| 3 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Encode the following scenario as IES4 RDF/Turtle. Use only real IES4 terms, the 4D state/period pattern where relevant, the ies: and data: prefixes, and output only Turtle.\n\nScenario: The data models the 2018 World Cup as a major event comprising four specific matches: Russia versus Croatia, Sweden versus England, England versus Colombia, and England versus Croatia. It establishes a chronological sequence where the kick-off for the Russia-Croatia match occurs first, followed by the start of the Sweden-England match. Furthermore, the England-Croatia match is scheduled to take place after the England-Colombia match, defining the temporal order of these specific fixtures within the tournament."}, {"role": "assistant", "content": "@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .\n@prefix ies: <http://ies.data.gov.uk/ontology/ies4#> . \n@prefix data: <http://data.gov.uk/testdata#> .\n\ndata:World_Cup_2018 a ies:EntertainmentEvent .\ndata:Russia_v_Croatia a ies:EntertainmentEvent ;\n ies:isPartOf data:World_Cup_2018 .\ndata:Sweden_v_England a ies:EntertainmentEvent ;\n ies:isPartOf data:World_Cup_2018 .\ndata:England_v_Colombia a ies:EntertainmentEvent ;\n ies:isPartOf data:World_Cup_2018 .\ndata:England_v_Croatia a ies:EntertainmentEvent ;\n ies:isPartOf data:World_Cup_2018 ;\n ies:after data:England_v_Colombia .\ndata:RusVCroKickOff a ies:BoundingState ;\n ies:isStartOf data:Russia_v_Croatia .\ndata:SweVEngKickOff a ies:BoundingState ;\n ies:isStartOf data:Sweden_v_England ;\n ies:after data:RusVCroKickOff ."}]}
|
| 4 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Encode the following scenario as IES4 RDF/Turtle. Use only real IES4 terms, the 4D state/period pattern where relevant, the ies: and data: prefixes, and output only Turtle.\n\nScenario: Fred, Barry, and Vladimir attended a team meeting that ran from 10:00 to 13:00, with Fred serving as the chair. Fred was present for the entire duration, while Barry arrived on time but left at 10:12. Vladimir arrived late at 10:30 and departed early at 12:30."}, {"role": "assistant", "content": "@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .\n@prefix ies: <http://ies.data.gov.uk/ontology/ies4#> . \n@prefix data: <http://data.gov.uk/testdata#> .\n@prefix iso8601: <http://iso.org/iso8601#> .\n\ndata:Fred a ies:Person .\ndata:Barry a ies:Person .\ndata:Vladimir a ies:Person .\n\ndata:TeamMeeting a ies:Meeting .\ndata:FredInMeeting a ies:MeetingChair ;\n ies:isParticipantIn data:TeamMeeting ;\n ies:isParticipationOf data:Fred .\ndata:BarryInMeeting a ies:Attendance ;\n ies:isParticipantIn data:TeamMeeting ;\n ies:isParticipationOf data:Barry .\ndata:VladInMeeting a ies:Attendance ;\n ies:isParticipantIn data:TeamMeeting ;\n ies:isParticipationOf data:Vladimir .\n\ndata:MeetingStart a ies:BoundingState ;\n ies:inPeriod iso8601:20180723T100000 ;\n ies:isStartOf data:TeamMeeting .\ndata:MeetingEnd a ies:BoundingState ;\n ies:inPeriod iso8601:20180723T130000 ;\n ies:isEndOf data:TeamMeeting .\ndata:FredIntoMeeting a ies:BoundingState ;\n ies:inPeriod iso8601:20180723T100000 ;\n ies:isStartOf data:FredInMeeting .\ndata:FredOutOfMeeting a ies:BoundingState ;\n ies:inPeriod iso8601:20180723T130000 ;\n ies:isEndOf data:FredInMeeting .\ndata:BarryIntoMeeting a ies:BoundingState ;\n ies:inPeriod iso8601:20180723T100000 ;\n ies:isStartOf data:BarryInMeeting .\ndata:BarryOutOfMeeting a ies:BoundingState ;\n ies:inPeriod iso8601:20180723T101200 ;\n ies:isEndOf data:BarryInMeeting .\ndata:VladIntoMeeting a ies:BoundingState ;\n ies:inPeriod iso8601:20180723T103000 ;\n ies:isStartOf data:VladInMeeting .\ndata:VladOutOfMeeting a ies:BoundingState ;\n ies:inPeriod iso8601:20180723T123000 ;\n ies:isEndOf data:VladInMeeting .\n\niso8601:20180723T100000 a ies:ParticularPeriod .\niso8601:20180723T103000 a ies:ParticularPeriod .\niso8601:20180723T101200 a ies:ParticularPeriod .\niso8601:20180723T123000 a ies:ParticularPeriod .\niso8601:20180723T130000 a ies:ParticularPeriod ."}]}
|
| 5 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Encode the following scenario as IES4 RDF/Turtle. Use only real IES4 terms, the 4D state/period pattern where relevant, the ies: and data: prefixes, and output only Turtle.\n\nScenario: Fred Smith, identified by NHS number 12AB3456789, was admitted to bed 101 in Ward 1 at University Hospital starting at 09:00 on January 4, 2014. He underwent a procedure in Theatre A from 19:00 to 21:00 on the same day, after which he remained in bed 101 until 11:00 on January 5, 2014."}, {"role": "assistant", "content": "@prefix \t\t\t\t rdf: \t\t\t\t <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .\n@prefix \t\t\t\t rdfs: \t\t\t\t <http://www.w3.org/2000/01/rdf-schema#> . \n@prefix \t\t\t\t ies: \t\t\t\t <http://ies.data.gov.uk/ontology/ies4#> . \n@prefix \t\t\t\t data: \t\t\t\t <http://data.gov.uk/testdata#> .\n@prefix \t\t\t\t iso8601: \t\t\t <http://iso.org/iso8601#> .\n\ndata:NHS\t\t\t\t a\t \t\t\ties:GovernmentOrganisation .\ndata:nhsNumber\t\t\t a\t\t\t\t ies:NamingScheme .\ndata:fredNHSNum\t\t\t a\t\t\t \ties:NationalIdentityNumber .\ndata:Fred\t\t\t a\t\t \t\ties:Person .\ndata:fredName\t\t\t a\t\t \t\ties:PersonName .\ndata:s1\t\t\t\t a\t\t \t\ties:PersonState .\ndata:s2\t\t\t\t a\t\t \t\ties:PersonState .\ndata:bs1\t\t\t\t a\t\t \t\ties:BoundingState .\ndata:bs2\t\t\t\t a\t\t \t\ties:BoundingState .\ndata:bs3\t\t\t\t a\t\t \t\ties:BoundingState .\ndata:bs4\t\t\t\t a\t\t\t \ties:BoundingState .\ndata:bs5\t\t\t\t a\t\t\t \ties:BoundingState .\ndata:bs6\t\t\t\t a\t\t\t \ties:BoundingState .\ndata:ep1\t\t\t\t a\t\t\t \ties:EventParticipant .\niso8601:20140104T090000 a\t\t\t \ties:ParticularPeriod .\niso8601:20140104T190000 \ta\t\t\t \ties:ParticularPeriod .\niso8601:20140104T210000 \ta\t\t\t \ties:ParticularPeriod .\niso8601:20140105T110000 \ta\t\t\t \ties:ParticularPeriod .\ndata:theatreA\t\t\t a\t\t\t \ties:PartOfFacility .\ndata:UniversityHospital\t\ta\t\t\t \ties:Facility .\ndata:Ward1\t\t\t a\t\t\t \ties:PartOfFacility .\ndata:bed101\t\t\t a\t\t\t\t ies:PartOfFacility .\ndata:bed101\t\t\t a\t\t\t\t data:HospitalBed .\ndata:HospitalBed\t\t\ta\t\t\t\t rdfs:Class .\ndata:HospitalBed \t\t rdfs:subClassOf\t\t\t ies:PartOfFacility .\ndata:nhsNumber\t\t\t ies:schemeOwner\t\t\t data:NHS .\ndata:fredNHSNum\t\t\t ies:inScheme\t\t\t data:nhsNumber .\ndata:fredNHSNum\t\t\t ies:representationValue\t\t\"12AB3456789\" .\ndata:Fred\t\t\t ies:isIdentifiedBy\t\t data:fredNHSNum .\ndata:fredName\t\t\t ies:representationValue\t\t\"Fred Smith\" .\ndata:Fred\t\t\t ies:hasName\t\t\t data:fredName .\ndata:s1\t\t\t\t ies:isStateOf\t\t\t data:Fred .\ndata:s2\t\t\t\t ies:isStateOf\t\t\t data:Fred .\ndata:ep1\t\t\t\t ies:isParticipationOf\t\tdata:Fred .\ndata:bs1\t\t\t\t ies:isStartOf\t\t\t data:s1 .\ndata:bs1\t\t\t ies:inPeriod\t\t\t iso8601:20140104T090000 .\ndata:bs2\t\t\t ies:isEndOf\t\t\t data:s1 .\ndata:bs2\t\t\t\t ies:inPeriod\t\t\t iso8601:20140104T190000 .\ndata:bs3\t\t\t\t ies:isStartOf\t\t\t data:ep1 .\ndata:bs3\t\t\t\t ies:inPeriod\t\t\t iso8601:20140104T190000 .\ndata:bs4\t\t\t\t ies:isEndOf\t\t\t data:ep1 .\ndata:bs4\t\t\t\t ies:inPeriod\t\t\t iso8601:20140104T210000 .\ndata:bs5\t\t\t\t ies:isStartOf\t\t\t data:s2 .\ndata:bs5\t\t\t\t ies:inPeriod\t\t\t iso8601:20140104T210000 .\ndata:bs6\t\t\t\t ies:isEndOf\t\t\t data:s2 .\ndata:bs6\t\t\t\t ies:inPeriod\t\t\t iso8601:20140105T110000 .\ndata:ep1\t\t\t\t ies:inLocation\t\t\t data:theatreA .\ndata:theatreA\t\t\t ies:inLocation \t\t\t data:UniversityHospital .\ndata:Ward1\t\t\t ies:inLocation \t\t\t data:UniversityHospital .\ndata:bed101\t\t\t ies:inLocation \t\t\t data:Ward1 .\ndata:s1\t\t\t\t ies:inLocation \t\t\t data:bed101 .\ndata:s2\t\t\t\t ies:inLocation \t\t\t data:bed101 ."}]}
|
| 6 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Encode the following scenario as IES4 RDF/Turtle. Use only real IES4 terms, the 4D state/period pattern where relevant, the ies: and data: prefixes, and output only Turtle.\n\nScenario: Fred worked for Acme Inc. starting on 5 December 2011 at 08:00 and ending on 7 May 2016 at 17:00."}, {"role": "assistant", "content": "@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .\n@prefix ies: <http://ies.data.gov.uk/ontology/ies4#> . \n@prefix data: <http://data.gov.uk/testdata#> .\n@prefix iso8601: <http://iso.org/iso8601#> .\n\ndata:AcmeInc a ies:Organisation .\ndata:Fred a ies:Person .\ndata:FredState2 a ies:PersonState ;\n ies:isStateOf data:Fred ;\n ies:worksFor data:AcmeInc .\ndata:FredEmployedStart a ies:BoundingState ;\n ies:inPeriod iso8601:20111205T080000 ;\n ies:isStartOf data:FredState2 .\niso8601:20111205T080000 a ies:ParticularPeriod .\ndata:FredEmployedEnd a ies:BoundingState ;\n ies:isEndOf data:FredState2 .\niso8601:20160507T170000 a ies:ParticularPeriod ;\n ies:after data:FredEmployedEnd ."}]}
|
| 7 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Encode the following scenario as IES4 RDF/Turtle. Use only real IES4 terms, the 4D state/period pattern where relevant, the ies: and data: prefixes, and output only Turtle.\n\nScenario: Fred is Barry\u2019s sibling and began working for Acme Inc on 5 December 2011. This employment relationship is represented as a specific state of Fred that started at that precise time. The start date is formally recorded as the beginning of the period during which Fred was employed by the organization."}, {"role": "assistant", "content": "@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .\n@prefix ies: <http://ies.data.gov.uk/ontology/ies4#> . \n@prefix data: <http://data.gov.uk/testdata#> .\n@prefix iso8601: <http://iso.org/iso8601#> .\n\ndata:AcmeInc a ies:Organisation .\ndata:Barry a ies:Person .\ndata:Fred a ies:Person ;\n ies:siblingOf data:Barry .\ndata:FredState2 a ies:PersonState ;\n ies:isStateOf data:Fred ;\n ies:worksFor data:AcmeInc .\ndata:FredEmployedStart a ies:BoundingState ;\n ies:inPeriod iso8601:20111205T080000 ;\n ies:isStartOf data:FredState2 .\niso8601:20111205T080000 a ies:ParticularPeriod ."}]}
|
| 8 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Encode the following scenario as IES4 RDF/Turtle. Use only real IES4 terms, the 4D state/period pattern where relevant, the ies: and data: prefixes, and output only Turtle.\n\nScenario: A vehicle with registration number LK176LPX was parked at the location known as Acacia Gardens. This parking event began on June 1, 1987, at 09:00 and concluded on September 1, 1987, at 21:04. The record captures the continuous period during which the vehicle remained stationary at this specific site."}, {"role": "assistant", "content": "@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .\n@prefix ies: <http://ies.data.gov.uk/ontology/ies4#> . \n@prefix data: <http://data.gov.uk/testdata#> .\n@prefix iso8601: <http://iso.org/iso8601#> .\n\ndata:LK176LPX a ies:RoadVehicle .\ndata:Acacia_Gardens a ies:Location .\niso8601:19870601T090000 a ies:ParticularPeriod .\niso8601:19870901T210400 a ies:ParticularPeriod .\ndata:LK176LPX_in_Acacia_Gardens a ies:DiscontinuousState ;\n ies:isStateOf data:LK176LPX ;\n ies:inLocation data:Acacia_Gardens .\ndata:LK176LPX_starts_parking a ies:BoundingState ;\n ies:isStartOf data:LK176LPX_in_Acacia_Gardens ;\n ies:inPeriod iso8601:19870601T090000 .\ndata:LK176LPX_stops_parking a ies:BoundingState ;\n ies:isEndOf data:LK176LPX_in_Acacia_Gardens ;\n ies:inPeriod iso8601:19870901T210400 ."}]}
|
| 9 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Encode the following scenario as IES4 RDF/Turtle. Use only real IES4 terms, the 4D state/period pattern where relevant, the ies: and data: prefixes, and output only Turtle.\n\nScenario: Fred was born at University Hospital on September 21, 1984, at 21:04. Later, on March 6, 1991, at 11:30, he was at Acme Health Centre. Finally, on December 18, 2014, at 18:10, Fred attended the Fat Fighters Club."}, {"role": "assistant", "content": "@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .\n@prefix ies: <http://ies.data.gov.uk/ontology/ies4#> . \n@prefix data: <http://data.gov.uk/testdata#> .\n@prefix iso8601: <http://iso.org/iso8601#> .\n\ndata:Fred a ies:Person .\ndata:FredBorn a ies:BirthState ;\n ies:inPeriod iso8601:19840921T210400 ;\n ies:inLocation data:UniversityHospital ;\n ies:isStartOf data:Fred .\ndata:FredAtMedical a ies:PersonState ;\n ies:inPeriod iso8601:19910306T113000 ;\n ies:inLocation data:AcmeHealthCentre ;\n ies:isStateOf data:Fred .\ndata:FredAtFatFighters a ies:PersonState ;\n ies:inPeriod iso8601:20141218T181000 ;\n ies:inLocation data:FatFightersClub ;\n ies:isStateOf data:Fred .\n\niso8601:19840921T210400 a ies:ParticularPeriod .\niso8601:19910306T113000 a ies:ParticularPeriod .\niso8601:20141218T181000 a ies:ParticularPeriod .\n\ndata:UniversityHospital a ies:Facility .\ndata:AcmeHealthCentre a ies:Facility .\ndata:FatFightersClub a ies:Facility ."}]}
|
| 10 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Encode the following scenario as IES4 RDF/Turtle. Use only real IES4 terms, the 4D state/period pattern where relevant, the ies: and data: prefixes, and output only Turtle.\n\nScenario: The fishing vessel 'Sea Sprite' departs from the Port of Portsmouth for a fishing trip, connecting via a connecting leg to the fishing grounds near the Isle of Wight before returning to port. This scenario models the specific departure and arrival bounding states for the vessel's journey."}, {"role": "assistant", "content": "@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .\n@prefix ies: <http://ies.data.gov.uk/ontology/ies4#> .\n@prefix data: <http://data.gov.uk/testdata#> .\n@prefix iso8601: <http://iso.org/iso8601#> .\n\ndata:Scenario_MaritimeVoyage a ies:PossibleWorld .\n\ndata:SeaSprite a ies:RoadVehicle .\ndata:PortOfPortsmouth a ies:Facility .\ndata:FishingGroundsIsleOfWight a ies:Location .\ndata:Voyage1 a ies:Journey .\ndata:Period1 a ies:ParticularPeriod .\ndata:DepartureState1 a ies:Departure .\ndata:ArrivalState1 a ies:Arrival .\ndata:CaptainSmith a ies:Person .\ndata:CaptainRole1 a ies:VehicleController .\ndata:VesselRole1 a ies:VehicleUsed .\n\ndata:DepartureState1 a ies:BoundingState ;\n ies:isStartOf data:Voyage1 ;\n ies:inPeriod data:Period1 ;\n ies:inLocation data:PortOfPortsmouth .\n\ndata:ArrivalState1 a ies:BoundingState ;\n ies:isEndOf data:Voyage1 ;\n ies:inPeriod data:Period1 ;\n ies:inLocation data:FishingGroundsIsleOfWight .\n\ndata:CaptainRole1 a ies:EventParticipant ;\n ies:isParticipationOf data:CaptainSmith ;\n ies:isParticipantIn data:Voyage1 .\n\ndata:VesselRole1 a ies:EventParticipant ;\n ies:isParticipationOf data:SeaSprite ;\n ies:isParticipantIn data:Voyage1 .\n\ndata:Voyage1 ies:isPartOf data:Scenario_MaritimeVoyage .\ndata:Period1 ies:isPartOf data:Scenario_MaritimeVoyage ."}]}
|
| 11 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Encode the following scenario as IES4 RDF/Turtle. Use only real IES4 terms, the 4D state/period pattern where relevant, the ies: and data: prefixes, and output only Turtle.\n\nScenario: Alice initiates a financial transfer to Bob via an online banking system. The transaction is recorded as a specific state where funds move from Alice's account to Bob's account, bounded by the start and end of the communication session used to authorize the payment."}, {"role": "assistant", "content": "@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .\n@prefix ies: <http://ies.data.gov.uk/ontology/ies4#> .\n@prefix data: <http://data.gov.uk/testdata#> .\n@prefix iso8601: <http://iso.org/iso8601#> .\n\ndata:Alice a ies:Person .\ndata:Bob a ies:Person .\ndata:AliceAccountState a ies:AccountInCommunication .\ndata:BobAccountState a ies:AccountInCommunication .\ndata:PaymentSession a ies:InteractiveCommunication .\ndata:PaymentStateStart a ies:BoundingState .\ndata:PaymentStateEnd a ies:BoundingState .\ndata:PaymentPeriod a ies:ParticularPeriod .\n\ndata:AliceAccountState a ies:EventParticipant ;\n ies:isParticipationOf data:Alice ;\n ies:isParticipantIn data:PaymentSession .\n\ndata:BobAccountState a ies:EventParticipant ;\n ies:isParticipationOf data:Bob ;\n ies:isParticipantIn data:PaymentSession .\n\ndata:PaymentStateStart a ies:BoundingState ;\n ies:isStartOf data:PaymentSession ;\n ies:inPeriod data:PaymentPeriod .\n\ndata:PaymentStateEnd a ies:BoundingState ;\n ies:isEndOf data:PaymentSession ;\n ies:inPeriod data:PaymentPeriod .\n\ndata:PaymentSession a ies:EventParticipant ;\n ies:isParticipantIn data:AliceAccountState ."}]}
|
ies/pairs_det.jsonl
ADDED
|
@@ -0,0 +1,170 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Explain the IES4 class ies:ISO4217Code."}, {"role": "assistant", "content": "ies:ISO4217Code is defined as: ISO4217 three-letter currency code (e.g. USD, GBP, EUR, etc.) It is a subclass of ies:Identifier."}]}
|
| 2 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "In IES4, what does the class ies:InstanceOfSoftware represent?"}, {"role": "assistant", "content": "ies:InstanceOfSoftware is defined as: An Asset that is an installed instance of a set of programmatic instructions that control or affect the behaviour of an Asset (usually a Device). It is a subclass of ies:Asset."}]}
|
| 3 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "What is ies:Sender in the Information Exchange Standard?"}, {"role": "assistant", "content": "ies:Sender is defined as: An PartyInCommunication where the communicating party is the sender of a message It is a subclass of ies:PartyInCommunication."}]}
|
| 4 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "In IES4, what does the class ies:Carrier represent?"}, {"role": "assistant", "content": "ies:Carrier is defined as: An EventParticipant where a ResponsibleActor participates in a Delivery as a carrier It is a subclass of ies:EventParticipant."}]}
|
| 5 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "In IES4, what does the class ies:Notify represent?"}, {"role": "assistant", "content": "ies:Notify is defined as: An OnlineContentEvent where a notification is raised - i.e. an application-generated event (not a user-generated event) It is a subclass of ies:OnlineContentEvent."}]}
|
| 6 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Explain the IES4 class ies:IncarcerationFacility."}, {"role": "assistant", "content": "ies:IncarcerationFacility is defined as: A Facility used for incarceration - e.g. a prison, detention centre, or remand facility It is a subclass of ies:Facility."}]}
|
| 7 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Explain the IES4 class ies:WinningCandidate."}, {"role": "assistant", "content": "ies:WinningCandidate is defined as: The Person who won the Election It is a subclass of ies:ElectoralCandidate."}]}
|
| 8 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Explain the IES4 class ies:Message."}, {"role": "assistant", "content": "ies:Message is defined as: A Communication where a message is sent. It is a subclass of ies:Communication."}]}
|
| 9 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Explain the IES4 class ies:ClassOfElement."}, {"role": "assistant", "content": "ies:ClassOfElement is defined as: An rdfs:Class and an Thing whose instances are classes of Element\n\nExamples:\n\u00a0\n\nHuman groupings (e.g. Nigerian Women, British Men, Righthanded people, English Speakers);\nPolitical Ideologies\nWeapons\nDays of the week\nStandard procedures\netc.\n It is a subclass of ies:Thing."}]}
|
| 10 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Explain the IES4 class ies:SerialNumber."}, {"role": "assistant", "content": "ies:SerialNumber is defined as: An Identifier for Device that has been assigned at manufacture.\n\nExample Value:\n\n123ABC456DEF It is a subclass of ies:Identifier."}]}
|
| 11 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Explain the IES4 class ies:Investigation."}, {"role": "assistant", "content": "ies:Investigation is defined as: An IntelligenceOperation that researches a particular threat, or theme. It is a subclass of ies:EndToEndActivity, ies:OperationalEvent."}]}
|
| 12 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Explain the IES4 class ies:Crossing."}, {"role": "assistant", "content": "ies:Crossing is defined as: A Location and an ArbitraryOverlap whose extent is defined by the shared overlap of two or more Locations It is a subclass of ies:ArbitraryOverlap, ies:Location."}]}
|
| 13 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "In IES4, what does the class ies:SchemaObject represent?"}, {"role": "assistant", "content": "ies:SchemaObject is defined as: A DataObject that is a standardised plan or outline for something.\n\ne.g. Bristol City Street Furniture Schema It is a subclass of ies:DataObject."}]}
|
| 14 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "In IES4, what does the class ies:ElectricCurrent represent?"}, {"role": "assistant", "content": "ies:ElectricCurrent is defined as: The Measure of the flow of electric charge.\n\n\nNote: whilst this is a tricky Measure in a 4D ontology, it should be used in a niaive manner - i.e. a measure of a State of an Entity when the current is flowing through it. It is a subclass of ies:StandardMeasure."}]}
|
| 15 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "What is ies:OperatingSystem in the Information Exchange Standard?"}, {"role": "assistant", "content": "ies:OperatingSystem is defined as: Software that provides the basic access layer to hardware It is a subclass of ies:Software."}]}
|
| 16 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "In IES4, what does the class ies:Software represent?"}, {"role": "assistant", "content": "ies:Software is defined as: A ClassOfAsset that is programmatic instructions that control or affect the behaviour of an Asset (usually a Device). \n\nNote that Software is a class, as the same Software may be installed in multiple locations. It is a subclass of ies:ClassOfAsset."}]}
|
| 17 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Explain the IES4 class ies:Summit."}, {"role": "assistant", "content": "ies:Summit is defined as: A PoliticalEvent where senior leaders assemble to discuss and agree policy or treaties It is a subclass of ies:PoliticalEvent."}]}
|
| 18 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "What is ies:RadioCoverageArea in the Information Exchange Standard?"}, {"role": "assistant", "content": "ies:RadioCoverageArea is defined as: A Location whose area is that in which a RadioMast hast viable communications coverage.\n\nNote: The RadioMast itself may not be part of this area, as often the immediate area around the base of a RadioMast is a deadspot. \n\nNote: Most radio area coverage is complex in shape, and the preferred representation in IES4 is GeoJSON. No attempt is made here to differentiate between signal strength zones. To do this, create multople RadioCoverAreas for the same RadioMast and label them appropriately. It is a subclass of ies:Location."}]}
|
| 19 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "In IES4, what does the class ies:ReceivingAccount represent?"}, {"role": "assistant", "content": "ies:ReceivingAccount is defined as: An EventParticipant where a FinancialAccount receives money It is a subclass of ies:EventParticipant."}]}
|
| 20 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Explain the IES4 class ies:TravelVisa."}, {"role": "assistant", "content": "ies:TravelVisa is defined as: An IdentityDocument, usually attached to a Passport, which allows a Person to remain in a Country for a set period of time. It is a subclass of ies:IdentityDocument."}]}
|
| 21 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "In IES4, what does the class ies:OSGridReference represent?"}, {"role": "assistant", "content": "ies:OSGridReference is defined as: A GeoIdentity that is an Ordnance Survey Grid Reference - i.e. pertaining to Great Britain. It is a subclass of ies:GeoIdentity."}]}
|
| 22 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "What is ies:RealEstate in the Information Exchange Standard?"}, {"role": "assistant", "content": "ies:RealEstate is defined as: A Location (and an Asset) that has been defined or constructed for the purpose of ownership It is a subclass of ies:Asset, ies:Location."}]}
|
| 23 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "What is ies:DispositionalClass in the Information Exchange Standard?"}, {"role": "assistant", "content": "ies:DispositionalClass is defined as: A ClassOfElement whose instances all share the same disposition - e.g. capability or tendency\n\nExample: Vehicles capable of Mach 2 It is a subclass of ies:ClassOfElement."}]}
|
| 24 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "In IES4, what does the class ies:MobileTelephoneAccount represent?"}, {"role": "assistant", "content": "ies:MobileTelephoneAccount is defined as: A TelephoneAccount where the telephones in use connects using a cellular network It is a subclass of ies:TelephoneAccount."}]}
|
| 25 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "In IES4, what does the class ies:EventParticipant represent?"}, {"role": "assistant", "content": "ies:EventParticipant is defined as: A State which is the participating role of an Entity in an Event.\n\nNote: this includes inactive participation (e.g. something that is being repaired). If the participation is known to be active then ActiveEventPartipant (or one of its subtypes) should be used. In BORO, EventParticipant would be \"Involvement\" and ActiveEventParticipant would be \"Participation\". It is a subclass of ies:State."}]}
|
| 26 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "What is ies:VoiceCall in the Information Exchange Standard?"}, {"role": "assistant", "content": "ies:VoiceCall is defined as: An InteractiveCommunication by voice It is a subclass of ies:InteractiveCommunication."}]}
|
| 27 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Explain the IES4 class ies:StandardMeasure."}, {"role": "assistant", "content": "ies:StandardMeasure is defined as: A Measure specified in the International system of quantities It is a subclass of ies:Measure."}]}
|
| 28 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "In IES4, what does the class ies:LawEnforcement represent?"}, {"role": "assistant", "content": "ies:LawEnforcement is defined as: An Event that involves the application of criminal law It is a subclass of ies:Event."}]}
|
| 29 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "What is ies:Ethnicity in the Information Exchange Standard?"}, {"role": "assistant", "content": "ies:Ethnicity is defined as: A ClassOfPerson whose members all share the same ethnicity It is a subclass of ies:ClassOfPerson."}]}
|
| 30 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "What is ies:AgreementExecution in the Information Exchange Standard?"}, {"role": "assistant", "content": "ies:AgreementExecution is defined as: An AgreementStage which includes all the ongoing activities that conform to the agreement reached It is a subclass of ies:AgreementStage."}]}
|
| 31 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Explain the IES4 class ies:TravelBooking."}, {"role": "assistant", "content": "ies:TravelBooking is defined as: The Purchase of planned travel arrangements.\n\n3. Travel Bookings may include bookings for Flights, Ferry Crossings, Train Journeys (i.e Travel Services), and also Hotels, Hire Cars etc. when these have been modelled. These will be included on the booking as relationships to the appropriate other entities. It is a subclass of ies:Purchase."}]}
|
| 32 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "In IES4, what does the class ies:PeaceTreaty represent?"}, {"role": "assistant", "content": "ies:PeaceTreaty is defined as: A Treaty that formalises the end of hostilities in a War It is a subclass of ies:Treaty."}]}
|
| 33 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "What is ies:InPost in the Information Exchange Standard?"}, {"role": "assistant", "content": "ies:InPost is defined as: An InstalledState of a ResponsibleActor when they are in a Post. It is a subclass of ies:InstalledState, ies:ResponsibleActorState."}]}
|
| 34 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "In IES4, what does the class ies:RecurringPeriod represent?"}, {"role": "assistant", "content": "ies:RecurringPeriod is defined as: A PeriodOfTime that is composed of regularly recurring periods of time.\n\nISO8601 is used to represent these periods (recurrentPeriodRepresentation property), using the blanking technique (e.g. blanking the date to give a daily time). The recurrence can be limited using the startsIn and endsIn properties \nExamples:\n\nEvery Tuesday from 28th August 2018 to 2 October 2018\n13:00 to 14:00 on every day from 27th June 2016 to 2 October 2024 It is a subclass of ies:ArbitraryPeriod."}]}
|
| 35 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "What is ies:LocationState in the Information Exchange Standard?"}, {"role": "assistant", "content": "ies:LocationState is defined as: A temporal state of a Location It is a subclass of ies:State."}]}
|
| 36 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Explain the IES4 class ies:AssetState."}, {"role": "assistant", "content": "ies:AssetState is defined as: A temporal state of an Asset It is a subclass of ies:State."}]}
|
| 37 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "In IES4, what does the class ies:SystemState represent?"}, {"role": "assistant", "content": "ies:SystemState is defined as: A temporal state of a System It is a subclass of ies:State."}]}
|
| 38 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "What is ies:TargetLocation in the Information Exchange Standard?"}, {"role": "assistant", "content": "ies:TargetLocation is defined as: Relates an MilitaryAttack to the location specified for the attack It is a subclass of ies:EventParticipant."}]}
|
| 39 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Explain the IES4 class ies:Recipient."}, {"role": "assistant", "content": "ies:Recipient is defined as: An PartyInCommunication where the communicating party is the recipient of a message It is a subclass of ies:PartyInCommunication."}]}
|
| 40 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "In IES4, what does the class ies:DeclarationOfWar represent?"}, {"role": "assistant", "content": "ies:DeclarationOfWar is defined as: A PoliticalAnnouncement marking the start of a War It is a subclass of ies:PoliticalAnnouncement."}]}
|
| 41 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "What is ies:DebitCard in the Information Exchange Standard?"}, {"role": "assistant", "content": "ies:DebitCard is defined as: A BankCard where transactions debit from a bank account It is a subclass of ies:BankCard."}]}
|
| 42 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "In IES4, what does the class ies:Married represent?"}, {"role": "assistant", "content": "ies:Married is defined as: A State when a Person is married to another person It is a subclass of ies:EventParticipant, ies:PersonState."}]}
|
| 43 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "In IES4, what does the class ies:IncumbentRepresentative represent?"}, {"role": "assistant", "content": "ies:IncumbentRepresentative is defined as: A Person in-office prior to the Election being decided It is a subclass of ies:EventParticipant."}]}
|
| 44 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "In IES4, what does the class ies:ClassOfAsset represent?"}, {"role": "assistant", "content": "ies:ClassOfAsset is defined as: The powertype of Asset- i.e. a ClassOfEntity whose instances are classes of Asset\n\nExamples:\n\n* Vauxhall Insignia, VW Golf\n* Smartphone\n* Apple iPhone 6S It is a subclass of ies:ClassOfEntity."}]}
|
| 45 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Explain the IES4 class ies:OperationalEvent."}, {"role": "assistant", "content": "ies:OperationalEvent is defined as: An Event conducted by military or national security actors It is a subclass of ies:Event."}]}
|
| 46 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "In IES4, what does the class ies:EvidentialPhotograph represent?"}, {"role": "assistant", "content": "ies:EvidentialPhotograph is defined as: Relates a Surveillance Event to a Document that is the evidence resulting from the Surveillance It is a subclass of ies:EventParticipant."}]}
|
| 47 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Explain the IES4 class ies:VehicleController."}, {"role": "assistant", "content": "ies:VehicleController is defined as: A PersonInTransit where the Person is in control of the Transit\n\ne.g. driver of a car, pilot of plane, captain of a ship It is a subclass of ies:PersonInTransit."}]}
|
| 48 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "What is ies:Capability in the Information Exchange Standard?"}, {"role": "assistant", "content": "ies:Capability is defined as: A DispositionalClass where all the instances share the same capability\n\nExample: Vehicles capable of Mach 2 It is a subclass of ies:DispositionalClass."}]}
|
| 49 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Explain the IES4 class ies:TerroristOrganisation."}, {"role": "assistant", "content": "ies:TerroristOrganisation is defined as: An OrganisationState that is assessed to be conducting acts of terror to achieve a political or religious goal.\n It is a subclass of ies:OrganisationState."}]}
|
| 50 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Explain the IES4 class ies:RentalProvider."}, {"role": "assistant", "content": "ies:RentalProvider is defined as: A PartyToAgreement where a ResponsibleActor provides an Entity to rent It is a subclass of ies:PartyToAgreement."}]}
|
| 51 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "What is ies:Communication in the Information Exchange Standard?"}, {"role": "assistant", "content": "ies:Communication is defined as: An Event where two or more parties interact and exchange information It is a subclass of ies:Event."}]}
|
| 52 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Explain the IES4 class ies:RegistrationNumber."}, {"role": "assistant", "content": "ies:RegistrationNumber is defined as: The registration number for the respective Vehicle (with or without spaces).\n\nFor road vehicles this is often referred to as the VRN (vehicle registration number).\n\nFor aircraft the tail number is often used as a means of identification and/or registration. It is a subclass of ies:Identifier."}]}
|
| 53 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "What is ies:Representation in the Information Exchange Standard?"}, {"role": "assistant", "content": "ies:Representation is defined as: An ClassOfEntity whose instances are representations of things in the real world\n\nExamples:\n* an identifier used for a Person\n* a document (though not an individual copy of a document) It is a subclass of ies:ClassOfEntity."}]}
|
| 54 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "In IES4, what does the class ies:VersionOfDocument represent?"}, {"role": "assistant", "content": "ies:VersionOfDocument is defined as: A WorkOfDocumentation and a TimeBoundedClass that is a versionOf a WorkOfDocumentation It is a subclass of ies:TimeBoundedClass, ies:WorkOfDocumentation."}]}
|
| 55 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Explain the IES4 class ies:PolicyAnnouncement."}, {"role": "assistant", "content": "ies:PolicyAnnouncement is defined as: A PoliticalAnnouncement about policy It is a subclass of ies:PoliticalAnnouncement."}]}
|
| 56 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "In IES4, what does the class ies:PersonTitle represent?"}, {"role": "assistant", "content": "ies:PersonTitle is defined as: The title associated with the name of the person. It is a subclass of ies:PersonName."}]}
|
| 57 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Explain the IES4 class ies:CyberStalking."}, {"role": "assistant", "content": "ies:CyberStalking is defined as: A form of Stalking which takes place online. It is a subclass of ies:Stalking."}]}
|
| 58 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "In IES4, what does the class ies:Caller represent?"}, {"role": "assistant", "content": "ies:Caller is defined as: An PartyInCommunication where the communicating party is the caller in an InteractiveCommunication It is a subclass of ies:PartyInCommunication."}]}
|
| 59 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "What is ies:EntertainmentEvent in the Information Exchange Standard?"}, {"role": "assistant", "content": "ies:EntertainmentEvent is defined as: An Event where entertainment (sporting, music, theatre, etc.) is provided It is a subclass of ies:Event."}]}
|
| 60 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Explain the IES4 class ies:Port."}, {"role": "assistant", "content": "ies:Port is defined as: A Facility which is a recognised terminus for international travel It is a subclass of ies:Facility."}]}
|
| 61 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "In IES4, what does the class ies:Delivery represent?"}, {"role": "assistant", "content": "ies:Delivery is defined as: A TradeEvent where one or more Entities are delivered to the receiving party It is a subclass of ies:TradeEvent."}]}
|
| 62 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Explain the IES4 class ies:TOID."}, {"role": "assistant", "content": "ies:TOID is defined as: TOIDs (TOpographic IDentifiers) are unique and persistent identifiers created and managed by Ordnance Survey Great Britain to identify topographic objects in OS datasets. \n\nExample: the TOID for the Tower of London is osgb1000006032892. It is a subclass of ies:GeoIdentity."}]}
|
| 63 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "What is ies:MeetingChair in the Information Exchange Standard?"}, {"role": "assistant", "content": "ies:MeetingChair is defined as: An Attendance where the Person involved is the chair of a Meeting It is a subclass of ies:Attendance."}]}
|
| 64 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Explain the IES4 class ies:IndividualDocument."}, {"role": "assistant", "content": "ies:IndividualDocument is defined as: An Asset that is a written, photographed or drawn representation of thoughts. This might include, but not limited to, formal reports, books, legal instruments. Such documents might exist in a wide variety of forms, both printed and in electronic form.\n\nNote: this is an individual document - i.e. physical or (rarely) a specific electronic copy (e.g. on a specific hard disk...told you it was rare). In most cases, we refer to the document in general - WorkOfDocumentation It is a subclass of ies:Asset."}]}
|
| 65 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "What is ies:Passenger in the Information Exchange Standard?"}, {"role": "assistant", "content": "ies:Passenger is defined as: A PersonInTransit where the Person travelling is a Passenger on a Transit It is a subclass of ies:PersonInTransit."}]}
|
| 66 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Explain the IES4 class ies:ElectoralRegion."}, {"role": "assistant", "content": "ies:ElectoralRegion is defined as: The RegionalConstituency being decided in an Election It is a subclass of ies:EventParticipant."}]}
|
| 67 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "In IES4, what does the class ies:Casualty represent?"}, {"role": "assistant", "content": "ies:Casualty is defined as: Relates a MilitaryAttack to a Person who was injured or killed in the attack It is a subclass of ies:EventParticipant."}]}
|
| 68 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Explain the IES4 class ies:Modify."}, {"role": "assistant", "content": "ies:Modify is defined as: A LifecycleEvent where something is changed It is a subclass of ies:LifecycleEvent."}]}
|
| 69 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "In IES4, what does the class ies:OnlineAccount represent?"}, {"role": "assistant", "content": "ies:OnlineAccount is defined as: An Account that enables a person, organisation or other entity to participate within a particular online domain.\n\nNote: was called \"OnlineIdentifier\" in previous versions of IES It is a subclass of ies:Account, ies:OnlineAccountState."}]}
|
| 70 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "What is ies:Customer in the Information Exchange Standard?"}, {"role": "assistant", "content": "ies:Customer is defined as: An EventParticipant where a ResponsibleActor is the customer for the Event - i.e. the Event has been conducted as a service to them, or in production of goods for them. It is a subclass of ies:ActiveEventParticipant."}]}
|
| 71 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "What is ies:Title in the Information Exchange Standard?"}, {"role": "assistant", "content": "ies:Title is defined as: The title of the respective document. It is a subclass of ies:Name."}]}
|
| 72 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Explain the IES4 class ies:MeasureValue."}, {"role": "assistant", "content": "ies:MeasureValue is defined as: A Representation of the value of a Measure\n\n\nNote: A UnitOfMeasure is almost always required. The reason it is not mandatory is that in some cases (due to partial reporting) we do not have complete information - e.g. we know the value was stated to be 10 but we don't know if that's metres or feet It is a subclass of ies:Representation."}]}
|
| 73 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Explain the IES4 class ies:OutgoingGovernment."}, {"role": "assistant", "content": "ies:OutgoingGovernment is defined as: The Government that left power following a ChangeOfGovernment It is a subclass of ies:EventParticipant."}]}
|
| 74 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "What is ies:BookingPayment in the Information Exchange Standard?"}, {"role": "assistant", "content": "ies:BookingPayment is defined as: An EventParticipant where an AmountOfMoney in cash is used as payment in a TravelBooking.\n\nWhen neither card nor cash is used, there will be an accompanying MoneyTransfer It is a subclass of ies:EventParticipant."}]}
|
| 75 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "In IES4, what does the class ies:Rented represent?"}, {"role": "assistant", "content": "ies:Rented is defined as: An EventParticipant where an Entity is rented It is a subclass of ies:EventParticipant."}]}
|
| 76 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "What is ies:FirstLineOfAddress in the Information Exchange Standard?"}, {"role": "assistant", "content": "ies:FirstLineOfAddress is defined as: The first line of the Address including the number of the dwelling and the street name. It is a subclass of ies:LineOfAddress."}]}
|
| 77 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "What is ies:FoundOrganisation in the Information Exchange Standard?"}, {"role": "assistant", "content": "ies:FoundOrganisation is defined as: A Create Event where an Organisation is founded It is a subclass of ies:Create."}]}
|
| 78 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "What is ies:UN_LOCODE in the Information Exchange Standard?"}, {"role": "assistant", "content": "ies:UN_LOCODE is defined as: A GeoIdentity that is a United Nations Code for Trade and Transport Locations It is a subclass of ies:GeoIdentity."}]}
|
| 79 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "In IES4, what does the class ies:TradeAgreement represent?"}, {"role": "assistant", "content": "ies:TradeAgreement is defined as: A PoliticalAgreement that sets tariffs and standards for trade between nations. It is a subclass of ies:PoliticalAgreement."}]}
|
| 80 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "In IES4, what does the class ies:RegionOfWorld represent?"}, {"role": "assistant", "content": "ies:RegionOfWorld is defined as: A Location that is a general subdivision of the world - e.g. continents, sub-continents, economic areas, etc.\n\nRegions of the world may sometimes be spatially separated (e.g. economic areas) It is a subclass of ies:Location."}]}
|
| 81 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "What is ies:AdministeredAccount in the Information Exchange Standard?"}, {"role": "assistant", "content": "ies:AdministeredAccount is defined as: An EventParticipant where a FinancialAccount is administered It is a subclass of ies:EventParticipant."}]}
|
| 82 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Explain the IES4 class ies:URL."}, {"role": "assistant", "content": "ies:URL is defined as: An Identifier for a WebResource It is a subclass of ies:Identifier."}]}
|
| 83 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "What is ies:ClassOfResponsibleActor in the Information Exchange Standard?"}, {"role": "assistant", "content": "ies:ClassOfResponsibleActor is defined as: The powertype of ResponsibleActor It is a subclass of ies:ClassOfEntity."}]}
|
| 84 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "In IES4, what does the class ies:Assessor represent?"}, {"role": "assistant", "content": "ies:Assessor is defined as: An EventParticipant where an Actor assesses something to be true. It is a subclass of ies:ActiveEventParticipant."}]}
|
| 85 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "In IES4, what does the class ies:DocumentFormat represent?"}, {"role": "assistant", "content": "ies:DocumentFormat is defined as: A ClassOfIndividualDocument whose members are all of the same document format - e.g.\n\nPDF\nMS Word It is a subclass of ies:ClassOfIndividualDocument."}]}
|
| 86 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "What is ies:EducationalOrganisation in the Information Exchange Standard?"}, {"role": "assistant", "content": "ies:EducationalOrganisation is defined as: An Organisation that provides education It is a subclass of ies:Organisation."}]}
|
| 87 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "What is ies:NationalIdentityCard in the Information Exchange Standard?"}, {"role": "assistant", "content": "ies:NationalIdentityCard is defined as: An IdentityDocument issued by a Government to identify a Person It is a subclass of ies:IdentityDocument."}]}
|
| 88 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "In IES4, what does the class ies:HealthServiceIdentifier represent?"}, {"role": "assistant", "content": "ies:HealthServiceIdentifier is defined as: A NationalIdentityNumber used for managing a citizen's through-life healthcare\n\nIn UK, this would be an NHS number, apart from Scotland where it is called a CHI number It is a subclass of ies:NationalIdentityNumber."}]}
|
| 89 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Explain the IES4 class ies:OnlineContentCreation."}, {"role": "assistant", "content": "ies:OnlineContentCreation is defined as: An OnlineContentEvent where a \"post\" is made.\n\nExamples:\n\n* Posting a blog\n* Posting a comment\n* Tweeting (other microblogs are available, probably)\n* A Facebook, LinkedIn, Instagram, etc. post It is a subclass of ies:Create, ies:OnlineContentEvent."}]}
|
| 90 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "What is ies:OnlineAccountInUse in the Information Exchange Standard?"}, {"role": "assistant", "content": "ies:OnlineAccountInUse is defined as: An EventParticipant where an OnlineAccount participates in an OnlineEvent It is a subclass of ies:ActiveEventParticipant."}]}
|
| 91 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Explain the IES4 class ies:WebResourceState."}, {"role": "assistant", "content": "ies:WebResourceState is defined as: A temporal state of an WebResource It is a subclass of ies:State."}]}
|
| 92 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "In IES4, what does the class ies:ReferenceNumber represent?"}, {"role": "assistant", "content": "ies:ReferenceNumber is defined as: An Identifier used to uniquely identity a document. It is a subclass of ies:Identifier."}]}
|
| 93 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "In IES4, what does the class ies:MilitaryOrganisation represent?"}, {"role": "assistant", "content": "ies:MilitaryOrganisation is defined as: A GovernmentOrganisation that conducts warfighting, peacekeeping and emergency civil support functions It is a subclass of ies:GovernmentOrganisation."}]}
|
| 94 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Explain the IES4 class ies:OfferForSale."}, {"role": "assistant", "content": "ies:OfferForSale is defined as: A TradeEvent where one or more Entities of the same type (specified by an ClassOfEntity) are offered for sale or exchange It is a subclass of ies:TradeEvent."}]}
|
| 95 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "In IES4, what does the class ies:IPv4Address represent?"}, {"role": "assistant", "content": "ies:IPv4Address is defined as: An IPAddress conforming to v4 of the standard It is a subclass of ies:IPAddress."}]}
|
| 96 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Explain the IES4 class ies:Observed."}, {"role": "assistant", "content": "ies:Observed is defined as: An EventParticipant where an Element is Observed It is a subclass of ies:EventParticipant."}]}
|
| 97 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "What is ies:LanguageProficiency in the Information Exchange Standard?"}, {"role": "assistant", "content": "ies:LanguageProficiency is defined as: A ClassOfPersonState indicating the proficiency a person has in a particular language at that state in their life.\n\n It is a subclass of ies:ClassOfPersonState."}]}
|
| 98 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Explain the IES4 class ies:TravelLeg."}, {"role": "assistant", "content": "ies:TravelLeg is defined as: An EventParticipant in which a Entity travels. That travel may be part of a Journey.\n\nThe TravelLeg may be part of a Journey (i.e. the Journey has one of more legs). It is a subclass of ies:Moving."}]}
|
| 99 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Explain the IES4 class ies:DeclaringParty."}, {"role": "assistant", "content": "ies:DeclaringParty is defined as: An EventParticipant where a ResponsibleActor makes an Announcement\n\nNote: this also covers GoverningParty from IES 3.2 It is a subclass of ies:EventParticipant."}]}
|
| 100 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "What is ies:DeathState in the Information Exchange Standard?"}, {"role": "assistant", "content": "ies:DeathState is defined as: A BoundingState that marks the end of a Person's life\n\nThe location of the death can be specified using inLocation\n\nThe date/time of the death can be specified using the inPeriod relationship. It is a subclass of ies:BoundingState, ies:PersonState."}]}
|
| 101 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Explain the IES4 class ies:PersonInTransit."}, {"role": "assistant", "content": "ies:PersonInTransit is defined as: An EntityInTransit where the Entity is a Person It is a subclass of ies:EntityInTransit."}]}
|
| 102 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "What is ies:Identifier in the Information Exchange Standard?"}, {"role": "assistant", "content": "ies:Identifier is defined as: A Name that is unique within the specified context It is a subclass of ies:Name."}]}
|
| 103 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "In IES4, what does the class ies:GeoJSON represent?"}, {"role": "assistant", "content": "ies:GeoJSON is defined as: GeoJSON is an open standard format designed for representing simple geographical features, along with their non-spatial attributes. It is based on JSON, the JavaScript Object Notation.\n\nGeoJSON mandates use of WGS 84 coordinate system - see IETF RFC 7946 It is a subclass of ies:GeoRepresentation, ies:JsonData."}]}
|
| 104 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "What is ies:Supplier in the Information Exchange Standard?"}, {"role": "assistant", "content": "ies:Supplier is defined as: An EventParticipant where a ResponsibleActor participates in a TradeEvent as a supplier It is a subclass of ies:EventParticipant."}]}
|
| 105 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "What is ies:GroupOfItems in the Information Exchange Standard?"}, {"role": "assistant", "content": "ies:GroupOfItems is defined as: A collection of Thing that have been gathered together for a purpose. \n\nNote: The same Thing can be in more than one GroupOfItems"}]}
|
| 106 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "What is ies:ClassOfPerson in the Information Exchange Standard?"}, {"role": "assistant", "content": "ies:ClassOfPerson is defined as: The powertype of Person It is a subclass of ies:ClassOfResponsibleActor."}]}
|
| 107 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Explain the IES4 class ies:Purchaser."}, {"role": "assistant", "content": "ies:Purchaser is defined as: An EventParticipant where a ResponsibleActor participates in a TradeEvent as a purchaser\n\nNote: in the case of a RequestForQuotation, the purchaser is the person or organisation issuing the RfQ\n\nNote: in the case of an online purchase where the buyer is unknown, the participant may be an OnlineIdentifier It is a subclass of ies:EventParticipant."}]}
|
| 108 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "What is ies:FlightTicket in the Information Exchange Standard?"}, {"role": "assistant", "content": "ies:FlightTicket is defined as: A Ticket that is used to travel by air It is a subclass of ies:TravelTicket."}]}
|
| 109 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "In IES4, what does the class ies:Meeting represent?"}, {"role": "assistant", "content": "ies:Meeting is defined as: A CoLocation where the attendees (Presence) communicate with each other It is a subclass of ies:CoLocation."}]}
|
| 110 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "What is ies:Alliance in the Information Exchange Standard?"}, {"role": "assistant", "content": "ies:Alliance is defined as: An Organisation made up of allies - these could be people or organisations, and the alliance may be quite loose. It is a subclass of ies:Organisation."}]}
|
| 111 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Explain the IES4 property ies:worshipsAt."}, {"role": "assistant", "content": "ies:worshipsAt: A visits relationship between a ResponsibleActor and a Location where they undertake religious worship\n\nNote: more often than not, this will be a statement of regular/occasional worship, so the instance of the ResponsibleActorState should also be an instance of DiscontinuousState. In rarer occasions, it may be used to highlight a single, continuous visit, but in that case, inLocation would generally be used."}]}
|
| 112 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "In IES4, what does the property ies:hasSourceReference mean?"}, {"role": "assistant", "content": "ies:hasSourceReference: A isRepresentedAs relationship that asserts a Representation is the source (information provenance) for an Thing"}]}
|
| 113 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "In IES4, what does the property ies:startsIn mean?"}, {"role": "assistant", "content": "ies:startsIn: An xsd:DateTime for the start of the period Its domain is ies:ArbitraryPeriod and its range is unspecified."}]}
|
| 114 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "In IES4, what does the property ies:scheduledArrivalPort mean?"}, {"role": "assistant", "content": "ies:scheduledArrivalPort: The Port from which the TravelService is scheduled to arrive Its domain is ies:TravelService and its range is ies:Port."}]}
|
| 115 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "In IES4, what does the property ies:after mean?"}, {"role": "assistant", "content": "ies:after: A relationship linking two Elements where one ends before the other starts Its domain is ies:Element and its range is ies:Element."}]}
|
| 116 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Explain the IES4 property ies:charters."}, {"role": "assistant", "content": "ies:charters: A Relationship between a ResponsibleActor and the Transit they have chartered. Its domain is ies:ResponsibleActor and its range is ies:Transit."}]}
|
| 117 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "In IES4, what does the property ies:documentIdentifies mean?"}, {"role": "assistant", "content": "ies:documentIdentifies: Links an IdentityDocument to the Person it identifies.\n\nNote: was \"Is associated with\" in IES3 Its domain is ies:IdentityDocument and its range is ies:Person."}]}
|
| 118 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Explain the IES4 property ies:countryOfRegistration."}, {"role": "assistant", "content": "ies:countryOfRegistration: The Country in which the respective Entity is registered / recognised. Its domain is ies:Account, ies:Organisation, ies:Vehicle and its range is ies:Country."}]}
|
| 119 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Explain the IES4 property ies:hasStatedCountryOfResidence."}, {"role": "assistant", "content": "ies:hasStatedCountryOfResidence: The country of residence as printed on the respective IdentityDocument Its domain is ies:IdentityDocument and its range is ies:Country."}]}
|
| 120 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Explain the IES4 property ies:alliedTo."}, {"role": "assistant", "content": "ies:alliedTo: A Relationship between two ResponsibleActor Entities where one is allied to the other. Its domain is ies:ResponsibleActorState and its range is ies:Alliance."}]}
|
| 121 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "In IES4, what does the property ies:endsIn mean?"}, {"role": "assistant", "content": "ies:endsIn: An xsd:DateTime for the end of the period Its domain is ies:ArbitraryPeriod and its range is unspecified."}]}
|
| 122 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Explain the IES4 property ies:countryUsingDialCode."}, {"role": "assistant", "content": "ies:countryUsingDialCode: A relationship between a TelephoneCountryCode and a Country that uses that code.\n\nNote: more than one Country may use the same code, and in rare cases a given Country may have more than one code. Its domain is ies:TelephoneCountryCode and its range is ies:Country."}]}
|
| 123 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Explain the IES4 property ies:postModificationState."}, {"role": "assistant", "content": "ies:postModificationState: A partOf relationship to indicate a State of an Entity just after the Modify event\n\nNote: For BORO purists, this means the post State is part of the Modify Event (i.e. the extent of the Modify Event includes the State) Its domain is ies:Modify and its range is ies:State."}]}
|
| 124 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "In IES4, what does the property ies:excludedFrom mean?"}, {"role": "assistant", "content": "ies:excludedFrom: A Relationship between a ResponsibleActorState and a Location they are not allowed to enter.\n\nNote: any additional information about how or why the exclusion is in place should be added to the state Its domain is ies:ResponsibleActorState and its range is ies:Location."}]}
|
| 125 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Explain the IES4 property ies:hasEmergencyContactAddress."}, {"role": "assistant", "content": "ies:hasEmergencyContactAddress: The address of an emergency contact as printed on the IdentityDocument Its domain is ies:IdentityDocument and its range is ies:Address."}]}
|
| 126 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Explain the IES4 property ies:hasStatedPlaceOfBirth."}, {"role": "assistant", "content": "ies:hasStatedPlaceOfBirth: A relationship to the place of birth as recorded on the respective IdentityDocument Its domain is ies:IdentityDocument and its range is ies:RegionOfCountry."}]}
|
| 127 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Explain the IES4 property ies:scheduledDepartureTime."}, {"role": "assistant", "content": "ies:scheduledDepartureTime: The date/time on which the service was scheduled to depart\n\nThe format of this attribute is a restricted string based upon the ISO 8601 Extended Format. Its domain is ies:TravelService and its range is unspecified."}]}
|
| 128 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "In IES4, what does the property ies:fearfulOf mean?"}, {"role": "assistant", "content": "ies:fearfulOf: A Relationship between two ResponsibleActor Entities where one is fearful of the other.\n\nNote: this should not be considered a bi-directional relationship. Just because one person considers another person a threat does not necessarily mean the feeling is reciprocated. Its domain is ies:ResponsibleActorState and its range is ies:ResponsibleActor."}]}
|
| 129 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Explain the IES4 property ies:assessedToBeTheSameAs."}, {"role": "assistant", "content": "ies:assessedToBeTheSameAs: A relationship that asserts two Things that may have been previously judged to be different are in fact the same thing. \n\nWARNING: by \"the same\" we mean they occupy the same space for the same period of time - i.e. not two different things in the same place at different times, and not the same physical item at two different periods of time. The Identifier and State patterns should do most of what is needed here, and it is extremely rare that this would ever be needed. Do not use unless absolutely necessary. "}]}
|
| 130 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Explain the IES4 property ies:allocatedSeatNumber."}, {"role": "assistant", "content": "ies:allocatedSeatNumber: The seat number associated with the ticket Its domain is ies:Ticket and its range is unspecified."}]}
|
| 131 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Explain the IES4 property ies:scheduledArrivalTime."}, {"role": "assistant", "content": "ies:scheduledArrivalTime: The date/time on which the service was scheduled to arrive\n\nThe format of this attribute is a restricted string based upon the ISO 8601 Extended Format. Its domain is ies:TravelService and its range is unspecified."}]}
|
| 132 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Explain the IES4 property ies:upperBound."}, {"role": "assistant", "content": "ies:upperBound: A relationship a MeasureRange to the Measure that is its upper bound Its domain is ies:MeasureRange and its range is ies:Measure."}]}
|
| 133 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "In IES4, what does the property ies:worksFor mean?"}, {"role": "assistant", "content": "ies:worksFor: A Relationship between a ResponsibleActor (range - employer) and a ResponsibleActorState (domain- employed) that indicates one works for the other.\n\nIn the case where the work is occasional / ad-hoc (i.e. there isn't an ongoing work contract) then the instance of the ResponsibleActorState should also be an instance of DiscontinuousState Its domain is ies:ResponsibleActorState and its range is ies:ResponsibleActor."}]}
|
| 134 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "In IES4, what does the property ies:hasEthnicity mean?"}, {"role": "assistant", "content": "ies:hasEthnicity: The ethnic group that the respective Person belongs to.\n\nThe Metropolitan Police standard shall be used as the reference data standard. Its domain is ies:Person and its range is ies:Ethnicity."}]}
|
| 135 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Explain the IES4 property ies:idUpperRange."}, {"role": "assistant", "content": "ies:idUpperRange: A relationship between a CommunicationsIdentifierRange and the CommunicationsIdentifier that is the upper limit of the identifier range Its domain is ies:CommunicationsIdentifierRange and its range is ies:CommunicationsIdentifier."}]}
|
| 136 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Explain the IES4 property ies:permittedNationality."}, {"role": "assistant", "content": "ies:permittedNationality: The nationalities of those who are permitted to access the item. See the EDH specification for further details.\n\nAllowable Values:\n\nSee EDH Standard Its domain is ies:SecurityLabel and its range is unspecified."}]}
|
| 137 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "In IES4, what does the property ies:inPossessionOf mean?"}, {"role": "assistant", "content": "ies:inPossessionOf: A Relationship between a ResponsibleActor and an Asset they have in their possession.\n\nNote: this is separate to ownership - e.g. the possessor may well be the owner (use the owns relationship) but may also be a result of borrowing, theft, temporary custodianship, Its domain is unspecified and its range is ies:Asset."}]}
|
| 138 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "In IES4, what does the property ies:relationship mean?"}, {"role": "assistant", "content": "ies:relationship: A relationship represents an association between two Things Its domain is ies:Thing and its range is ies:Thing."}]}
|
| 139 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "In IES4, what does the property ies:quantityPurchased mean?"}, {"role": "assistant", "content": "ies:quantityPurchased: The number of Entities (of the same type) that were purchased Its domain is ies:Purchase and its range is unspecified."}]}
|
| 140 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Explain the IES4 property ies:idEmergencyContactTelNo."}, {"role": "assistant", "content": "ies:idEmergencyContactTelNo: The telephone number of an emergency contact as printed on the IdentityDocument Its domain is ies:IdentityDocument and its range is unspecified."}]}
|
| 141 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Explain the IES4 property ies:isParticipationOf."}, {"role": "assistant", "content": "ies:isParticipationOf: An isStateOf that relates an EventParticipant to the Element that is the participant Its domain is ies:EventParticipant and its range is ies:Entity."}]}
|
| 142 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "In IES4, what does the property ies:versionOf mean?"}, {"role": "assistant", "content": "ies:versionOf: A relationship between a VersionOfDocument and the WorkOfDocumentation it is a version of. Its domain is ies:VersionOfDocument and its range is ies:WorkOfDocumentation."}]}
|
| 143 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Explain the IES4 property ies:opposedTo."}, {"role": "assistant", "content": "ies:opposedTo: A coupling between a ResponsibleActor (or state thereof) and an ClassOfElement to which they are opposed\n\nExamples: an organisation that is opposed to Nuclear Weapons Its domain is ies:ResponsibleActorState and its range is ies:ClassOfElement."}]}
|
| 144 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Explain the IES4 property ies:idGender."}, {"role": "assistant", "content": "ies:idGender: The gender as recorded on the respective IdentityDocument Its domain is ies:IdentityDocument and its range is ies:Gender."}]}
|
| 145 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Explain the IES4 property ies:idDateOfBirth."}, {"role": "assistant", "content": "ies:idDateOfBirth: The Date of Birth as specified on the respective IdentityDocument. Its domain is ies:IdentityDocument and its range is ies:ParticularPeriod."}]}
|
| 146 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Explain the IES4 property ies:issuingAgency."}, {"role": "assistant", "content": "ies:issuingAgency: The Organisation that issued the ticket \u2013 this might be different from the travel provider. Its domain is ies:TravelTicket and its range is ies:Organisation."}]}
|
| 147 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "In IES4, what does the property ies:informationContent mean?"}, {"role": "assistant", "content": "ies:informationContent: A relationship between a WebResourceState and a Representation that asserts the Representation is the content of the WebResource\n\nNote: a state is used here as the content may change over time even though the WebResource persists Its domain is ies:WebResourceState and its range is ies:Representation."}]}
|
| 148 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "In IES4, what does the property ies:isLegalTenderIn mean?"}, {"role": "assistant", "content": "ies:isLegalTenderIn: The Country in which a Currency is legal tender Its domain is ies:Currency and its range is ies:Country."}]}
|
| 149 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "In IES4, what does the property ies:authorisesAccessTo mean?"}, {"role": "assistant", "content": "ies:authorisesAccessTo: The Event for which the respective Ticket applies. Its domain is ies:Ticket and its range is ies:Event."}]}
|
| 150 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "In IES4, what does the property ies:vafNumber mean?"}, {"role": "assistant", "content": "ies:vafNumber: The Visa Application Form (VAF) number. Its domain is ies:TravelVisa and its range is unspecified."}]}
|
| 151 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Explain the IES4 property ies:payloadContents."}, {"role": "assistant", "content": "ies:payloadContents: A link from an ExchangePayload to an rdfs:Resource that is in that payload.\n\nIf there is no payloadContents link, then it is assumed that all the contents of the file are in the ExchangePayload. Under this circumstance, more than one ExchangePayload would be an error. \n\nThe payloadContents link will usually refer to a named graph, but it can also be used to refer to individual rdf:Statements and rdfs:Resources. Its domain is ies:ExchangePayload and its range is unspecified."}]}
|
| 152 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "In IES4, what does the property ies:originatingSystem mean?"}, {"role": "assistant", "content": "ies:originatingSystem: The System that produced the dataset Its domain is unspecified and its range is ies:System."}]}
|
| 153 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Explain the IES4 property ies:uriScheme."}, {"role": "assistant", "content": "ies:uriScheme: URI scheme is the top level of the uniform resource identifier (URI) naming structure. All URIs and absolute URI references are formed with a scheme name, followed by a colon character (\":\"), and the remainder of the URI called the scheme-specific part. Its domain is ies:WebResourceState and its range is unspecified."}]}
|
| 154 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "In IES4, what does the property ies:hasGeneticGender mean?"}, {"role": "assistant", "content": "ies:hasGeneticGender: The gender the Person was born with (sex) and which would result from a DNA test. Its domain is ies:Person and its range is ies:Gender."}]}
|
| 155 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Explain the IES4 property ies:strengthOfInterest."}, {"role": "assistant", "content": "ies:strengthOfInterest: StrengthOfInterest is used in its most general sense and is limited to the following values:\n\u00b7 Weak\n\u00b7 Strong\n\u00b7 Fanatical Its domain is ies:Interested and its range is unspecified."}]}
|
| 156 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Explain the IES4 property ies:cookieOriginSite."}, {"role": "assistant", "content": "ies:cookieOriginSite: Relates a Cookie to the Webpage from which it originated. Its domain is ies:Cookie and its range is ies:Webpage."}]}
|
| 157 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "In IES4, what does the property ies:cousinOf mean?"}, {"role": "assistant", "content": "ies:cousinOf: A Relationship between two Person Entities that indicates one is the cousin of the other Its domain is ies:Person and its range is ies:Person."}]}
|
| 158 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Explain the IES4 property ies:onlineCommentOn."}, {"role": "assistant", "content": "ies:onlineCommentOn: Relates an OnlineComment to the OnlineContent that was commented on Its domain is ies:OnlineComment and its range is ies:OnlineArtefact."}]}
|
| 159 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Explain the IES4 property ies:issuerIdentificationNumber."}, {"role": "assistant", "content": "ies:issuerIdentificationNumber: The IIN is a number that uniquely identifies the issuer of the Bank Card.\n\nAn ISO/IEC 7812 number contains a single-digit major industry identifier (MII), a six-digit issuer identification number (IIN), an individual account identification number, and a single digit checksum. Its domain is ies:BankCard and its range is unspecified."}]}
|
| 160 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Explain the IES4 property ies:isPrimaryForOrganisation."}, {"role": "assistant", "content": "ies:isPrimaryForOrganisation: A relationship linking an Thing to the ResponsibleActor that prefers the use of that Thing.\n\nThis is used when there are more than one state, name, etc. for a given item, and there is a requirement to specify which one is considered primary / preferred by a particular Organisation.\n\nExamples:\n\n* A primary name for a person (applied to PersonName)\n* A primary DoB for a person (applied to BirthState)\n* A primary nationality for a person (applied to the PersonState that links to the Nation) Its domain is ies:Thing and its range is ies:Organisation."}]}
|
| 161 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "In IES4, what does the property ies:areaOfCoverage mean?"}, {"role": "assistant", "content": "ies:areaOfCoverage: The area over which the TravelCard is valid \n\nExamples:\n\nLondon - Zone 1\nLondon - All Zones Its domain is ies:TravelCard and its range is ies:Location."}]}
|
| 162 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "In IES4, what does the property ies:publicationDate mean?"}, {"role": "assistant", "content": "ies:publicationDate: The date of publication of the respective document. Its domain is ies:WorkOfDocumentation and its range is ies:ParticularPeriod."}]}
|
| 163 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Explain the IES4 property ies:interestedIn."}, {"role": "assistant", "content": "ies:interestedIn: A Relationship between a ResponsibleActor (or state thereof) and an Entity they are interested in. Its domain is ies:Interested and its range is ies:Thing."}]}
|
| 164 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Explain the IES4 property ies:isCentroidOf."}, {"role": "assistant", "content": "ies:isCentroidOf: An inLocation relationship to indicate a PointOnEarthSurface is the centroid of a Location Its domain is ies:PointOnEarthSurface and its range is unspecified."}]}
|
| 165 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "In IES4, what does the property ies:formatOfIndividualDocument mean?"}, {"role": "assistant", "content": "ies:formatOfIndividualDocument: The format of the respective IndividualDocument.\n\nExamples:\n\nPDF\nPrinted Its domain is ies:IndividualDocument and its range is ies:DocumentFormat."}]}
|
| 166 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "In IES4, what does the property ies:idDateOfIssue mean?"}, {"role": "assistant", "content": "ies:idDateOfIssue: The date that the respective Identity Document was actually issued \u2013 this is different from the ValidFromDate on EphemeralIdDocuments. Its domain is ies:IdentityDocument and its range is ies:ParticularPeriod."}]}
|
| 167 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "In IES4, what does the property ies:holdsAccount mean?"}, {"role": "assistant", "content": "ies:holdsAccount: Relates an AccountHolder (PersonState) to the Account they hold Its domain is ies:AccountHolder and its range is ies:Account."}]}
|
| 168 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Explain the IES4 property ies:isStateOf."}, {"role": "assistant", "content": "ies:isStateOf: An isPartOf linking an Element to a temporal State of that Element \n\nExamples:\n\nYou, you yesterday Its domain is ies:State and its range is ies:Element."}]}
|
| 169 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "In IES4, what does the property ies:hasRegisteredCommsID mean?"}, {"role": "assistant", "content": "ies:hasRegisteredCommsID: A relationship between a CommunicationsIdentifier and the CommunicationsAccountState of the account to which the identifier is registered Its domain is ies:CommunicationsAccountState and its range is ies:CommunicationsIdentifier."}]}
|
| 170 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Explain the IES4 property ies:nextTo."}, {"role": "assistant", "content": "ies:nextTo: A nearTo linking an Entity to another Entity it is immediately proximate to (i.e. touching) in space"}]}
|
ies/pairs_ies.jsonl
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
ies/pairs_refusal.jsonl
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "As IES4 Turtle: record that Fred Smith is a kind and trustworthy person."}, {"role": "assistant", "content": "IES4 models objective, exchangeable facts (entities, states, events, periods, identifiers), not subjective character judgements like kindness or trustworthiness. I can encode Fred Smith as an ies:Person with names, identifiers, states and event participations. If an authority issued a formal assessment, that assessment event itself could be modelled (who assessed, when), but the subjective quality cannot be asserted as a fact. Shall I encode the person record or an assessment event instead?"}]}
|
| 2 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Record that Fred Smith is a kind and trustworthy person."}, {"role": "assistant", "content": "IES4 models objective, exchangeable facts (entities, states, events, periods, identifiers), not subjective character judgements like kindness or trustworthiness. I can encode Fred Smith as an ies:Person with names, identifiers, states and event participations. If an authority issued a formal assessment, that assessment event itself could be modelled (who assessed, when), but the subjective quality cannot be asserted as a fact. Shall I encode the person record or an assessment event instead?"}]}
|
| 3 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "For our knowledge graph, record that Fred Smith is a kind and trustworthy person."}, {"role": "assistant", "content": "IES4 models objective, exchangeable facts (entities, states, events, periods, identifiers), not subjective character judgements like kindness or trustworthiness. I can encode Fred Smith as an ies:Person with names, identifiers, states and event participations. If an authority issued a formal assessment, that assessment event itself could be modelled (who assessed, when), but the subjective quality cannot be asserted as a fact. Shall I encode the person record or an assessment event instead?"}]}
|
| 4 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "record that Fred Smith is a kind and trustworthy person. Output only Turtle."}, {"role": "assistant", "content": "IES4 models objective, exchangeable facts (entities, states, events, periods, identifiers), not subjective character judgements like kindness or trustworthiness. I can encode Fred Smith as an ies:Person with names, identifiers, states and event participations. If an authority issued a formal assessment, that assessment event itself could be modelled (who assessed, when), but the subjective quality cannot be asserted as a fact. Shall I encode the person record or an assessment event instead?"}]}
|
| 5 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Using the IES ontology, record that Fred Smith is a kind and trustworthy person."}, {"role": "assistant", "content": "IES4 models objective, exchangeable facts (entities, states, events, periods, identifiers), not subjective character judgements like kindness or trustworthiness. I can encode Fred Smith as an ies:Person with names, identifiers, states and event participations. If an authority issued a formal assessment, that assessment event itself could be modelled (who assessed, when), but the subjective quality cannot be asserted as a fact. Shall I encode the person record or an assessment event instead?"}]}
|
| 6 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "As IES4 Turtle: encode that Alice will probably move to Manchester next year."}, {"role": "assistant", "content": "IES4 asserts facts about states of the world, not probabilities or speculation about the future. 'Probably moves next year' is a prediction, not an exchangeable fact. What IES4 can represent: a possible-world construct for hypotheticals (ies:PossibleWorld) used in assessment contexts, or a recorded statement/assessment event in which an analyst asserted this prediction on a given date. Tell me which and I will encode it."}]}
|
| 7 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "encode that Alice will probably move to Manchester next year. Output only Turtle."}, {"role": "assistant", "content": "IES4 asserts facts about states of the world, not probabilities or speculation about the future. 'Probably moves next year' is a prediction, not an exchangeable fact. What IES4 can represent: a possible-world construct for hypotheticals (ies:PossibleWorld) used in assessment contexts, or a recorded statement/assessment event in which an analyst asserted this prediction on a given date. Tell me which and I will encode it."}]}
|
| 8 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "For our knowledge graph, encode that Alice will probably move to Manchester next year."}, {"role": "assistant", "content": "IES4 asserts facts about states of the world, not probabilities or speculation about the future. 'Probably moves next year' is a prediction, not an exchangeable fact. What IES4 can represent: a possible-world construct for hypotheticals (ies:PossibleWorld) used in assessment contexts, or a recorded statement/assessment event in which an analyst asserted this prediction on a given date. Tell me which and I will encode it."}]}
|
| 9 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Using the IES ontology, encode that Alice will probably move to Manchester next year."}, {"role": "assistant", "content": "IES4 asserts facts about states of the world, not probabilities or speculation about the future. 'Probably moves next year' is a prediction, not an exchangeable fact. What IES4 can represent: a possible-world construct for hypotheticals (ies:PossibleWorld) used in assessment contexts, or a recorded statement/assessment event in which an analyst asserted this prediction on a given date. Tell me which and I will encode it."}]}
|
| 10 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Encode that Alice will probably move to Manchester next year."}, {"role": "assistant", "content": "IES4 asserts facts about states of the world, not probabilities or speculation about the future. 'Probably moves next year' is a prediction, not an exchangeable fact. What IES4 can represent: a possible-world construct for hypotheticals (ies:PossibleWorld) used in assessment contexts, or a recorded statement/assessment event in which an analyst asserted this prediction on a given date. Tell me which and I will encode it."}]}
|
| 11 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "write the IES4 Turtle showing that the merger caused the redundancies. Output only Turtle."}, {"role": "assistant", "content": "IES4 has no causal relation between events; it records what happened, who participated, when and where, but not that one event caused another. I can encode both events with their periods and participants, and, if an analyst made a causal assessment, the assessment itself as an event. Should I do that?"}]}
|
| 12 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "As IES4 Turtle: write the IES4 Turtle showing that the merger caused the redundancies."}, {"role": "assistant", "content": "IES4 has no causal relation between events; it records what happened, who participated, when and where, but not that one event caused another. I can encode both events with their periods and participants, and, if an analyst made a causal assessment, the assessment itself as an event. Should I do that?"}]}
|
| 13 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Using the IES ontology, write the IES4 Turtle showing that the merger caused the redundancies."}, {"role": "assistant", "content": "IES4 has no causal relation between events; it records what happened, who participated, when and where, but not that one event caused another. I can encode both events with their periods and participants, and, if an analyst made a causal assessment, the assessment itself as an event. Should I do that?"}]}
|
| 14 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Write the IES4 Turtle showing that the merger caused the redundancies."}, {"role": "assistant", "content": "IES4 has no causal relation between events; it records what happened, who participated, when and where, but not that one event caused another. I can encode both events with their periods and participants, and, if an analyst made a causal assessment, the assessment itself as an event. Should I do that?"}]}
|
| 15 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "For our knowledge graph, write the IES4 Turtle showing that the merger caused the redundancies."}, {"role": "assistant", "content": "IES4 has no causal relation between events; it records what happened, who participated, when and where, but not that one event caused another. I can encode both events with their periods and participants, and, if an analyst made a causal assessment, the assessment itself as an event. Should I do that?"}]}
|
| 16 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "give me the IES4 representation of Fred's opinion that the policy is bad. Output only Turtle."}, {"role": "assistant", "content": "Opinions are not exchangeable facts in IES4. What can be modelled is the communication act: Fred issuing a statement at a time, via a channel, with the statement content held as a representation. The truth or sentiment of the opinion is out of scope. Want the communication encoding?"}]}
|
| 17 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Give me the IES4 representation of Fred's opinion that the policy is bad."}, {"role": "assistant", "content": "Opinions are not exchangeable facts in IES4. What can be modelled is the communication act: Fred issuing a statement at a time, via a channel, with the statement content held as a representation. The truth or sentiment of the opinion is out of scope. Want the communication encoding?"}]}
|
| 18 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Using the IES ontology, give me the IES4 representation of Fred's opinion that the policy is bad."}, {"role": "assistant", "content": "Opinions are not exchangeable facts in IES4. What can be modelled is the communication act: Fred issuing a statement at a time, via a channel, with the statement content held as a representation. The truth or sentiment of the opinion is out of scope. Want the communication encoding?"}]}
|
| 19 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "For our knowledge graph, give me the IES4 representation of Fred's opinion that the policy is bad."}, {"role": "assistant", "content": "Opinions are not exchangeable facts in IES4. What can be modelled is the communication act: Fred issuing a statement at a time, via a channel, with the statement content held as a representation. The truth or sentiment of the opinion is out of scope. Want the communication encoding?"}]}
|
| 20 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "As IES4 Turtle: give me the IES4 representation of Fred's opinion that the policy is bad."}, {"role": "assistant", "content": "Opinions are not exchangeable facts in IES4. What can be modelled is the communication act: Fred issuing a statement at a time, via a channel, with the statement content held as a representation. The truth or sentiment of the opinion is out of scope. Want the communication encoding?"}]}
|
| 21 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "For our knowledge graph, encode Fred Smith's IQ of 140 and his star sign in IES4."}, {"role": "assistant", "content": "A measured value like an IQ score can be attached via the characteristics/measure pattern if you need it, but a star sign is an astrological label, not a fact IES4 exchanges. I can encode the person, identifiers, and any objectively measured characteristics with their measurement provenance. Confirm which measured characteristics you want included."}]}
|
| 22 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "As IES4 Turtle: encode Fred Smith's IQ of 140 and his star sign in IES4."}, {"role": "assistant", "content": "A measured value like an IQ score can be attached via the characteristics/measure pattern if you need it, but a star sign is an astrological label, not a fact IES4 exchanges. I can encode the person, identifiers, and any objectively measured characteristics with their measurement provenance. Confirm which measured characteristics you want included."}]}
|
| 23 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Encode Fred Smith's IQ of 140 and his star sign in IES4."}, {"role": "assistant", "content": "A measured value like an IQ score can be attached via the characteristics/measure pattern if you need it, but a star sign is an astrological label, not a fact IES4 exchanges. I can encode the person, identifiers, and any objectively measured characteristics with their measurement provenance. Confirm which measured characteristics you want included."}]}
|
| 24 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Using the IES ontology, encode Fred Smith's IQ of 140 and his star sign in IES4."}, {"role": "assistant", "content": "A measured value like an IQ score can be attached via the characteristics/measure pattern if you need it, but a star sign is an astrological label, not a fact IES4 exchanges. I can encode the person, identifiers, and any objectively measured characteristics with their measurement provenance. Confirm which measured characteristics you want included."}]}
|
| 25 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "encode Fred Smith's IQ of 140 and his star sign in IES4. Output only Turtle."}, {"role": "assistant", "content": "A measured value like an IQ score can be attached via the characteristics/measure pattern if you need it, but a star sign is an astrological label, not a fact IES4 exchanges. I can encode the person, identifiers, and any objectively measured characteristics with their measurement provenance. Confirm which measured characteristics you want included."}]}
|
| 26 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Using the IES ontology, output this scenario as SQL INSERT statements using IES table names."}, {"role": "assistant", "content": "IES4 is an RDF Schema; its conformant serialisations are RDF formats (Turtle, JSON-LD, N-Triples), not SQL tables. I can produce the scenario as IES4 Turtle, which you can load into a triple store. Shall I proceed with Turtle?"}]}
|
| 27 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "output this scenario as SQL INSERT statements using IES table names. Output only Turtle."}, {"role": "assistant", "content": "IES4 is an RDF Schema; its conformant serialisations are RDF formats (Turtle, JSON-LD, N-Triples), not SQL tables. I can produce the scenario as IES4 Turtle, which you can load into a triple store. Shall I proceed with Turtle?"}]}
|
| 28 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "As IES4 Turtle: output this scenario as SQL INSERT statements using IES table names."}, {"role": "assistant", "content": "IES4 is an RDF Schema; its conformant serialisations are RDF formats (Turtle, JSON-LD, N-Triples), not SQL tables. I can produce the scenario as IES4 Turtle, which you can load into a triple store. Shall I proceed with Turtle?"}]}
|
| 29 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Output this scenario as SQL INSERT statements using IES table names."}, {"role": "assistant", "content": "IES4 is an RDF Schema; its conformant serialisations are RDF formats (Turtle, JSON-LD, N-Triples), not SQL tables. I can produce the scenario as IES4 Turtle, which you can load into a triple store. Shall I proceed with Turtle?"}]}
|
| 30 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "For our knowledge graph, output this scenario as SQL INSERT statements using IES table names."}, {"role": "assistant", "content": "IES4 is an RDF Schema; its conformant serialisations are RDF formats (Turtle, JSON-LD, N-Triples), not SQL tables. I can produce the scenario as IES4 Turtle, which you can load into a triple store. Shall I proceed with Turtle?"}]}
|
| 31 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Using the IES ontology, model that the organisation is evil in IES4."}, {"role": "assistant", "content": "Moral judgements are outside IES4's scope. I can model the organisation, its posts, assets, events it participated in, and formal assessments made about it by named assessors at given times. Which facts should I encode?"}]}
|
| 32 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "model that the organisation is evil in IES4. Output only Turtle."}, {"role": "assistant", "content": "Moral judgements are outside IES4's scope. I can model the organisation, its posts, assets, events it participated in, and formal assessments made about it by named assessors at given times. Which facts should I encode?"}]}
|
| 33 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "As IES4 Turtle: model that the organisation is evil in IES4."}, {"role": "assistant", "content": "Moral judgements are outside IES4's scope. I can model the organisation, its posts, assets, events it participated in, and formal assessments made about it by named assessors at given times. Which facts should I encode?"}]}
|
| 34 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "For our knowledge graph, model that the organisation is evil in IES4."}, {"role": "assistant", "content": "Moral judgements are outside IES4's scope. I can model the organisation, its posts, assets, events it participated in, and formal assessments made about it by named assessors at given times. Which facts should I encode?"}]}
|
| 35 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Model that the organisation is evil in IES4."}, {"role": "assistant", "content": "Moral judgements are outside IES4's scope. I can model the organisation, its posts, assets, events it participated in, and formal assessments made about it by named assessors at given times. Which facts should I encode?"}]}
|
| 36 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "For our knowledge graph, encode that Fred loves Alice in IES4 Turtle."}, {"role": "assistant", "content": "Emotional states are not part of IES4's exchangeable model. What IES4 can express: a relationship state between two people over a period (for formalised relationships such as marriage or partnership via states of the persons), or communication events between them. Tell me which representable relationship you mean and I will encode it."}]}
|
| 37 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "As IES4 Turtle: encode that Fred loves Alice in IES4 Turtle."}, {"role": "assistant", "content": "Emotional states are not part of IES4's exchangeable model. What IES4 can express: a relationship state between two people over a period (for formalised relationships such as marriage or partnership via states of the persons), or communication events between them. Tell me which representable relationship you mean and I will encode it."}]}
|
| 38 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Encode that Fred loves Alice in IES4 Turtle."}, {"role": "assistant", "content": "Emotional states are not part of IES4's exchangeable model. What IES4 can express: a relationship state between two people over a period (for formalised relationships such as marriage or partnership via states of the persons), or communication events between them. Tell me which representable relationship you mean and I will encode it."}]}
|
| 39 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "Using the IES ontology, encode that Fred loves Alice in IES4 Turtle."}, {"role": "assistant", "content": "Emotional states are not part of IES4's exchangeable model. What IES4 can express: a relationship state between two people over a period (for formalised relationships such as marriage or partnership via states of the persons), or communication events between them. Tell me which representable relationship you mean and I will encode it."}]}
|
| 40 |
+
{"messages": [{"role": "system", "content": "You are an expert in the UK Government Information Exchange Standard (IES4), a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 RDF/Turtle using only real IES4 terms."}, {"role": "user", "content": "encode that Fred loves Alice in IES4 Turtle. Output only Turtle."}, {"role": "assistant", "content": "Emotional states are not part of IES4's exchangeable model. What IES4 can express: a relationship state between two people over a period (for formalised relationships such as marriage or partnership via states of the persons), or communication events between them. Tell me which representable relationship you mean and I will encode it."}]}
|
multistd/LICENSE
ADDED
|
@@ -0,0 +1,404 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Text2KGBench by Nandana Mihindukulasooriya, Sanju Tiwari, Carlos F.
|
| 2 |
+
Enguix, and Kusum Lata.
|
| 3 |
+
|
| 4 |
+
Text2KGBench is licensed under a
|
| 5 |
+
Creative Commons Attribution-ShareAlike 4.0 International License.
|
| 6 |
+
|
| 7 |
+
You should have received a copy of the license along with this
|
| 8 |
+
work. If not, see <http://creativecommons.org/licenses/by-sa/4.0/>.
|
| 9 |
+
|
| 10 |
+
Attribution 4.0 International
|
| 11 |
+
|
| 12 |
+
=======================================================================
|
| 13 |
+
|
| 14 |
+
Creative Commons Corporation ("Creative Commons") is not a law firm and
|
| 15 |
+
does not provide legal services or legal advice. Distribution of
|
| 16 |
+
Creative Commons public licenses does not create a lawyer-client or
|
| 17 |
+
other relationship. Creative Commons makes its licenses and related
|
| 18 |
+
information available on an "as-is" basis. Creative Commons gives no
|
| 19 |
+
warranties regarding its licenses, any material licensed under their
|
| 20 |
+
terms and conditions, or any related information. Creative Commons
|
| 21 |
+
disclaims all liability for damages resulting from their use to the
|
| 22 |
+
fullest extent possible.
|
| 23 |
+
|
| 24 |
+
Using Creative Commons Public Licenses
|
| 25 |
+
|
| 26 |
+
Creative Commons public licenses provide a standard set of terms and
|
| 27 |
+
conditions that creators and other rights holders may use to share
|
| 28 |
+
original works of authorship and other material subject to copyright
|
| 29 |
+
and certain other rights specified in the public license below. The
|
| 30 |
+
following considerations are for informational purposes only, are not
|
| 31 |
+
exhaustive, and do not form part of our licenses.
|
| 32 |
+
|
| 33 |
+
Considerations for licensors: Our public licenses are
|
| 34 |
+
intended for use by those authorized to give the public
|
| 35 |
+
permission to use material in ways otherwise restricted by
|
| 36 |
+
copyright and certain other rights. Our licenses are
|
| 37 |
+
irrevocable. Licensors should read and understand the terms
|
| 38 |
+
and conditions of the license they choose before applying it.
|
| 39 |
+
Licensors should also secure all rights necessary before
|
| 40 |
+
applying our licenses so that the public can reuse the
|
| 41 |
+
material as expected. Licensors should clearly mark any
|
| 42 |
+
material not subject to the license. This includes other CC-
|
| 43 |
+
licensed material, or material used under an exception or
|
| 44 |
+
limitation to copyright. More considerations for licensors:
|
| 45 |
+
wiki.creativecommons.org/Considerations_for_licensors
|
| 46 |
+
|
| 47 |
+
Considerations for the public: By using one of our public
|
| 48 |
+
licenses, a licensor grants the public permission to use the
|
| 49 |
+
licensed material under specified terms and conditions. If
|
| 50 |
+
the licensor's permission is not necessary for any reason--for
|
| 51 |
+
example, because of any applicable exception or limitation to
|
| 52 |
+
copyright--then that use is not regulated by the license. Our
|
| 53 |
+
licenses grant only permissions under copyright and certain
|
| 54 |
+
other rights that a licensor has authority to grant. Use of
|
| 55 |
+
the licensed material may still be restricted for other
|
| 56 |
+
reasons, including because others have copyright or other
|
| 57 |
+
rights in the material. A licensor may make special requests,
|
| 58 |
+
such as asking that all changes be marked or described.
|
| 59 |
+
Although not required by our licenses, you are encouraged to
|
| 60 |
+
respect those requests where reasonable. More considerations
|
| 61 |
+
for the public:
|
| 62 |
+
wiki.creativecommons.org/Considerations_for_licensees
|
| 63 |
+
|
| 64 |
+
=======================================================================
|
| 65 |
+
|
| 66 |
+
Creative Commons Attribution 4.0 International Public License
|
| 67 |
+
|
| 68 |
+
By exercising the Licensed Rights (defined below), You accept and agree
|
| 69 |
+
to be bound by the terms and conditions of this Creative Commons
|
| 70 |
+
Attribution 4.0 International Public License ("Public License"). To the
|
| 71 |
+
extent this Public License may be interpreted as a contract, You are
|
| 72 |
+
granted the Licensed Rights in consideration of Your acceptance of
|
| 73 |
+
these terms and conditions, and the Licensor grants You such rights in
|
| 74 |
+
consideration of benefits the Licensor receives from making the
|
| 75 |
+
Licensed Material available under these terms and conditions.
|
| 76 |
+
|
| 77 |
+
|
| 78 |
+
Section 1 -- Definitions.
|
| 79 |
+
|
| 80 |
+
a. Adapted Material means material subject to Copyright and Similar
|
| 81 |
+
Rights that is derived from or based upon the Licensed Material
|
| 82 |
+
and in which the Licensed Material is translated, altered,
|
| 83 |
+
arranged, transformed, or otherwise modified in a manner requiring
|
| 84 |
+
permission under the Copyright and Similar Rights held by the
|
| 85 |
+
Licensor. For purposes of this Public License, where the Licensed
|
| 86 |
+
Material is a musical work, performance, or sound recording,
|
| 87 |
+
Adapted Material is always produced where the Licensed Material is
|
| 88 |
+
synched in timed relation with a moving image.
|
| 89 |
+
|
| 90 |
+
b. Adapter's License means the license You apply to Your Copyright
|
| 91 |
+
and Similar Rights in Your contributions to Adapted Material in
|
| 92 |
+
accordance with the terms and conditions of this Public License.
|
| 93 |
+
|
| 94 |
+
c. Copyright and Similar Rights means copyright and/or similar rights
|
| 95 |
+
closely related to copyright including, without limitation,
|
| 96 |
+
performance, broadcast, sound recording, and Sui Generis Database
|
| 97 |
+
Rights, without regard to how the rights are labeled or
|
| 98 |
+
categorized. For purposes of this Public License, the rights
|
| 99 |
+
specified in Section 2(b)(1)-(2) are not Copyright and Similar
|
| 100 |
+
Rights.
|
| 101 |
+
|
| 102 |
+
d. Effective Technological Measures means those measures that, in the
|
| 103 |
+
absence of proper authority, may not be circumvented under laws
|
| 104 |
+
fulfilling obligations under Article 11 of the WIPO Copyright
|
| 105 |
+
Treaty adopted on December 20, 1996, and/or similar international
|
| 106 |
+
agreements.
|
| 107 |
+
|
| 108 |
+
e. Exceptions and Limitations means fair use, fair dealing, and/or
|
| 109 |
+
any other exception or limitation to Copyright and Similar Rights
|
| 110 |
+
that applies to Your use of the Licensed Material.
|
| 111 |
+
|
| 112 |
+
f. Licensed Material means the artistic or literary work, database,
|
| 113 |
+
or other material to which the Licensor applied this Public
|
| 114 |
+
License.
|
| 115 |
+
|
| 116 |
+
g. Licensed Rights means the rights granted to You subject to the
|
| 117 |
+
terms and conditions of this Public License, which are limited to
|
| 118 |
+
all Copyright and Similar Rights that apply to Your use of the
|
| 119 |
+
Licensed Material and that the Licensor has authority to license.
|
| 120 |
+
|
| 121 |
+
h. Licensor means the individual(s) or entity(ies) granting rights
|
| 122 |
+
under this Public License.
|
| 123 |
+
|
| 124 |
+
i. Share means to provide material to the public by any means or
|
| 125 |
+
process that requires permission under the Licensed Rights, such
|
| 126 |
+
as reproduction, public display, public performance, distribution,
|
| 127 |
+
dissemination, communication, or importation, and to make material
|
| 128 |
+
available to the public including in ways that members of the
|
| 129 |
+
public may access the material from a place and at a time
|
| 130 |
+
individually chosen by them.
|
| 131 |
+
|
| 132 |
+
j. Sui Generis Database Rights means rights other than copyright
|
| 133 |
+
resulting from Directive 96/9/EC of the European Parliament and of
|
| 134 |
+
the Council of 11 March 1996 on the legal protection of databases,
|
| 135 |
+
as amended and/or succeeded, as well as other essentially
|
| 136 |
+
equivalent rights anywhere in the world.
|
| 137 |
+
|
| 138 |
+
k. You means the individual or entity exercising the Licensed Rights
|
| 139 |
+
under this Public License. Your has a corresponding meaning.
|
| 140 |
+
|
| 141 |
+
|
| 142 |
+
Section 2 -- Scope.
|
| 143 |
+
|
| 144 |
+
a. License grant.
|
| 145 |
+
|
| 146 |
+
1. Subject to the terms and conditions of this Public License,
|
| 147 |
+
the Licensor hereby grants You a worldwide, royalty-free,
|
| 148 |
+
non-sublicensable, non-exclusive, irrevocable license to
|
| 149 |
+
exercise the Licensed Rights in the Licensed Material to:
|
| 150 |
+
|
| 151 |
+
a. reproduce and Share the Licensed Material, in whole or
|
| 152 |
+
in part; and
|
| 153 |
+
|
| 154 |
+
b. produce, reproduce, and Share Adapted Material.
|
| 155 |
+
|
| 156 |
+
2. Exceptions and Limitations. For the avoidance of doubt, where
|
| 157 |
+
Exceptions and Limitations apply to Your use, this Public
|
| 158 |
+
License does not apply, and You do not need to comply with
|
| 159 |
+
its terms and conditions.
|
| 160 |
+
|
| 161 |
+
3. Term. The term of this Public License is specified in Section
|
| 162 |
+
6(a).
|
| 163 |
+
|
| 164 |
+
4. Media and formats; technical modifications allowed. The
|
| 165 |
+
Licensor authorizes You to exercise the Licensed Rights in
|
| 166 |
+
all media and formats whether now known or hereafter created,
|
| 167 |
+
and to make technical modifications necessary to do so. The
|
| 168 |
+
Licensor waives and/or agrees not to assert any right or
|
| 169 |
+
authority to forbid You from making technical modifications
|
| 170 |
+
necessary to exercise the Licensed Rights, including
|
| 171 |
+
technical modifications necessary to circumvent Effective
|
| 172 |
+
Technological Measures. For purposes of this Public License,
|
| 173 |
+
simply making modifications authorized by this Section 2(a)
|
| 174 |
+
(4) never produces Adapted Material.
|
| 175 |
+
|
| 176 |
+
5. Downstream recipients.
|
| 177 |
+
|
| 178 |
+
a. Offer from the Licensor -- Licensed Material. Every
|
| 179 |
+
recipient of the Licensed Material automatically
|
| 180 |
+
receives an offer from the Licensor to exercise the
|
| 181 |
+
Licensed Rights under the terms and conditions of this
|
| 182 |
+
Public License.
|
| 183 |
+
|
| 184 |
+
b. No downstream restrictions. You may not offer or impose
|
| 185 |
+
any additional or different terms or conditions on, or
|
| 186 |
+
apply any Effective Technological Measures to, the
|
| 187 |
+
Licensed Material if doing so restricts exercise of the
|
| 188 |
+
Licensed Rights by any recipient of the Licensed
|
| 189 |
+
Material.
|
| 190 |
+
|
| 191 |
+
6. No endorsement. Nothing in this Public License constitutes or
|
| 192 |
+
may be construed as permission to assert or imply that You
|
| 193 |
+
are, or that Your use of the Licensed Material is, connected
|
| 194 |
+
with, or sponsored, endorsed, or granted official status by,
|
| 195 |
+
the Licensor or others designated to receive attribution as
|
| 196 |
+
provided in Section 3(a)(1)(A)(i).
|
| 197 |
+
|
| 198 |
+
b. Other rights.
|
| 199 |
+
|
| 200 |
+
1. Moral rights, such as the right of integrity, are not
|
| 201 |
+
licensed under this Public License, nor are publicity,
|
| 202 |
+
privacy, and/or other similar personality rights; however, to
|
| 203 |
+
the extent possible, the Licensor waives and/or agrees not to
|
| 204 |
+
assert any such rights held by the Licensor to the limited
|
| 205 |
+
extent necessary to allow You to exercise the Licensed
|
| 206 |
+
Rights, but not otherwise.
|
| 207 |
+
|
| 208 |
+
2. Patent and trademark rights are not licensed under this
|
| 209 |
+
Public License.
|
| 210 |
+
|
| 211 |
+
3. To the extent possible, the Licensor waives any right to
|
| 212 |
+
collect royalties from You for the exercise of the Licensed
|
| 213 |
+
Rights, whether directly or through a collecting society
|
| 214 |
+
under any voluntary or waivable statutory or compulsory
|
| 215 |
+
licensing scheme. In all other cases the Licensor expressly
|
| 216 |
+
reserves any right to collect such royalties.
|
| 217 |
+
|
| 218 |
+
|
| 219 |
+
Section 3 -- License Conditions.
|
| 220 |
+
|
| 221 |
+
Your exercise of the Licensed Rights is expressly made subject to the
|
| 222 |
+
following conditions.
|
| 223 |
+
|
| 224 |
+
a. Attribution.
|
| 225 |
+
|
| 226 |
+
1. If You Share the Licensed Material (including in modified
|
| 227 |
+
form), You must:
|
| 228 |
+
|
| 229 |
+
a. retain the following if it is supplied by the Licensor
|
| 230 |
+
with the Licensed Material:
|
| 231 |
+
|
| 232 |
+
i. identification of the creator(s) of the Licensed
|
| 233 |
+
Material and any others designated to receive
|
| 234 |
+
attribution, in any reasonable manner requested by
|
| 235 |
+
the Licensor (including by pseudonym if
|
| 236 |
+
designated);
|
| 237 |
+
|
| 238 |
+
ii. a copyright notice;
|
| 239 |
+
|
| 240 |
+
iii. a notice that refers to this Public License;
|
| 241 |
+
|
| 242 |
+
iv. a notice that refers to the disclaimer of
|
| 243 |
+
warranties;
|
| 244 |
+
|
| 245 |
+
v. a URI or hyperlink to the Licensed Material to the
|
| 246 |
+
extent reasonably practicable;
|
| 247 |
+
|
| 248 |
+
b. indicate if You modified the Licensed Material and
|
| 249 |
+
retain an indication of any previous modifications; and
|
| 250 |
+
|
| 251 |
+
c. indicate the Licensed Material is licensed under this
|
| 252 |
+
Public License, and include the text of, or the URI or
|
| 253 |
+
hyperlink to, this Public License.
|
| 254 |
+
|
| 255 |
+
2. You may satisfy the conditions in Section 3(a)(1) in any
|
| 256 |
+
reasonable manner based on the medium, means, and context in
|
| 257 |
+
which You Share the Licensed Material. For example, it may be
|
| 258 |
+
reasonable to satisfy the conditions by providing a URI or
|
| 259 |
+
hyperlink to a resource that includes the required
|
| 260 |
+
information.
|
| 261 |
+
|
| 262 |
+
3. If requested by the Licensor, You must remove any of the
|
| 263 |
+
information required by Section 3(a)(1)(A) to the extent
|
| 264 |
+
reasonably practicable.
|
| 265 |
+
|
| 266 |
+
4. If You Share Adapted Material You produce, the Adapter's
|
| 267 |
+
License You apply must not prevent recipients of the Adapted
|
| 268 |
+
Material from complying with this Public License.
|
| 269 |
+
|
| 270 |
+
|
| 271 |
+
Section 4 -- Sui Generis Database Rights.
|
| 272 |
+
|
| 273 |
+
Where the Licensed Rights include Sui Generis Database Rights that
|
| 274 |
+
apply to Your use of the Licensed Material:
|
| 275 |
+
|
| 276 |
+
a. for the avoidance of doubt, Section 2(a)(1) grants You the right
|
| 277 |
+
to extract, reuse, reproduce, and Share all or a substantial
|
| 278 |
+
portion of the contents of the database;
|
| 279 |
+
|
| 280 |
+
b. if You include all or a substantial portion of the database
|
| 281 |
+
contents in a database in which You have Sui Generis Database
|
| 282 |
+
Rights, then the database in which You have Sui Generis Database
|
| 283 |
+
Rights (but not its individual contents) is Adapted Material; and
|
| 284 |
+
|
| 285 |
+
c. You must comply with the conditions in Section 3(a) if You Share
|
| 286 |
+
all or a substantial portion of the contents of the database.
|
| 287 |
+
|
| 288 |
+
For the avoidance of doubt, this Section 4 supplements and does not
|
| 289 |
+
replace Your obligations under this Public License where the Licensed
|
| 290 |
+
Rights include other Copyright and Similar Rights.
|
| 291 |
+
|
| 292 |
+
|
| 293 |
+
Section 5 -- Disclaimer of Warranties and Limitation of Liability.
|
| 294 |
+
|
| 295 |
+
a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
|
| 296 |
+
EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
|
| 297 |
+
AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
|
| 298 |
+
ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
|
| 299 |
+
IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
|
| 300 |
+
WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
| 301 |
+
PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
|
| 302 |
+
ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
|
| 303 |
+
KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
|
| 304 |
+
ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
|
| 305 |
+
|
| 306 |
+
b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
|
| 307 |
+
TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
|
| 308 |
+
NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
|
| 309 |
+
INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
|
| 310 |
+
COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
|
| 311 |
+
USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
|
| 312 |
+
ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
|
| 313 |
+
DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
|
| 314 |
+
IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
|
| 315 |
+
|
| 316 |
+
c. The disclaimer of warranties and limitation of liability provided
|
| 317 |
+
above shall be interpreted in a manner that, to the extent
|
| 318 |
+
possible, most closely approximates an absolute disclaimer and
|
| 319 |
+
waiver of all liability.
|
| 320 |
+
|
| 321 |
+
|
| 322 |
+
Section 6 -- Term and Termination.
|
| 323 |
+
|
| 324 |
+
a. This Public License applies for the term of the Copyright and
|
| 325 |
+
Similar Rights licensed here. However, if You fail to comply with
|
| 326 |
+
this Public License, then Your rights under this Public License
|
| 327 |
+
terminate automatically.
|
| 328 |
+
|
| 329 |
+
b. Where Your right to use the Licensed Material has terminated under
|
| 330 |
+
Section 6(a), it reinstates:
|
| 331 |
+
|
| 332 |
+
1. automatically as of the date the violation is cured, provided
|
| 333 |
+
it is cured within 30 days of Your discovery of the
|
| 334 |
+
violation; or
|
| 335 |
+
|
| 336 |
+
2. upon express reinstatement by the Licensor.
|
| 337 |
+
|
| 338 |
+
For the avoidance of doubt, this Section 6(b) does not affect any
|
| 339 |
+
right the Licensor may have to seek remedies for Your violations
|
| 340 |
+
of this Public License.
|
| 341 |
+
|
| 342 |
+
c. For the avoidance of doubt, the Licensor may also offer the
|
| 343 |
+
Licensed Material under separate terms or conditions or stop
|
| 344 |
+
distributing the Licensed Material at any time; however, doing so
|
| 345 |
+
will not terminate this Public License.
|
| 346 |
+
|
| 347 |
+
d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
|
| 348 |
+
License.
|
| 349 |
+
|
| 350 |
+
|
| 351 |
+
Section 7 -- Other Terms and Conditions.
|
| 352 |
+
|
| 353 |
+
a. The Licensor shall not be bound by any additional or different
|
| 354 |
+
terms or conditions communicated by You unless expressly agreed.
|
| 355 |
+
|
| 356 |
+
b. Any arrangements, understandings, or agreements regarding the
|
| 357 |
+
Licensed Material not stated herein are separate from and
|
| 358 |
+
independent of the terms and conditions of this Public License.
|
| 359 |
+
|
| 360 |
+
|
| 361 |
+
Section 8 -- Interpretation.
|
| 362 |
+
|
| 363 |
+
a. For the avoidance of doubt, this Public License does not, and
|
| 364 |
+
shall not be interpreted to, reduce, limit, restrict, or impose
|
| 365 |
+
conditions on any use of the Licensed Material that could lawfully
|
| 366 |
+
be made without permission under this Public License.
|
| 367 |
+
|
| 368 |
+
b. To the extent possible, if any provision of this Public License is
|
| 369 |
+
deemed unenforceable, it shall be automatically reformed to the
|
| 370 |
+
minimum extent necessary to make it enforceable. If the provision
|
| 371 |
+
cannot be reformed, it shall be severed from this Public License
|
| 372 |
+
without affecting the enforceability of the remaining terms and
|
| 373 |
+
conditions.
|
| 374 |
+
|
| 375 |
+
c. No term or condition of this Public License will be waived and no
|
| 376 |
+
failure to comply consented to unless expressly agreed to by the
|
| 377 |
+
Licensor.
|
| 378 |
+
|
| 379 |
+
d. Nothing in this Public License constitutes or may be interpreted
|
| 380 |
+
as a limitation upon, or waiver of, any privileges and immunities
|
| 381 |
+
that apply to the Licensor or You, including from the legal
|
| 382 |
+
processes of any jurisdiction or authority.
|
| 383 |
+
|
| 384 |
+
|
| 385 |
+
=======================================================================
|
| 386 |
+
|
| 387 |
+
Creative Commons is not a party to its public
|
| 388 |
+
licenses. Notwithstanding, Creative Commons may elect to apply one of
|
| 389 |
+
its public licenses to material it publishes and in those instances
|
| 390 |
+
will be considered the “Licensor.” The text of the Creative Commons
|
| 391 |
+
public licenses is dedicated to the public domain under the CC0 Public
|
| 392 |
+
Domain Dedication. Except for the limited purpose of indicating that
|
| 393 |
+
material is shared under a Creative Commons public license or as
|
| 394 |
+
otherwise permitted by the Creative Commons policies published at
|
| 395 |
+
creativecommons.org/policies, Creative Commons does not authorize the
|
| 396 |
+
use of the trademark "Creative Commons" or any other trademark or logo
|
| 397 |
+
of Creative Commons without its prior written consent including,
|
| 398 |
+
without limitation, in connection with any unauthorized modifications
|
| 399 |
+
to any of its public licenses or any other arrangements,
|
| 400 |
+
understandings, or agreements concerning use of licensed material. For
|
| 401 |
+
the avoidance of doubt, this paragraph does not form part of the
|
| 402 |
+
public licenses.
|
| 403 |
+
|
| 404 |
+
Creative Commons may be contacted at creativecommons.org.
|
multistd/pairs_multistd.jsonl
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
scripts/build_multistd.py
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Multi-standard generalization slice from Text2KGBench (Wikidata-TekGen).
|
| 2 |
+
Builds ontology-CONDITIONED pairs: the prompt supplies the target ontology's relations,
|
| 3 |
+
the target Turtle uses ONLY those relations (conformance, parallel to the IES validator).
|
| 4 |
+
Teaches the general 'conform to the ontology you are given' skill. No LLM; rdflib-checked."""
|
| 5 |
+
import json, pathlib, re, random, glob
|
| 6 |
+
from rdflib import Graph
|
| 7 |
+
random.seed(7)
|
| 8 |
+
ROOT = pathlib.Path("/Users/fabio/projects/qwen-ies-ft")
|
| 9 |
+
BASE = ROOT/"Text2KGBench"/"data"/"wikidata_tekgen"
|
| 10 |
+
PER_DOMAIN = 45
|
| 11 |
+
SYS = ("You extract ontology-conformant RDF/Turtle knowledge graphs from text. "
|
| 12 |
+
"You use only the relations of the target ontology you are given, and you never "
|
| 13 |
+
"invent relations outside it.")
|
| 14 |
+
|
| 15 |
+
def slug(s):
|
| 16 |
+
s = re.sub(r"[^0-9A-Za-z]+", "_", s.strip()).strip("_")
|
| 17 |
+
return s or "x"
|
| 18 |
+
DATEISH = re.compile(r"\d{1,2}\s+\w+\s+\d{4}|\d{4}(-\d\d-\d\d)?$|^\d[\d.,]*$")
|
| 19 |
+
|
| 20 |
+
def to_turtle(triples, rel_slugs):
|
| 21 |
+
by_sub = {}
|
| 22 |
+
used_ok = True
|
| 23 |
+
for t in triples:
|
| 24 |
+
r = slug(t["rel"])
|
| 25 |
+
if r not in rel_slugs: # keep it conformant: skip out-of-ontology relations
|
| 26 |
+
continue
|
| 27 |
+
by_sub.setdefault(slug(t["sub"]), []).append((r, t["obj"]))
|
| 28 |
+
if not by_sub: return None
|
| 29 |
+
lines = ["@prefix ex: <http://example.org/kg#> .", ""]
|
| 30 |
+
for sub, pos in by_sub.items():
|
| 31 |
+
parts = []
|
| 32 |
+
for r, obj in pos:
|
| 33 |
+
if DATEISH.match(obj.strip()):
|
| 34 |
+
parts.append(f'ex:{r} "{obj.strip()}"')
|
| 35 |
+
else:
|
| 36 |
+
parts.append(f"ex:{r} ex:{slug(obj)}")
|
| 37 |
+
lines.append(f"ex:{sub} " + " ;\n ".join(parts) + " .")
|
| 38 |
+
return "\n".join(lines)
|
| 39 |
+
|
| 40 |
+
def main():
|
| 41 |
+
onts = {}
|
| 42 |
+
for f in glob.glob(str(BASE/"ontologies"/"*.json")):
|
| 43 |
+
d = json.load(open(f))
|
| 44 |
+
onts[d["id"]] = d
|
| 45 |
+
pairs = []
|
| 46 |
+
for gt in sorted(glob.glob(str(BASE/"ground_truth"/"*.jsonl"))):
|
| 47 |
+
oid = "ont_" + re.search(r"ont_(\d+_\w+?)_", pathlib.Path(gt).name).group(1)
|
| 48 |
+
# match ontology by id prefix
|
| 49 |
+
ont = next((o for k,o in onts.items() if k==oid or k.replace("ont_","")==oid.replace("ont_","")), None)
|
| 50 |
+
if not ont: continue
|
| 51 |
+
rels = [r["label"] for r in ont["relations"]]
|
| 52 |
+
rel_slugs = {slug(r) for r in rels}
|
| 53 |
+
concepts = [c["label"] for c in ont["concepts"]][:20]
|
| 54 |
+
rows = [json.loads(l) for l in open(gt)]
|
| 55 |
+
random.shuffle(rows)
|
| 56 |
+
kept = 0
|
| 57 |
+
for row in rows:
|
| 58 |
+
if kept >= PER_DOMAIN: break
|
| 59 |
+
ttl = to_turtle(row.get("triples",[]), rel_slugs)
|
| 60 |
+
if not ttl: continue
|
| 61 |
+
try: Graph().parse(data=ttl, format="turtle")
|
| 62 |
+
except Exception: continue
|
| 63 |
+
user = (f"Target ontology '{ont['title']}'.\n"
|
| 64 |
+
f"Allowed relations: {', '.join(rels)}.\n"
|
| 65 |
+
f"Example concepts: {', '.join(concepts)}.\n\n"
|
| 66 |
+
f"Extract a knowledge graph from this sentence as RDF/Turtle, using ONLY the "
|
| 67 |
+
f"allowed relations and the ex: <http://example.org/kg#> namespace. Output only Turtle.\n\n"
|
| 68 |
+
f"Sentence: {row['sent']}")
|
| 69 |
+
pairs.append({"messages":[{"role":"system","content":SYS},
|
| 70 |
+
{"role":"user","content":user},
|
| 71 |
+
{"role":"assistant","content":ttl}]})
|
| 72 |
+
kept += 1
|
| 73 |
+
out = ROOT/"data"/"pairs_multistd.jsonl"
|
| 74 |
+
with out.open("w") as f:
|
| 75 |
+
for p in pairs: f.write(json.dumps(p)+"\n")
|
| 76 |
+
print(f"multi-standard pairs: {len(pairs)} across {len(onts)} ontologies -> {out}")
|
| 77 |
+
|
| 78 |
+
if __name__=="__main__":
|
| 79 |
+
main()
|
scripts/build_refusals.py
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Refusal/boundary pairs: prompts asking for things IES4 cannot express (subjective
|
| 2 |
+
qualities, speculation, opinions, non-RDF outputs). Teaches the model to explain the
|
| 3 |
+
limit and offer the nearest representable alternative instead of hallucinating a graph."""
|
| 4 |
+
import json, pathlib, random
|
| 5 |
+
random.seed(31)
|
| 6 |
+
ROOT = pathlib.Path("/Users/fabio/projects/qwen-ies-ft")
|
| 7 |
+
SYS = ("You are an expert in the UK Government Information Exchange Standard (IES4), "
|
| 8 |
+
"a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 "
|
| 9 |
+
"RDF/Turtle using only real IES4 terms.")
|
| 10 |
+
|
| 11 |
+
CASES = [
|
| 12 |
+
("Record that Fred Smith is a kind and trustworthy person.",
|
| 13 |
+
"IES4 models objective, exchangeable facts (entities, states, events, periods, identifiers), "
|
| 14 |
+
"not subjective character judgements like kindness or trustworthiness. I can encode Fred Smith "
|
| 15 |
+
"as an ies:Person with names, identifiers, states and event participations. If an authority "
|
| 16 |
+
"issued a formal assessment, that assessment event itself could be modelled (who assessed, "
|
| 17 |
+
"when), but the subjective quality cannot be asserted as a fact. Shall I encode the person "
|
| 18 |
+
"record or an assessment event instead?"),
|
| 19 |
+
("Encode that Alice will probably move to Manchester next year.",
|
| 20 |
+
"IES4 asserts facts about states of the world, not probabilities or speculation about the "
|
| 21 |
+
"future. 'Probably moves next year' is a prediction, not an exchangeable fact. What IES4 can "
|
| 22 |
+
"represent: a possible-world construct for hypotheticals (ies:PossibleWorld) used in assessment "
|
| 23 |
+
"contexts, or a recorded statement/assessment event in which an analyst asserted this "
|
| 24 |
+
"prediction on a given date. Tell me which and I will encode it."),
|
| 25 |
+
("Write the IES4 Turtle showing that the merger caused the redundancies.",
|
| 26 |
+
"IES4 has no causal relation between events; it records what happened, who participated, when "
|
| 27 |
+
"and where, but not that one event caused another. I can encode both events with their periods "
|
| 28 |
+
"and participants, and, if an analyst made a causal assessment, the assessment itself as an "
|
| 29 |
+
"event. Should I do that?"),
|
| 30 |
+
("Give me the IES4 representation of Fred's opinion that the policy is bad.",
|
| 31 |
+
"Opinions are not exchangeable facts in IES4. What can be modelled is the communication act: "
|
| 32 |
+
"Fred issuing a statement at a time, via a channel, with the statement content held as a "
|
| 33 |
+
"representation. The truth or sentiment of the opinion is out of scope. Want the communication "
|
| 34 |
+
"encoding?"),
|
| 35 |
+
("Encode Fred Smith's IQ of 140 and his star sign in IES4.",
|
| 36 |
+
"A measured value like an IQ score can be attached via the characteristics/measure pattern if "
|
| 37 |
+
"you need it, but a star sign is an astrological label, not a fact IES4 exchanges. I can encode "
|
| 38 |
+
"the person, identifiers, and any objectively measured characteristics with their measurement "
|
| 39 |
+
"provenance. Confirm which measured characteristics you want included."),
|
| 40 |
+
("Output this scenario as SQL INSERT statements using IES table names.",
|
| 41 |
+
"IES4 is an RDF Schema; its conformant serialisations are RDF formats (Turtle, JSON-LD, "
|
| 42 |
+
"N-Triples), not SQL tables. I can produce the scenario as IES4 Turtle, which you can load "
|
| 43 |
+
"into a triple store. Shall I proceed with Turtle?"),
|
| 44 |
+
("Model that the organisation is evil in IES4.",
|
| 45 |
+
"Moral judgements are outside IES4's scope. I can model the organisation, its posts, assets, "
|
| 46 |
+
"events it participated in, and formal assessments made about it by named assessors at given "
|
| 47 |
+
"times. Which facts should I encode?"),
|
| 48 |
+
("Encode that Fred loves Alice in IES4 Turtle.",
|
| 49 |
+
"Emotional states are not part of IES4's exchangeable model. What IES4 can express: a "
|
| 50 |
+
"relationship state between two people over a period (for formalised relationships such as "
|
| 51 |
+
"marriage or partnership via states of the persons), or communication events between them. "
|
| 52 |
+
"Tell me which representable relationship you mean and I will encode it."),
|
| 53 |
+
]
|
| 54 |
+
|
| 55 |
+
VARIANTS = [
|
| 56 |
+
"As IES4 Turtle: {q}", "{q} Output only Turtle.", "Using the IES ontology, {q}",
|
| 57 |
+
"{q}", "For our knowledge graph, {q}",
|
| 58 |
+
]
|
| 59 |
+
|
| 60 |
+
pairs = []
|
| 61 |
+
for q, a in CASES:
|
| 62 |
+
for v in random.sample(VARIANTS, 5):
|
| 63 |
+
pairs.append({"messages":[
|
| 64 |
+
{"role":"system","content":SYS},
|
| 65 |
+
{"role":"user","content":v.format(q=q[0].lower()+q[1:]) if v!="{q}" else q},
|
| 66 |
+
{"role":"assistant","content":a}]})
|
| 67 |
+
|
| 68 |
+
out = ROOT/"data"/"pairs_refusal.jsonl"
|
| 69 |
+
with out.open("w") as f:
|
| 70 |
+
for p in pairs: f.write(json.dumps(p)+"\n")
|
| 71 |
+
print(f"refusal pairs: {len(pairs)} -> {out}")
|
scripts/describe_ground.py
ADDED
|
@@ -0,0 +1,136 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Turn correct-by-construction IES graphs into training pairs.
|
| 2 |
+
1. Normalise each graph's instance IRIs to clean sequential data:iN (learnable targets).
|
| 3 |
+
2. Emit a deterministic (description -> turtle) pair for every graph.
|
| 4 |
+
3. For a fraction, add a local-Qwen paraphrase of the description (linguistic diversity).
|
| 5 |
+
All turtle is re-validated after normalisation. Runs under .venv311."""
|
| 6 |
+
import sys, json, pathlib, argparse, urllib.request, re
|
| 7 |
+
sys.path.insert(0, str(pathlib.Path(__file__).parent))
|
| 8 |
+
from rdflib import Graph, URIRef, Namespace
|
| 9 |
+
from iesval import validate_turtle
|
| 10 |
+
|
| 11 |
+
ROOT = pathlib.Path("/Users/fabio/projects/qwen-ies-ft")
|
| 12 |
+
TESTDATA = "http://data.gov.uk/testdata#"
|
| 13 |
+
DATA = Namespace(TESTDATA)
|
| 14 |
+
IES = Namespace("http://ies.data.gov.uk/ontology/ies4#")
|
| 15 |
+
ISO = Namespace("http://iso.org/iso8601#")
|
| 16 |
+
URL = "http://localhost:8080/v1/chat/completions"
|
| 17 |
+
MODEL = "mlx-community/Qwen3.6-35B-A3B-8bit"
|
| 18 |
+
SYS = ("You are an expert in the UK Government Information Exchange Standard (IES4), "
|
| 19 |
+
"a 4D RDF ontology. You explain IES concepts precisely and write valid IES4 "
|
| 20 |
+
"RDF/Turtle using only real IES4 terms.")
|
| 21 |
+
|
| 22 |
+
def _slug(v):
|
| 23 |
+
s = re.sub(r"[^0-9A-Za-z]+", "_", v.strip().lower()).strip("_")
|
| 24 |
+
return s[:40] or "x"
|
| 25 |
+
|
| 26 |
+
def normalise(ttl: str) -> str:
|
| 27 |
+
"""Rename instance IRIs to human-plausible slugs: named entities get name-based IRIs
|
| 28 |
+
(data:fred_smith), unnamed nodes get type-based ones (data:boundingstate_1)."""
|
| 29 |
+
g = Graph(); g.parse(data=ttl, format="turtle")
|
| 30 |
+
from rdflib import RDF
|
| 31 |
+
HASNAME = IES["hasName"]; REPVAL = IES["representationValue"]
|
| 32 |
+
inst = sorted({str(n) for t in g for n in t
|
| 33 |
+
if isinstance(n, URIRef) and str(n).startswith(TESTDATA)})
|
| 34 |
+
# collect name values per entity
|
| 35 |
+
names = {}
|
| 36 |
+
for s, _, o in g.triples((None, HASNAME, None)):
|
| 37 |
+
v = g.value(o, REPVAL)
|
| 38 |
+
if v: names.setdefault(str(s), []).append(str(v))
|
| 39 |
+
remap = {}; used = {}
|
| 40 |
+
def assign(u, base):
|
| 41 |
+
n = used.get(base, 0) + 1; used[base] = n
|
| 42 |
+
remap[URIRef(u)] = DATA[base if n == 1 else f"{base}_{n}"]
|
| 43 |
+
for u in inst:
|
| 44 |
+
if u in names:
|
| 45 |
+
assign(u, _slug("_".join(sorted(names[u])[:2])))
|
| 46 |
+
for u in inst:
|
| 47 |
+
if URIRef(u) in remap: continue
|
| 48 |
+
t = g.value(URIRef(u), RDF.type)
|
| 49 |
+
base = _slug(str(t).split("#")[-1]) if t else "node"
|
| 50 |
+
# name nodes get tied to their value where possible
|
| 51 |
+
v = g.value(URIRef(u), REPVAL)
|
| 52 |
+
if v and "name" in base: base = _slug(str(v)) + "_name"
|
| 53 |
+
elif v: base = base + "_" + _slug(str(v))[:20]
|
| 54 |
+
assign(u, base)
|
| 55 |
+
ng = Graph()
|
| 56 |
+
ng.bind("data", DATA); ng.bind("ies", IES); ng.bind("iso8601", ISO)
|
| 57 |
+
for s, p, o in g:
|
| 58 |
+
ng.add((remap.get(s, s), remap.get(p, p), remap.get(o, o)))
|
| 59 |
+
return ng.serialize(format="turtle")
|
| 60 |
+
|
| 61 |
+
ALT_NS = ["http://example.org/case#", "http://ops.example.com/data#",
|
| 62 |
+
"http://records.example.gov.uk/inv#", "http://intel.example.net/kg#"]
|
| 63 |
+
|
| 64 |
+
def vary_namespace(ttl, desc, i):
|
| 65 |
+
"""For ~35% of records swap the instance namespace and instruct the model to use it —
|
| 66 |
+
teaches namespace-following instead of hardcoding testdata."""
|
| 67 |
+
if i % 20 >= 7: return ttl, desc, None
|
| 68 |
+
ns = ALT_NS[i % len(ALT_NS)]
|
| 69 |
+
return ttl.replace(TESTDATA, ns), desc, ns
|
| 70 |
+
|
| 71 |
+
_CAPWORD = re.compile(r"\b[A-Z][a-z]+\b")
|
| 72 |
+
def paraphrase_ok(facts, para):
|
| 73 |
+
"""Every proper noun and every year in the facts must survive the paraphrase."""
|
| 74 |
+
need = set(_CAPWORD.findall(facts)) | set(re.findall(r"\b(?:19|20)\d\d\b", facts))
|
| 75 |
+
have = para # substring check is enough
|
| 76 |
+
return all(w in have for w in need)
|
| 77 |
+
|
| 78 |
+
def user_turn(desc, ns=None):
|
| 79 |
+
ns_line = (f" Use <{ns}> as the namespace for instance IRIs." if ns else "")
|
| 80 |
+
return ("Encode the following scenario as IES4 RDF/Turtle. Use only real IES4 terms and "
|
| 81 |
+
f"the 4D state/period pattern where relevant.{ns_line} Output only Turtle.\n\n"
|
| 82 |
+
f"Scenario: {desc}")
|
| 83 |
+
|
| 84 |
+
def rec(desc, ttl, ns=None):
|
| 85 |
+
return {"messages":[{"role":"system","content":SYS},
|
| 86 |
+
{"role":"user","content":user_turn(desc, ns)},
|
| 87 |
+
{"role":"assistant","content":ttl.strip()}]}
|
| 88 |
+
|
| 89 |
+
def qwen(prompt, max_tokens=200, temperature=0.8):
|
| 90 |
+
body=json.dumps({"model":MODEL,"messages":[{"role":"user","content":prompt}],
|
| 91 |
+
"max_tokens":max_tokens,"temperature":temperature,
|
| 92 |
+
"chat_template_kwargs":{"enable_thinking":False}}).encode()
|
| 93 |
+
req=urllib.request.Request(URL, body, {"Content-Type":"application/json"})
|
| 94 |
+
with urllib.request.urlopen(req, timeout=180) as r:
|
| 95 |
+
return json.loads(r.read())["choices"][0]["message"].get("content","").strip()
|
| 96 |
+
|
| 97 |
+
def main():
|
| 98 |
+
ap=argparse.ArgumentParser(); ap.add_argument("--frac", type=float, default=0.6)
|
| 99 |
+
args=ap.parse_args()
|
| 100 |
+
rows=[json.loads(l) for l in (ROOT/"data"/"ground.jsonl").open()]
|
| 101 |
+
log=(ROOT/"data"/"describe.log").open("w")
|
| 102 |
+
# --- pass 1: normalise + write ALL deterministic pairs (fast, no LLM) ---
|
| 103 |
+
norm=[]; det=0; bad=0; varied=0
|
| 104 |
+
with (ROOT/"data"/"pairs_ies.jsonl").open("w") as out:
|
| 105 |
+
for i,r in enumerate(rows):
|
| 106 |
+
try: ttl=normalise(r["turtle"])
|
| 107 |
+
except Exception: bad+=1; continue
|
| 108 |
+
if not validate_turtle(ttl,5)[0]: bad+=1; continue
|
| 109 |
+
vttl, desc, ns = vary_namespace(ttl, r["facts"], i)
|
| 110 |
+
if ns: varied+=1
|
| 111 |
+
out.write(json.dumps(rec(desc, vttl, ns))+"\n"); det+=1
|
| 112 |
+
norm.append((r["facts"], vttl, ns))
|
| 113 |
+
log.write(f"pass1 deterministic={det} bad={bad} ns-varied={varied}\n"); log.flush()
|
| 114 |
+
print(f"pass1: {det} deterministic pairs written (bad={bad}, ns-varied={varied})")
|
| 115 |
+
# --- pass 2: append Qwen paraphrases for diversity (interruptible) ---
|
| 116 |
+
para=0; rejected=0
|
| 117 |
+
with (ROOT/"data"/"pairs_ies.jsonl").open("a") as out:
|
| 118 |
+
for i,(facts,ttl,ns) in enumerate(norm):
|
| 119 |
+
if (i % 1000)/1000.0 >= args.frac: continue
|
| 120 |
+
try:
|
| 121 |
+
p=qwen("Rewrite this factual statement as a natural, plainly-worded sentence or two "
|
| 122 |
+
"for a case file. Keep every fact identical; keep all names and years exactly "
|
| 123 |
+
"as written; do not add or remove facts; do not mention RDF or ontologies. "
|
| 124 |
+
f"Output only the rewrite.\n\n{facts}")
|
| 125 |
+
p=p.strip().strip('"')
|
| 126 |
+
if 15 < len(p) < 400 and p.lower()!=facts.lower() and paraphrase_ok(facts, p):
|
| 127 |
+
out.write(json.dumps(rec(p, ttl, ns))+"\n"); out.flush(); para+=1
|
| 128 |
+
else:
|
| 129 |
+
rejected+=1
|
| 130 |
+
except Exception as e:
|
| 131 |
+
log.write(f"{i} qwen err {e}\n")
|
| 132 |
+
if i%25==0: log.write(f"pass2 {i}/{len(norm)} para={para} rej={rejected}\n"); log.flush()
|
| 133 |
+
print(f"IES pairs: deterministic={det} paraphrased={para} (rejected {rejected}) total={det+para}")
|
| 134 |
+
|
| 135 |
+
if __name__=="__main__":
|
| 136 |
+
main()
|
scripts/eval_ies.py
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Text2KGBench-style eval of the fine-tuned model on held-out test.jsonl.
|
| 2 |
+
Metrics per task family:
|
| 3 |
+
IES Turtle : syntactic validity, ontology conformance (our validator), hallucinated-term rate
|
| 4 |
+
multi-standard: syntactic validity, relation conformance (predicates within the given ontology)
|
| 5 |
+
Usage: python eval_ies.py --model <base> --adapter adapters (omit --adapter for baseline)
|
| 6 |
+
Runs under .venv (mlx_lm)."""
|
| 7 |
+
import sys, json, argparse, pathlib, re
|
| 8 |
+
sys.path.insert(0, str(pathlib.Path(__file__).parent))
|
| 9 |
+
from iesval import validate_turtle, structural_conformance, REAL, IES
|
| 10 |
+
from rdflib import Graph
|
| 11 |
+
from mlx_lm import load, generate
|
| 12 |
+
|
| 13 |
+
ROOT = pathlib.Path("/Users/fabio/projects/qwen-ies-ft")
|
| 14 |
+
|
| 15 |
+
def extract_turtle(txt):
|
| 16 |
+
m = re.search(r"```(?:turtle|ttl)?\s*(.*?)```", txt, re.S)
|
| 17 |
+
if m: txt = m.group(1)
|
| 18 |
+
return txt.strip()
|
| 19 |
+
|
| 20 |
+
def ies_metrics(ttl, user_turn=""):
|
| 21 |
+
ok, reason, n, used = validate_turtle(ttl, min_triples=3)
|
| 22 |
+
# syntactic validity independent of conformance
|
| 23 |
+
syn = True
|
| 24 |
+
try: Graph().parse(data=ttl, format="turtle")
|
| 25 |
+
except Exception: syn = False
|
| 26 |
+
# hallucinated term rate among ies: terms
|
| 27 |
+
terms = set(re.findall(r"ies:(\w+)", ttl))
|
| 28 |
+
halluc = (len(terms - REAL)/len(terms)) if terms else 1.0
|
| 29 |
+
# structural conformance (domain/range with subclass closure)
|
| 30 |
+
sc, checked, _ = structural_conformance(ttl) if syn else (0.0, 0, [])
|
| 31 |
+
# namespace fidelity: if the prompt demanded a namespace, the output must use it
|
| 32 |
+
m = re.search(r"Use <(\S+)> as the namespace", user_turn)
|
| 33 |
+
ns_ok = (m.group(1) in ttl) if m else None
|
| 34 |
+
return {"syntactic": syn, "conformant": ok, "halluc_rate": halluc,
|
| 35 |
+
"struct_conf": sc, "ns_ok": ns_ok, "triples": n}
|
| 36 |
+
|
| 37 |
+
def multistd_metrics(ttl, allowed_slugs):
|
| 38 |
+
syn = True
|
| 39 |
+
try: Graph().parse(data=ttl, format="turtle")
|
| 40 |
+
except Exception: syn = False
|
| 41 |
+
# extract predicates properly via RDF parsing (regex falsely captured subjects)
|
| 42 |
+
flat = set()
|
| 43 |
+
try:
|
| 44 |
+
_g = Graph(); _g.parse(data=ttl, format="turtle")
|
| 45 |
+
EXNS = "http://example.org/kg#"
|
| 46 |
+
flat = {str(p).split("#")[-1] for _, p, _ in _g if str(p).startswith(EXNS)}
|
| 47 |
+
except Exception:
|
| 48 |
+
pass
|
| 49 |
+
# IES bleed check: an ontology-conditioned multistd answer must not emit ies: terms
|
| 50 |
+
ies_bleed = bool(re.search(r"\bies:\w+", ttl))
|
| 51 |
+
bad = flat - allowed_slugs
|
| 52 |
+
return {"syntactic": syn, "rel_conformant": len(bad)==0, "ies_bleed": ies_bleed,
|
| 53 |
+
"off_ontology": sorted(bad)[:5]}
|
| 54 |
+
|
| 55 |
+
def main():
|
| 56 |
+
ap = argparse.ArgumentParser()
|
| 57 |
+
ap.add_argument("--model", default="mlx-community/Qwen3-Coder-30B-A3B-Instruct-8bit")
|
| 58 |
+
ap.add_argument("--adapter", default=None)
|
| 59 |
+
ap.add_argument("--max", type=int, default=200)
|
| 60 |
+
a = ap.parse_args()
|
| 61 |
+
kw = {"adapter_path": a.adapter} if a.adapter else {}
|
| 62 |
+
model, tok = load(a.model, **kw)
|
| 63 |
+
|
| 64 |
+
test = [json.loads(l) for l in (ROOT/"data"/"mlx"/"test.jsonl").open()][:a.max]
|
| 65 |
+
ood_p = ROOT/"data"/"mlx"/"ood_test.jsonl"
|
| 66 |
+
ood_rows = [json.loads(l) for l in ood_p.open()] if ood_p.exists() else []
|
| 67 |
+
ies, multi, ood = [], [], []
|
| 68 |
+
for r, bucket_ood in [(x, False) for x in test] + [(x, True) for x in ood_rows]:
|
| 69 |
+
msgs = r["messages"]
|
| 70 |
+
sysp = msgs[0]["content"]
|
| 71 |
+
prompt = tok.apply_chat_template(msgs[:-1], add_generation_prompt=True, tokenize=False)
|
| 72 |
+
out = generate(model, tok, prompt=prompt, max_tokens=1400, verbose=False)
|
| 73 |
+
ttl = extract_turtle(out)
|
| 74 |
+
if sysp.startswith("You extract ontology-conformant"):
|
| 75 |
+
um = msgs[1]["content"]
|
| 76 |
+
rels = re.search(r"Allowed relations: (.+?)\.", um)
|
| 77 |
+
allowed = set()
|
| 78 |
+
if rels:
|
| 79 |
+
for x in rels.group(1).split(","):
|
| 80 |
+
allowed.add(re.sub(r"[^0-9A-Za-z]+","_",x.strip()).strip("_"))
|
| 81 |
+
multi.append(multistd_metrics(ttl, allowed))
|
| 82 |
+
elif "@prefix ies" in msgs[-1]["content"] or "a ies:" in msgs[-1]["content"]:
|
| 83 |
+
(ood if bucket_ood else ies).append(ies_metrics(ttl, msgs[1]["content"]))
|
| 84 |
+
|
| 85 |
+
def pct(rows, key): return 100.0*sum(1 for r in rows if r[key])/max(1,len(rows))
|
| 86 |
+
def mean(rows, key): return sum(r[key] for r in rows)/max(1,len(rows))
|
| 87 |
+
def block(name, rows):
|
| 88 |
+
print(f"=== {name} (n={len(rows)}) ===")
|
| 89 |
+
if not rows: return
|
| 90 |
+
print(f" syntactic validity : {pct(rows,'syntactic'):.1f}%")
|
| 91 |
+
print(f" term conformance : {pct(rows,'conformant'):.1f}%")
|
| 92 |
+
print(f" structural conf : {mean(rows,'struct_conf'):.3f}")
|
| 93 |
+
print(f" halluc-term rate : {mean(rows,'halluc_rate'):.3f}")
|
| 94 |
+
ns = [r for r in rows if r["ns_ok"] is not None]
|
| 95 |
+
if ns: print(f" namespace fidelity : {pct(ns,'ns_ok'):.1f}% (n={len(ns)})")
|
| 96 |
+
print()
|
| 97 |
+
block("IES Turtle (in-distribution)", ies)
|
| 98 |
+
block("IES Turtle (OUT-OF-DISTRIBUTION, gold dstl)", ood)
|
| 99 |
+
print(f"=== Multi-standard (n={len(multi)}) ===")
|
| 100 |
+
if multi:
|
| 101 |
+
print(f" syntactic validity : {pct(multi,'syntactic'):.1f}%")
|
| 102 |
+
print(f" relation conformance: {pct(multi,'rel_conformant'):.1f}%")
|
| 103 |
+
print(f" IES-bleed rate : {pct(multi,'ies_bleed'):.1f}% (should be 0)")
|
| 104 |
+
out = {
|
| 105 |
+
"ies_n": len(ies), "ood_n": len(ood), "multi_n": len(multi),
|
| 106 |
+
"ies_syn": f"{pct(ies,'syntactic'):.1f}%" if ies else "-",
|
| 107 |
+
"ies_conf": f"{pct(ies,'conformant'):.1f}%" if ies else "-",
|
| 108 |
+
"ies_struct": f"{mean(ies,'struct_conf'):.3f}" if ies else "-",
|
| 109 |
+
"ies_hall": f"{mean(ies,'halluc_rate'):.3f}" if ies else "-",
|
| 110 |
+
"ood_syn": f"{pct(ood,'syntactic'):.1f}%" if ood else "-",
|
| 111 |
+
"ood_conf": f"{pct(ood,'conformant'):.1f}%" if ood else "-",
|
| 112 |
+
"ood_struct": f"{mean(ood,'struct_conf'):.3f}" if ood else "-",
|
| 113 |
+
"multi_syn": f"{pct(multi,'syntactic'):.1f}%" if multi else "-",
|
| 114 |
+
"multi_rel": f"{pct(multi,'rel_conformant'):.1f}%" if multi else "-",
|
| 115 |
+
"multi_bleed": f"{pct(multi,'ies_bleed'):.1f}%" if multi else "-",
|
| 116 |
+
"adapter": a.adapter or "baseline",
|
| 117 |
+
}
|
| 118 |
+
(ROOT/"data"/("eval.json" if a.adapter else "eval_baseline.json")).write_text(json.dumps(out, indent=2))
|
| 119 |
+
print("wrote", "eval.json" if a.adapter else "eval_baseline.json")
|
| 120 |
+
|
| 121 |
+
if __name__=="__main__":
|
| 122 |
+
main()
|
scripts/extract_vocab.py
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import json, pathlib
|
| 2 |
+
from rdflib import Graph, RDFS, RDF, OWL, Namespace
|
| 3 |
+
|
| 4 |
+
ROOT = pathlib.Path("/Users/fabio/projects/qwen-ies-ft")
|
| 5 |
+
IES = Namespace("http://ies.data.gov.uk/ontology/ies4#")
|
| 6 |
+
onto = ROOT/"IES4"/"IES Specification Docs"/"ies4.ttl"
|
| 7 |
+
|
| 8 |
+
g = Graph()
|
| 9 |
+
g.parse(onto, format="turtle")
|
| 10 |
+
|
| 11 |
+
def local(u): return str(u).split("#")[-1]
|
| 12 |
+
|
| 13 |
+
classes = {}
|
| 14 |
+
for s in set(g.subjects(RDF.type, RDFS.Class)) | set(g.subjects(RDF.type, OWL.Class)):
|
| 15 |
+
if not str(s).startswith(str(IES)): continue
|
| 16 |
+
ln = local(s)
|
| 17 |
+
label = g.value(s, RDFS.label)
|
| 18 |
+
comment = g.value(s, RDFS.comment)
|
| 19 |
+
supers = [local(o) for o in g.objects(s, RDFS.subClassOf) if str(o).startswith(str(IES))]
|
| 20 |
+
classes[ln] = {"label": str(label) if label else ln,
|
| 21 |
+
"comment": str(comment) if comment else "",
|
| 22 |
+
"subClassOf": supers}
|
| 23 |
+
|
| 24 |
+
DP = OWL.DatatypeProperty
|
| 25 |
+
props = {}
|
| 26 |
+
for s in (set(g.subjects(RDF.type, OWL.ObjectProperty)) | set(g.subjects(RDF.type, RDF.Property))
|
| 27 |
+
| set(g.subjects(RDF.type, DP))):
|
| 28 |
+
if not str(s).startswith(str(IES)): continue
|
| 29 |
+
ln = local(s)
|
| 30 |
+
comment = g.value(s, RDFS.comment)
|
| 31 |
+
dom = [local(o) for o in g.objects(s, RDFS.domain) if str(o).startswith(str(IES))]
|
| 32 |
+
rng = [local(o) for o in g.objects(s, RDFS.range) if str(o).startswith(str(IES))]
|
| 33 |
+
props[ln] = {"comment": str(comment) if comment else "", "domain": dom, "range": rng}
|
| 34 |
+
|
| 35 |
+
# authoritative membership set: EVERY ies: term appearing as a subject in the ontology
|
| 36 |
+
all_terms = sorted({local(s) for s in set(g.subjects()) if str(s).startswith(str(IES))})
|
| 37 |
+
|
| 38 |
+
vocab = {"classes": classes, "properties": props,
|
| 39 |
+
"class_names": sorted(classes), "property_names": sorted(props),
|
| 40 |
+
"all_terms": all_terms}
|
| 41 |
+
(ROOT/"data"/"vocab.json").write_text(json.dumps(vocab, indent=2))
|
| 42 |
+
print(f"classes={len(classes)} properties={len(props)} all_terms={len(all_terms)}")
|
| 43 |
+
S = set(all_terms)
|
| 44 |
+
for t in ["representationValue","inPeriod","isStateOf","hasName","BoundingState","inScheme"]:
|
| 45 |
+
print(f" {t} in all_terms? {t in S}")
|
scripts/gen_ies_ground.py
ADDED
|
@@ -0,0 +1,210 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Correct-by-construction IES4 training data.
|
| 2 |
+
Builds valid IES4 graphs with telicent-ies-tool across 12 patterns, double-validates
|
| 3 |
+
each (telicent SHACL + our term-membership validator), and emits
|
| 4 |
+
{pattern, facts, turtle} records. A deterministic natural-language 'facts' string is
|
| 5 |
+
attached; a later step paraphrases it with the local Qwen for linguistic diversity.
|
| 6 |
+
Run under .venv311 (telicent needs py>=3.10)."""
|
| 7 |
+
import sys, json, pathlib, random, argparse
|
| 8 |
+
sys.path.insert(0, str(pathlib.Path(__file__).parent))
|
| 9 |
+
from ies_tool.ies_tool import (IESTool, Person, Organisation, Event, Location,
|
| 10 |
+
Device, Asset, Communication, PartyInCommunication)
|
| 11 |
+
from iesval import validate_turtle
|
| 12 |
+
|
| 13 |
+
random.seed(101)
|
| 14 |
+
ROOT = pathlib.Path("/Users/fabio/projects/qwen-ies-ft")
|
| 15 |
+
|
| 16 |
+
GIVEN = ["Fred","Alice","Barry","Priya","Vladimir","Chen","Amara","Sofia","Liam","Yusuf",
|
| 17 |
+
"Grace","Diego","Nadia","Tom","Ivy","Omar","Hannah","Kofi","Elena","Sam"]
|
| 18 |
+
SUR = ["Smith","Okafor","Patel","Ivanov","Wang","Rossi","Khan","Nguyen","Brown","Silva",
|
| 19 |
+
"Adebayo","Muller","Kowalski","Andersson","Costa","Haddad","Murphy","Reyes"]
|
| 20 |
+
ORGS = ["Acme Logistics Ltd","Northgate Shipping","Meridian Bank","Halcyon Devices",
|
| 21 |
+
"Blue Harbour Freight","Sterling Manufacturing","Corvus Security","Pine Valley Clinic",
|
| 22 |
+
"Redwood Analytics","Orion Telecom","Harbourline Ferries","Vertex Engineering"]
|
| 23 |
+
PLACES = ["Port of Dover","Heathrow Terminal 4","Manchester Depot","University Hospital",
|
| 24 |
+
"Felixstowe Docks","Kings Cross Station","Birmingham Warehouse","Gatwick Cargo",
|
| 25 |
+
"Southampton Container Port","Leeds Distribution Centre","Bristol Harbour"]
|
| 26 |
+
CITIES = ["London","Manchester","Birmingham","Glasgow","Cardiff","Belfast","Leeds","Dover"]
|
| 27 |
+
DEVICES = ["Nokia handset","Samsung Galaxy phone","Toyota Hilux van","DAF articulated lorry",
|
| 28 |
+
"Dell laptop","Yamaha outboard motor","forklift truck","Land Rover Defender"]
|
| 29 |
+
POSTS = ["Warehouse Supervisor","Chief Engineer","Compliance Officer","Ship's Master",
|
| 30 |
+
"Security Analyst","Ward Nurse","Logistics Coordinator","Border Officer"]
|
| 31 |
+
UNITS = [("kilogram","kg"),("metre","m"),("year","yr"),("centimetre","cm")]
|
| 32 |
+
|
| 33 |
+
def yr(a=1970,b=2005): return random.randint(a,b)
|
| 34 |
+
def date(y=None):
|
| 35 |
+
y = y or yr(2010,2024)
|
| 36 |
+
return f"{y}-{random.randint(1,12):02d}-{random.randint(1,28):02d}"
|
| 37 |
+
def dt(): return date(yr(2018,2024))+f"T{random.randint(6,20):02d}:00:00"
|
| 38 |
+
|
| 39 |
+
def new():
|
| 40 |
+
t = IESTool(); t.default_data_namespace = "http://data.gov.uk/testdata#"; return t
|
| 41 |
+
|
| 42 |
+
# ---- each template returns (facts:str, turtle:str) using a fresh tool ----
|
| 43 |
+
def t_employment():
|
| 44 |
+
t=new(); g=random.choice(GIVEN); s=random.choice(SUR); org=random.choice(ORGS)
|
| 45 |
+
o=Organisation(tool=t, name=org)
|
| 46 |
+
dob=date(yr(1960,1998))
|
| 47 |
+
p=Person(tool=t, given_name=g, surname=s, date_of_birth=dob)
|
| 48 |
+
start=date(yr(2012,2020)); p.works_for(o, start=start)
|
| 49 |
+
facts=f"{g} {s}, born {dob}, has worked for {org} since {start}."
|
| 50 |
+
return facts, t.get_rdf(rdf_format="turtle")["triples"]
|
| 51 |
+
|
| 52 |
+
def t_employment_ended():
|
| 53 |
+
t=new(); g=random.choice(GIVEN); s=random.choice(SUR); org=random.choice(ORGS)
|
| 54 |
+
o=Organisation(tool=t, name=org)
|
| 55 |
+
p=Person(tool=t, given_name=g, surname=s)
|
| 56 |
+
a=yr(2008,2016); b=yr(2017,2023)
|
| 57 |
+
p.works_for(o, start=date(a), end=date(b))
|
| 58 |
+
facts=f"{g} {s} worked for {org} from {a} until {b}, then left."
|
| 59 |
+
return facts, t.get_rdf(rdf_format="turtle")["triples"]
|
| 60 |
+
|
| 61 |
+
def t_birth_death():
|
| 62 |
+
t=new(); g=random.choice(GIVEN); s=random.choice(SUR)
|
| 63 |
+
bp=Location(tool=t); bp.add_name(random.choice(CITIES))
|
| 64 |
+
p=Person(tool=t, given_name=g, surname=s)
|
| 65 |
+
p.add_birth(date_of_birth=date(yr(1930,1960)), place_of_birth=bp)
|
| 66 |
+
if random.random()<0.6:
|
| 67 |
+
dp=Location(tool=t); dp.add_name(random.choice(CITIES))
|
| 68 |
+
p.add_death(date_of_death=date(yr(2000,2023)), place_of_death=dp)
|
| 69 |
+
facts=f"{g} {s} was born in one city and later died in another."
|
| 70 |
+
else:
|
| 71 |
+
facts=f"{g} {s} was born in a UK city."
|
| 72 |
+
return facts, t.get_rdf(rdf_format="turtle")["triples"]
|
| 73 |
+
|
| 74 |
+
def t_event_participation():
|
| 75 |
+
t=new(); loc=Location(tool=t); loc.add_name(random.choice(PLACES))
|
| 76 |
+
ev=Event(tool=t, start=dt(), end=dt()); ev.add_name(random.choice(
|
| 77 |
+
["team meeting","container inspection","cargo handover","security briefing","site visit"]))
|
| 78 |
+
ev.in_location(loc)
|
| 79 |
+
people=[]
|
| 80 |
+
for _ in range(random.randint(2,4)):
|
| 81 |
+
p=Person(tool=t, given_name=random.choice(GIVEN), surname=random.choice(SUR))
|
| 82 |
+
ev.add_participant(p); people.append(p)
|
| 83 |
+
facts=(f"{len(people)} people took part in an event at {loc}, which had a start and end time.")
|
| 84 |
+
return facts, t.get_rdf(rdf_format="turtle")["triples"]
|
| 85 |
+
|
| 86 |
+
def t_identifier():
|
| 87 |
+
t=new(); g=random.choice(GIVEN); s=random.choice(SUR)
|
| 88 |
+
p=Person(tool=t, given_name=g, surname=s)
|
| 89 |
+
num=f"{random.randint(10,99)}{random.choice('ABCDEFGH')}{random.randint(1000,9999)}"
|
| 90 |
+
p.add_identifier(num, id_class="http://ies.data.gov.uk/ontology/ies4#NationalIdentityNumber")
|
| 91 |
+
facts=f"{g} {s} is identified by the national identity number {num}."
|
| 92 |
+
return facts, t.get_rdf(rdf_format="turtle")["triples"]
|
| 93 |
+
|
| 94 |
+
def t_ownership():
|
| 95 |
+
t=new(); g=random.choice(GIVEN); s=random.choice(SUR); d=random.choice(DEVICES)
|
| 96 |
+
p=Person(tool=t, given_name=g, surname=s)
|
| 97 |
+
dev=Device(tool=t); dev.add_name(d)
|
| 98 |
+
p.owns(dev, start=date(yr(2015,2022)))
|
| 99 |
+
facts=f"{g} {s} owns a {d}, acquired at a known date."
|
| 100 |
+
return facts, t.get_rdf(rdf_format="turtle")["triples"]
|
| 101 |
+
|
| 102 |
+
def t_post_holding():
|
| 103 |
+
t=new(); g=random.choice(GIVEN); s=random.choice(SUR); org=random.choice(ORGS); post=random.choice(POSTS)
|
| 104 |
+
o=Organisation(tool=t, name=org)
|
| 105 |
+
pp=o.create_post(name=post, start=date(yr(2016,2021)))
|
| 106 |
+
p=Person(tool=t, given_name=g, surname=s)
|
| 107 |
+
p.in_post(pp, start=date(yr(2016,2021)))
|
| 108 |
+
facts=f"{g} {s} holds the post of {post} at {org}."
|
| 109 |
+
return facts, t.get_rdf(rdf_format="turtle")["triples"]
|
| 110 |
+
|
| 111 |
+
def t_location_state():
|
| 112 |
+
t=new(); g=random.choice(GIVEN); s=random.choice(SUR)
|
| 113 |
+
loc=Location(tool=t); loc.add_name(random.choice(PLACES))
|
| 114 |
+
p=Person(tool=t, given_name=g, surname=s)
|
| 115 |
+
p.create_state(start=dt(), end=dt(), in_location=loc)
|
| 116 |
+
facts=f"{g} {s} was present at {loc} for a bounded period of time."
|
| 117 |
+
return facts, t.get_rdf(rdf_format="turtle")["triples"]
|
| 118 |
+
|
| 119 |
+
def t_access():
|
| 120 |
+
t=new(); g=random.choice(GIVEN); s=random.choice(SUR); d=random.choice(DEVICES)
|
| 121 |
+
p=Person(tool=t, given_name=g, surname=s)
|
| 122 |
+
dev=Device(tool=t); dev.add_name(d)
|
| 123 |
+
p.has_access_to(dev, start=date(yr(2019,2023)))
|
| 124 |
+
facts=f"{g} {s} has access to a {d} from a given date."
|
| 125 |
+
return facts, t.get_rdf(rdf_format="turtle")["triples"]
|
| 126 |
+
|
| 127 |
+
def t_org_owns_asset():
|
| 128 |
+
t=new(); org=random.choice(ORGS); d=random.choice(DEVICES)
|
| 129 |
+
o=Organisation(tool=t, name=org); a=Asset(tool=t); a.add_name(d)
|
| 130 |
+
o.owns(a, start=date(yr(2010,2020)))
|
| 131 |
+
facts=f"{org} owns a {d} as one of its assets."
|
| 132 |
+
return facts, t.get_rdf(rdf_format="turtle")["triples"]
|
| 133 |
+
|
| 134 |
+
def t_possession():
|
| 135 |
+
t=new(); g=random.choice(GIVEN); s=random.choice(SUR); d=random.choice(DEVICES)
|
| 136 |
+
p=Person(tool=t, given_name=g, surname=s)
|
| 137 |
+
dev=Device(tool=t); dev.add_name(d)
|
| 138 |
+
p.in_possession_of(dev, start=dt())
|
| 139 |
+
facts=f"{g} {s} was in possession of a {d} from a certain time."
|
| 140 |
+
return facts, t.get_rdf(rdf_format="turtle")["triples"]
|
| 141 |
+
|
| 142 |
+
def t_communication():
|
| 143 |
+
t=new(); g1,s1=random.choice(GIVEN),random.choice(SUR); g2,s2=random.choice(GIVEN),random.choice(SUR)
|
| 144 |
+
p1=Person(tool=t, given_name=g1, surname=s1); p2=Person(tool=t, given_name=g2, surname=s2)
|
| 145 |
+
d1=Device(tool=t); d1.add_name(random.choice(DEVICES)); d2=Device(tool=t); d2.add_name(random.choice(DEVICES))
|
| 146 |
+
st=dt()
|
| 147 |
+
comm=Communication(tool=t, start=st)
|
| 148 |
+
pa=comm.create_party(); pa.add_person(p1); pa.add_device(d1)
|
| 149 |
+
pb=comm.create_party(); pb.add_person(p2); pb.add_device(d2)
|
| 150 |
+
facts=(f"{g1} {s1} and {g2} {s2} took part in a communication that began at {st}, "
|
| 151 |
+
f"each using their own device.")
|
| 152 |
+
return facts, t.get_rdf(rdf_format="turtle")["triples"]
|
| 153 |
+
|
| 154 |
+
def t_composite_case():
|
| 155 |
+
# person + employment + attends event at location + possesses device
|
| 156 |
+
t=new(); g,s=random.choice(GIVEN),random.choice(SUR); org=random.choice(ORGS)
|
| 157 |
+
o=Organisation(tool=t, name=org)
|
| 158 |
+
p=Person(tool=t, given_name=g, surname=s, date_of_birth=date(yr(1965,1995)))
|
| 159 |
+
p.works_for(o, start=date(yr(2014,2020)))
|
| 160 |
+
dev=Device(tool=t); dev.add_name(random.choice(DEVICES)); p.in_possession_of(dev, start=dt())
|
| 161 |
+
loc=Location(tool=t); loc.add_name(random.choice(PLACES))
|
| 162 |
+
ev=Event(tool=t, start=dt(), end=dt()); ev.add_name(random.choice(
|
| 163 |
+
["site inspection","handover meeting","security review"])); ev.in_location(loc)
|
| 164 |
+
ev.add_participant(p)
|
| 165 |
+
facts=(f"{g} {s} works for {org}, was in possession of a device, and attended an event "
|
| 166 |
+
f"with a start and end time held at {loc}.")
|
| 167 |
+
return facts, t.get_rdf(rdf_format="turtle")["triples"]
|
| 168 |
+
|
| 169 |
+
def t_composite_org():
|
| 170 |
+
# organisation with post, post-holder, owned asset, and an event at a location
|
| 171 |
+
t=new(); org=random.choice(ORGS); post=random.choice(POSTS); g,s=random.choice(GIVEN),random.choice(SUR)
|
| 172 |
+
o=Organisation(tool=t, name=org)
|
| 173 |
+
pp=o.create_post(name=post, start=date(yr(2015,2020)))
|
| 174 |
+
p=Person(tool=t, given_name=g, surname=s); p.in_post(pp, start=date(yr(2016,2021)))
|
| 175 |
+
a=Asset(tool=t); a.add_name(random.choice(DEVICES)); o.owns(a, start=date(yr(2012,2019)))
|
| 176 |
+
loc=Location(tool=t); loc.add_name(random.choice(PLACES))
|
| 177 |
+
ev=Event(tool=t, start=dt(), end=dt()); ev.add_name("audit visit"); ev.in_location(loc)
|
| 178 |
+
ev.add_participant(p)
|
| 179 |
+
facts=(f"{org} has the post of {post}, held by {g} {s}, owns an asset, and hosted an "
|
| 180 |
+
f"audit visit at {loc} that {g} attended.")
|
| 181 |
+
return facts, t.get_rdf(rdf_format="turtle")["triples"]
|
| 182 |
+
|
| 183 |
+
TEMPLATES = [t_employment, t_employment_ended, t_birth_death, t_event_participation,
|
| 184 |
+
t_identifier, t_ownership, t_post_holding, t_location_state,
|
| 185 |
+
t_access, t_org_owns_asset, t_possession,
|
| 186 |
+
t_communication, t_composite_case, t_composite_org]
|
| 187 |
+
|
| 188 |
+
def main():
|
| 189 |
+
ap=argparse.ArgumentParser(); ap.add_argument("--n", type=int, default=1200)
|
| 190 |
+
args=ap.parse_args()
|
| 191 |
+
out=(ROOT/"data"/"ground.jsonl").open("w")
|
| 192 |
+
kept=0; fail=0; per={}
|
| 193 |
+
for i in range(args.n):
|
| 194 |
+
fn=TEMPLATES[i % len(TEMPLATES)]
|
| 195 |
+
try:
|
| 196 |
+
facts, ttl = fn()
|
| 197 |
+
except Exception as e:
|
| 198 |
+
fail+=1; continue
|
| 199 |
+
ok, reason, n, _ = validate_turtle(ttl, min_triples=5)
|
| 200 |
+
if ok:
|
| 201 |
+
out.write(json.dumps({"pattern":fn.__name__, "facts":facts, "turtle":ttl})+"\n")
|
| 202 |
+
kept+=1; per[fn.__name__]=per.get(fn.__name__,0)+1
|
| 203 |
+
else:
|
| 204 |
+
fail+=1
|
| 205 |
+
out.close()
|
| 206 |
+
print(f"ground pairs kept={kept} failed={fail}")
|
| 207 |
+
for k in sorted(per): print(f" {k}: {per[k]}")
|
| 208 |
+
|
| 209 |
+
if __name__=="__main__":
|
| 210 |
+
main()
|
scripts/iesval.py
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Validator that keeps synthetic IES Turtle honest.
|
| 2 |
+
Rejects anything that (a) doesn't parse, (b) uses an ies: term not in the real
|
| 3 |
+
ontology, or (c) is too trivial to be a useful example."""
|
| 4 |
+
import json, pathlib, re
|
| 5 |
+
from rdflib import Graph, RDF, RDFS, Namespace
|
| 6 |
+
|
| 7 |
+
ROOT = pathlib.Path("/Users/fabio/projects/qwen-ies-ft")
|
| 8 |
+
IES = "http://ies.data.gov.uk/ontology/ies4#"
|
| 9 |
+
_vocab = json.loads((ROOT/"data"/"vocab.json").read_text())
|
| 10 |
+
REAL = set(_vocab["all_terms"])
|
| 11 |
+
CLASSES = set(_vocab["class_names"])
|
| 12 |
+
|
| 13 |
+
PREFIX_LINE = f"@prefix ies: <{IES}>"
|
| 14 |
+
|
| 15 |
+
def validate_turtle(ttl: str, min_triples: int = 4):
|
| 16 |
+
if PREFIX_LINE not in ttl.replace(" ", " ").replace(" .", ""):
|
| 17 |
+
# be lenient about spacing, but the ies namespace must be declared correctly
|
| 18 |
+
if IES not in ttl:
|
| 19 |
+
return False, "ies namespace not declared", 0, []
|
| 20 |
+
g = Graph()
|
| 21 |
+
try:
|
| 22 |
+
g.parse(data=ttl, format="turtle")
|
| 23 |
+
except Exception as e:
|
| 24 |
+
return False, f"parse error: {str(e)[:120]}", 0, []
|
| 25 |
+
n = len(g)
|
| 26 |
+
if n < min_triples:
|
| 27 |
+
return False, f"too few triples ({n})", n, []
|
| 28 |
+
# every ies: term used must exist in the real ontology
|
| 29 |
+
used = set()
|
| 30 |
+
for t in g:
|
| 31 |
+
for node in t:
|
| 32 |
+
s = str(node)
|
| 33 |
+
if s.startswith(IES):
|
| 34 |
+
used.add(s.split("#")[-1])
|
| 35 |
+
bad = sorted(used - REAL)
|
| 36 |
+
if bad:
|
| 37 |
+
return False, f"unknown ies terms: {bad[:6]}", n, sorted(used)
|
| 38 |
+
# must instantiate at least one real IES class
|
| 39 |
+
typed_classes = {str(o).split("#")[-1] for _, p, o in g.triples((None, RDF.type, None))
|
| 40 |
+
if str(o).startswith(IES)}
|
| 41 |
+
if not (typed_classes & CLASSES):
|
| 42 |
+
return False, "no rdf:type to a real IES class", n, sorted(used)
|
| 43 |
+
return True, "ok", n, sorted(used)
|
| 44 |
+
|
| 45 |
+
|
| 46 |
+
# ---- structural conformance: domain/range checking with subclass closure ----
|
| 47 |
+
_PROPS = _vocab["properties"]
|
| 48 |
+
_SUPERS = {c: set(d["subClassOf"]) for c, d in _vocab["classes"].items()}
|
| 49 |
+
|
| 50 |
+
def _ancestors(c, seen=None):
|
| 51 |
+
seen = seen or set()
|
| 52 |
+
for s in _SUPERS.get(c, ()):
|
| 53 |
+
if s not in seen:
|
| 54 |
+
seen.add(s); _ancestors(s, seen)
|
| 55 |
+
return seen
|
| 56 |
+
|
| 57 |
+
def _conforms(types, allowed):
|
| 58 |
+
"""any of the node's types is the allowed class or a descendant of it"""
|
| 59 |
+
for t in types:
|
| 60 |
+
if t in allowed: return True
|
| 61 |
+
if _ancestors(t) & set(allowed): return True
|
| 62 |
+
return False
|
| 63 |
+
|
| 64 |
+
def structural_conformance(ttl: str):
|
| 65 |
+
"""Fraction of checkable ies: property usages whose subject/object types satisfy the
|
| 66 |
+
property's declared rdfs:domain/range (with subclass closure). Returns (ratio,
|
| 67 |
+
checked, violations)."""
|
| 68 |
+
g = Graph()
|
| 69 |
+
try: g.parse(data=ttl, format="turtle")
|
| 70 |
+
except Exception: return 0.0, 0, ["unparseable"]
|
| 71 |
+
types = {}
|
| 72 |
+
for s, _, o in g.triples((None, RDF.type, None)):
|
| 73 |
+
if str(o).startswith(IES):
|
| 74 |
+
types.setdefault(s, set()).add(str(o).split("#")[-1])
|
| 75 |
+
checked = 0; bad = []
|
| 76 |
+
for s, p, o in g:
|
| 77 |
+
ps = str(p)
|
| 78 |
+
if not ps.startswith(IES): continue
|
| 79 |
+
pn = ps.split("#")[-1]
|
| 80 |
+
d = _PROPS.get(pn)
|
| 81 |
+
if not d: continue
|
| 82 |
+
if d["domain"] and s in types:
|
| 83 |
+
checked += 1
|
| 84 |
+
if not _conforms(types[s], d["domain"]):
|
| 85 |
+
bad.append(f"{pn}: subject {sorted(types[s])} not in domain {d['domain']}")
|
| 86 |
+
if d["range"] and o in types:
|
| 87 |
+
checked += 1
|
| 88 |
+
if not _conforms(types[o], d["range"]):
|
| 89 |
+
bad.append(f"{pn}: object {sorted(types[o])} not in range {d['range']}")
|
| 90 |
+
ratio = 1.0 if checked == 0 else 1.0 - len(bad)/checked
|
| 91 |
+
return ratio, checked, bad[:8]
|
| 92 |
+
|
| 93 |
+
|
| 94 |
+
if __name__ == "__main__":
|
| 95 |
+
import sys
|
| 96 |
+
# smoke test: a real sample must pass, a hallucinated term must fail
|
| 97 |
+
good = (ROOT/"IES4"/"Sample Data"/"hospital.ttl").read_text()
|
| 98 |
+
print("REAL hospital.ttl ->", validate_turtle(good)[:3])
|
| 99 |
+
bad = good + "\ndata:Fred ies:hasTelepathicLinkTo data:Ghost .\n"
|
| 100 |
+
print("HALLUCINATED term ->", validate_turtle(bad)[:2])
|
| 101 |
+
broken = "@prefix ies: <http://ies.data.gov.uk/ontology/ies4#> .\ndata:x a ies:Person" # no closing dot
|
| 102 |
+
print("BROKEN syntax ->", validate_turtle(broken)[:2])
|
scripts/vocab.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|