lpgcast 0.1.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (127) hide show
  1. lpgcast/__init__.py +77 -0
  2. lpgcast/bench/README.md +12 -0
  3. lpgcast/bench/__init__.py +2 -0
  4. lpgcast/bench/cases/SPLITS.yaml +38 -0
  5. lpgcast/bench/cases/direction/helpdesk/case.yaml +2 -0
  6. lpgcast/bench/cases/direction/helpdesk/episodes.jsonl +2 -0
  7. lpgcast/bench/cases/direction/helpdesk/expected.yaml +38 -0
  8. lpgcast/bench/cases/direction/lab/case.yaml +2 -0
  9. lpgcast/bench/cases/direction/lab/episodes.jsonl +2 -0
  10. lpgcast/bench/cases/direction/lab/expected.yaml +48 -0
  11. lpgcast/bench/cases/direction/logistics/case.yaml +2 -0
  12. lpgcast/bench/cases/direction/logistics/episodes.jsonl +2 -0
  13. lpgcast/bench/cases/direction/logistics/expected.yaml +41 -0
  14. lpgcast/bench/cases/direction/plant/case.yaml +2 -0
  15. lpgcast/bench/cases/direction/plant/episodes.jsonl +2 -0
  16. lpgcast/bench/cases/direction/plant/expected.yaml +38 -0
  17. lpgcast/bench/cases/distractors/helpdesk/case.yaml +6 -0
  18. lpgcast/bench/cases/distractors/helpdesk/episodes.jsonl +2 -0
  19. lpgcast/bench/cases/distractors/helpdesk/expected.yaml +50 -0
  20. lpgcast/bench/cases/distractors/lab/case.yaml +6 -0
  21. lpgcast/bench/cases/distractors/lab/episodes.jsonl +2 -0
  22. lpgcast/bench/cases/distractors/lab/expected.yaml +42 -0
  23. lpgcast/bench/cases/distractors/logistics/case.yaml +6 -0
  24. lpgcast/bench/cases/distractors/logistics/episodes.jsonl +2 -0
  25. lpgcast/bench/cases/distractors/logistics/expected.yaml +48 -0
  26. lpgcast/bench/cases/distractors/plant/case.yaml +6 -0
  27. lpgcast/bench/cases/distractors/plant/episodes.jsonl +2 -0
  28. lpgcast/bench/cases/distractors/plant/expected.yaml +41 -0
  29. lpgcast/bench/cases/identity/helpdesk/case.yaml +2 -0
  30. lpgcast/bench/cases/identity/helpdesk/episodes.jsonl +2 -0
  31. lpgcast/bench/cases/identity/helpdesk/expected.yaml +36 -0
  32. lpgcast/bench/cases/identity/lab/case.yaml +2 -0
  33. lpgcast/bench/cases/identity/lab/episodes.jsonl +2 -0
  34. lpgcast/bench/cases/identity/lab/expected.yaml +43 -0
  35. lpgcast/bench/cases/identity/logistics/case.yaml +2 -0
  36. lpgcast/bench/cases/identity/logistics/episodes.jsonl +2 -0
  37. lpgcast/bench/cases/identity/logistics/expected.yaml +39 -0
  38. lpgcast/bench/cases/identity/plant/case.yaml +2 -0
  39. lpgcast/bench/cases/identity/plant/episodes.jsonl +2 -0
  40. lpgcast/bench/cases/identity/plant/expected.yaml +32 -0
  41. lpgcast/bench/cases/injection/helpdesk/case.yaml +2 -0
  42. lpgcast/bench/cases/injection/helpdesk/episodes.jsonl +2 -0
  43. lpgcast/bench/cases/injection/helpdesk/expected.yaml +51 -0
  44. lpgcast/bench/cases/injection/lab/case.yaml +2 -0
  45. lpgcast/bench/cases/injection/lab/episodes.jsonl +2 -0
  46. lpgcast/bench/cases/injection/lab/expected.yaml +57 -0
  47. lpgcast/bench/cases/injection/logistics/case.yaml +2 -0
  48. lpgcast/bench/cases/injection/logistics/episodes.jsonl +2 -0
  49. lpgcast/bench/cases/injection/logistics/expected.yaml +67 -0
  50. lpgcast/bench/cases/injection/plant/case.yaml +2 -0
  51. lpgcast/bench/cases/injection/plant/episodes.jsonl +2 -0
  52. lpgcast/bench/cases/injection/plant/expected.yaml +49 -0
  53. lpgcast/bench/cases/mention/helpdesk/case.yaml +2 -0
  54. lpgcast/bench/cases/mention/helpdesk/episodes.jsonl +3 -0
  55. lpgcast/bench/cases/mention/helpdesk/expected.yaml +55 -0
  56. lpgcast/bench/cases/mention/lab/case.yaml +2 -0
  57. lpgcast/bench/cases/mention/lab/episodes.jsonl +3 -0
  58. lpgcast/bench/cases/mention/lab/expected.yaml +55 -0
  59. lpgcast/bench/cases/mention/logistics/case.yaml +2 -0
  60. lpgcast/bench/cases/mention/logistics/episodes.jsonl +3 -0
  61. lpgcast/bench/cases/mention/logistics/expected.yaml +55 -0
  62. lpgcast/bench/cases/mention/plant/case.yaml +2 -0
  63. lpgcast/bench/cases/mention/plant/episodes.jsonl +3 -0
  64. lpgcast/bench/cases/mention/plant/expected.yaml +55 -0
  65. lpgcast/bench/cases/recast/helpdesk/case.yaml +3 -0
  66. lpgcast/bench/cases/recast/helpdesk/episodes.jsonl +2 -0
  67. lpgcast/bench/cases/recast/helpdesk/expected.yaml +56 -0
  68. lpgcast/bench/cases/recast/lab/case.yaml +3 -0
  69. lpgcast/bench/cases/recast/lab/episodes.jsonl +2 -0
  70. lpgcast/bench/cases/recast/lab/expected.yaml +55 -0
  71. lpgcast/bench/cases/recast/logistics/case.yaml +3 -0
  72. lpgcast/bench/cases/recast/logistics/episodes.jsonl +2 -0
  73. lpgcast/bench/cases/recast/logistics/expected.yaml +60 -0
  74. lpgcast/bench/cases/recast/plant/case.yaml +3 -0
  75. lpgcast/bench/cases/recast/plant/episodes.jsonl +2 -0
  76. lpgcast/bench/cases/recast/plant/expected.yaml +46 -0
  77. lpgcast/bench/cases/units/helpdesk/case.yaml +2 -0
  78. lpgcast/bench/cases/units/helpdesk/episodes.jsonl +2 -0
  79. lpgcast/bench/cases/units/helpdesk/expected.yaml +35 -0
  80. lpgcast/bench/cases/units/lab/case.yaml +2 -0
  81. lpgcast/bench/cases/units/lab/episodes.jsonl +3 -0
  82. lpgcast/bench/cases/units/lab/expected.yaml +58 -0
  83. lpgcast/bench/cases/units/logistics/case.yaml +2 -0
  84. lpgcast/bench/cases/units/logistics/episodes.jsonl +2 -0
  85. lpgcast/bench/cases/units/logistics/expected.yaml +40 -0
  86. lpgcast/bench/cases/units/plant/case.yaml +2 -0
  87. lpgcast/bench/cases/units/plant/episodes.jsonl +3 -0
  88. lpgcast/bench/cases/units/plant/expected.yaml +55 -0
  89. lpgcast/bench/cli.py +129 -0
  90. lpgcast/bench/corpus.py +274 -0
  91. lpgcast/bench/oracle.py +102 -0
  92. lpgcast/bench/report.py +314 -0
  93. lpgcast/bench/run.py +277 -0
  94. lpgcast/bench/schemas/helpdesk-distractors.yaml +102 -0
  95. lpgcast/bench/schemas/helpdesk.yaml +104 -0
  96. lpgcast/bench/schemas/lab-distractors.yaml +104 -0
  97. lpgcast/bench/schemas/lab.yaml +108 -0
  98. lpgcast/bench/schemas/logistics-distractors.yaml +106 -0
  99. lpgcast/bench/schemas/logistics.yaml +108 -0
  100. lpgcast/bench/schemas/plant-distractors.yaml +102 -0
  101. lpgcast/bench/schemas/plant.yaml +96 -0
  102. lpgcast/bench/score.py +525 -0
  103. lpgcast/cast.py +420 -0
  104. lpgcast/cli.py +224 -0
  105. lpgcast/config.py +154 -0
  106. lpgcast/episode.py +80 -0
  107. lpgcast/extract.py +147 -0
  108. lpgcast/ground.py +102 -0
  109. lpgcast/llm/__init__.py +29 -0
  110. lpgcast/llm/cache.py +175 -0
  111. lpgcast/llm/client.py +464 -0
  112. lpgcast/llm/jsonparse.py +260 -0
  113. lpgcast/llm/usage.py +150 -0
  114. lpgcast/output.py +63 -0
  115. lpgcast/prompt.py +103 -0
  116. lpgcast/repair.py +79 -0
  117. lpgcast/resolve.py +257 -0
  118. lpgcast/schema_io.py +39 -0
  119. lpgcast/select.py +469 -0
  120. lpgcast/sink.py +81 -0
  121. lpgcast/validate.py +415 -0
  122. lpgcast/write.py +199 -0
  123. lpgcast-0.1.1.dist-info/METADATA +127 -0
  124. lpgcast-0.1.1.dist-info/RECORD +127 -0
  125. lpgcast-0.1.1.dist-info/WHEEL +4 -0
  126. lpgcast-0.1.1.dist-info/entry_points.txt +4 -0
  127. lpgcast-0.1.1.dist-info/licenses/LICENSE +201 -0
lpgcast/__init__.py ADDED
@@ -0,0 +1,77 @@
1
+ """LPGCast: text to a labeled property graph, against a governed GraFlo schema.
2
+
3
+ The names below load on first use, so ``import lpgcast`` stays light.
4
+ """
5
+
6
+ from __future__ import annotations
7
+
8
+ import importlib
9
+ from importlib.metadata import PackageNotFoundError, version
10
+ from typing import TYPE_CHECKING, Any
11
+
12
+ try:
13
+ __version__ = version("lpgcast")
14
+ except PackageNotFoundError: # running from a source tree without install
15
+ __version__ = "0.0.0"
16
+
17
+ if TYPE_CHECKING:
18
+ from lpgcast.cast import CastResult, EpisodeResult, LPGCaster
19
+ from lpgcast.config import CacheSettings, LLMSettings, LPGCastSettings
20
+ from lpgcast.episode import Episode, read_episodes
21
+ from lpgcast.ground import Grounding
22
+ from lpgcast.output import save_cast
23
+ from lpgcast.schema_io import load_schema
24
+ from lpgcast.sink import JsonlQuarantineSink, MemoryQuarantineSink
25
+ from lpgcast.write import WriteReport, load_connection, write_cast
26
+
27
+ _EXPORTS: dict[str, str] = {
28
+ "CacheSettings": "lpgcast.config",
29
+ "CastResult": "lpgcast.cast",
30
+ "Episode": "lpgcast.episode",
31
+ "EpisodeResult": "lpgcast.cast",
32
+ "Grounding": "lpgcast.ground",
33
+ "JsonlQuarantineSink": "lpgcast.sink",
34
+ "LLMSettings": "lpgcast.config",
35
+ "LPGCastSettings": "lpgcast.config",
36
+ "LPGCaster": "lpgcast.cast",
37
+ "MemoryQuarantineSink": "lpgcast.sink",
38
+ "WriteReport": "lpgcast.write",
39
+ "load_connection": "lpgcast.write",
40
+ "load_schema": "lpgcast.schema_io",
41
+ "read_episodes": "lpgcast.episode",
42
+ "save_cast": "lpgcast.output",
43
+ "write_cast": "lpgcast.write",
44
+ }
45
+
46
+ __all__ = [
47
+ "CacheSettings",
48
+ "CastResult",
49
+ "Episode",
50
+ "EpisodeResult",
51
+ "Grounding",
52
+ "JsonlQuarantineSink",
53
+ "LLMSettings",
54
+ "LPGCastSettings",
55
+ "LPGCaster",
56
+ "MemoryQuarantineSink",
57
+ "WriteReport",
58
+ "__version__",
59
+ "load_connection",
60
+ "load_schema",
61
+ "read_episodes",
62
+ "save_cast",
63
+ "write_cast",
64
+ ]
65
+
66
+
67
+ def __getattr__(name: str) -> Any:
68
+ module = _EXPORTS.get(name)
69
+ if module is None:
70
+ raise AttributeError(f"module 'lpgcast' has no attribute {name!r}")
71
+ value = getattr(importlib.import_module(module), name)
72
+ globals()[name] = value
73
+ return value
74
+
75
+
76
+ def __dir__() -> list[str]:
77
+ return sorted(__all__)
@@ -0,0 +1,12 @@
1
+ # Benchmark corpus
2
+
3
+ The cases and schemas `lpgcast-bench` scores against. How the benchmark works, what it
4
+ measures and how to run it: the [benchmark guide](https://growgraph.github.io/LPGCast/guides/benchmark/)
5
+ (`docs/guides/benchmark.md` in this repository).
6
+
7
+ ## Adding a case
8
+
9
+ Write `case.yaml`, `episodes.jsonl` and `expected.yaml` under `cases/<family>/<instance>/`, add
10
+ the case to `cases/SPLITS.yaml`, run `uv run pytest test/test_bench.py`, and set
11
+ `CORPUS_DIGEST` in `corpus.py` to the value the failing digest test prints, with a new
12
+ `CORPUS_VERSION`.
@@ -0,0 +1,2 @@
1
+ """The benchmark: a corpus of texts with the graphs they state, a scorer that
2
+ needs no model as judge, and the ``lpgcast-bench`` command."""
@@ -0,0 +1,38 @@
1
+ # Dev / test assignment: two instances of every family in each half.
2
+ #
3
+ # Tuning prompts, rules or selection against a case makes it part of what the
4
+ # system was fitted to, so tuning happens on `dev` and a published figure comes
5
+ # from `test`. Domains rotate across families, so each half holds every domain.
6
+ # Moving a case between halves invalidates comparison with earlier runs, like
7
+ # editing it: bump CORPUS_VERSION.
8
+
9
+ dev:
10
+ - distractors/plant
11
+ - distractors/helpdesk
12
+ - direction/helpdesk
13
+ - direction/logistics
14
+ - units/logistics
15
+ - units/lab
16
+ - identity/lab
17
+ - identity/plant
18
+ - mention/plant
19
+ - mention/logistics
20
+ - recast/helpdesk
21
+ - recast/lab
22
+ - injection/plant
23
+ - injection/lab
24
+ test:
25
+ - distractors/logistics
26
+ - distractors/lab
27
+ - direction/lab
28
+ - direction/plant
29
+ - units/plant
30
+ - units/helpdesk
31
+ - identity/helpdesk
32
+ - identity/logistics
33
+ - mention/helpdesk
34
+ - mention/lab
35
+ - recast/plant
36
+ - recast/logistics
37
+ - injection/helpdesk
38
+ - injection/logistics
@@ -0,0 +1,2 @@
1
+ description: Duplicate and mentoring relations stated from the far end.
2
+ schema: helpdesk
@@ -0,0 +1,2 @@
1
+ {"source_id": "direction-helpdesk-1", "text": "HD-2210 was closed as a duplicate; the original report is HD-2198."}
2
+ {"source_id": "direction-helpdesk-2", "text": "New agent kim.n is being mentored by raj.p for the first month."}
@@ -0,0 +1,38 @@
1
+ direction-helpdesk-1:
2
+ vertices:
3
+ dup:
4
+ type: Ticket
5
+ quote: HD-2210
6
+ mention: true
7
+ props:
8
+ number: HD-2210
9
+ orig:
10
+ type: Ticket
11
+ quote: HD-2198
12
+ mention: true
13
+ props:
14
+ number: HD-2198
15
+ edges:
16
+ - relation: DUPLICATE_OF
17
+ from: dup
18
+ to: orig
19
+ quote: HD-2210 was closed as a duplicate; the original report is HD-2198
20
+ direction-helpdesk-2:
21
+ vertices:
22
+ kim:
23
+ type: Agent
24
+ quote: kim.n
25
+ mention: true
26
+ props:
27
+ handle: kim.n
28
+ raj:
29
+ type: Agent
30
+ quote: raj.p
31
+ mention: true
32
+ props:
33
+ handle: raj.p
34
+ edges:
35
+ - relation: MENTORS
36
+ from: raj
37
+ to: kim
38
+ quote: kim.n is being mentored by raj.p
@@ -0,0 +1,2 @@
1
+ description: Aliquots derived from a parent, written parent first.
2
+ schema: lab
@@ -0,0 +1,2 @@
1
+ {"source_id": "direction-lab-1", "text": "Aliquot S-0107 was split from parent sample S-0100."}
2
+ {"source_id": "direction-lab-2", "text": "Specimen S-0212 is the source of aliquots S-0213 and S-0214."}
@@ -0,0 +1,48 @@
1
+ direction-lab-1:
2
+ vertices:
3
+ child:
4
+ type: Sample
5
+ quote: Aliquot S-0107
6
+ mention: true
7
+ props:
8
+ sample_id: S-0107
9
+ parent:
10
+ type: Sample
11
+ quote: sample S-0100
12
+ mention: true
13
+ props:
14
+ sample_id: S-0100
15
+ edges:
16
+ - relation: DERIVED_FROM
17
+ from: child
18
+ to: parent
19
+ quote: Aliquot S-0107 was split from parent sample S-0100
20
+ direction-lab-2:
21
+ vertices:
22
+ src:
23
+ type: Sample
24
+ quote: Specimen S-0212
25
+ mention: true
26
+ props:
27
+ sample_id: S-0212
28
+ a:
29
+ type: Sample
30
+ quote: S-0213
31
+ mention: true
32
+ props:
33
+ sample_id: S-0213
34
+ b:
35
+ type: Sample
36
+ quote: S-0214
37
+ mention: true
38
+ props:
39
+ sample_id: S-0214
40
+ edges:
41
+ - relation: DERIVED_FROM
42
+ from: a
43
+ to: src
44
+ quote: Specimen S-0212 is the source of aliquots S-0213
45
+ - relation: DERIVED_FROM
46
+ from: b
47
+ to: src
48
+ quote: Specimen S-0212 is the source of aliquots S-0213 and S-0214
@@ -0,0 +1,2 @@
1
+ description: Supply between depots and loading written with the container first.
2
+ schema: logistics
@@ -0,0 +1,2 @@
1
+ {"source_id": "direction-logistics-1", "text": "Depot HAM-1 is restocked from depot BRE-2, with a lead time of 3 days."}
2
+ {"source_id": "direction-logistics-2", "text": "Shipment TRK-5501 contains pallet PL-77."}
@@ -0,0 +1,41 @@
1
+ direction-logistics-1:
2
+ vertices:
3
+ ham:
4
+ type: Warehouse
5
+ quote: Depot HAM-1
6
+ mention: true
7
+ props:
8
+ code: HAM-1
9
+ bre:
10
+ type: Warehouse
11
+ quote: depot BRE-2
12
+ mention: true
13
+ props:
14
+ code: BRE-2
15
+ edges:
16
+ - relation: SUPPLIES
17
+ from: bre
18
+ to: ham
19
+ quote: Depot HAM-1 is restocked from depot BRE-2
20
+ props:
21
+ lead_days:
22
+ value: 3
23
+ quote: 3 days
24
+ direction-logistics-2:
25
+ vertices:
26
+ trk:
27
+ type: Shipment
28
+ quote: Shipment TRK-5501
29
+ mention: true
30
+ props:
31
+ tracking: TRK-5501
32
+ pl:
33
+ type: Pallet
34
+ quote: pallet PL-77
35
+ props:
36
+ barcode: PL-77
37
+ edges:
38
+ - relation: LOADED_IN
39
+ from: pl
40
+ to: trk
41
+ quote: Shipment TRK-5501 contains pallet PL-77
@@ -0,0 +1,2 @@
1
+ description: Same-type relations written in the passive or from the target's side.
2
+ schema: plant
@@ -0,0 +1,2 @@
1
+ {"source_id": "direction-plant-1", "text": "Press P-2 is fed by press P-1 since the line was rebuilt."}
2
+ {"source_id": "direction-plant-2", "text": "Mara Lind (mara.lind@plant.example) is supervised by Tom Berg (tom.berg@plant.example) on the night shift."}
@@ -0,0 +1,38 @@
1
+ direction-plant-1:
2
+ vertices:
3
+ p1:
4
+ type: Machine
5
+ quote: press P-1
6
+ mention: true
7
+ props:
8
+ serial: P-1
9
+ p2:
10
+ type: Machine
11
+ quote: Press P-2
12
+ mention: true
13
+ props:
14
+ serial: P-2
15
+ edges:
16
+ - relation: FEEDS
17
+ from: p1
18
+ to: p2
19
+ quote: Press P-2 is fed by press P-1
20
+ direction-plant-2:
21
+ vertices:
22
+ mara:
23
+ type: Person
24
+ quote: Mara Lind
25
+ props:
26
+ email: mara.lind@plant.example
27
+ name: Mara Lind
28
+ tom:
29
+ type: Person
30
+ quote: Tom Berg
31
+ props:
32
+ email: tom.berg@plant.example
33
+ name: Tom Berg
34
+ edges:
35
+ - relation: SUPERVISES
36
+ from: tom
37
+ to: mara
38
+ quote: is supervised by Tom Berg
@@ -0,0 +1,6 @@
1
+ description: A wide schema sliced under a tight budget; the text names types it says nothing about.
2
+ schema:
3
+ - helpdesk
4
+ - helpdesk-distractors
5
+ settings:
6
+ slice_max_elements: 14
@@ -0,0 +1,2 @@
1
+ {"source_id": "distractors-helpdesk-1", "text": "Not a billing question and no refund needed: customer ACC-4100 raised HD-8100 about product SKU-310."}
2
+ {"source_id": "distractors-helpdesk-2", "text": "Whatever the subscription plan, agent sam.r has handled HD-8100 since 2024-07-01."}
@@ -0,0 +1,50 @@
1
+ distractors-helpdesk-1:
2
+ vertices:
3
+ c:
4
+ type: Customer
5
+ quote: customer ACC-4100
6
+ mention: true
7
+ props:
8
+ account: ACC-4100
9
+ t:
10
+ type: Ticket
11
+ quote: HD-8100
12
+ mention: true
13
+ props:
14
+ number: HD-8100
15
+ p:
16
+ type: Product
17
+ quote: product SKU-310
18
+ mention: true
19
+ props:
20
+ sku: SKU-310
21
+ edges:
22
+ - relation: RAISED
23
+ from: c
24
+ to: t
25
+ quote: customer ACC-4100 raised HD-8100
26
+ - relation: ABOUT
27
+ from: t
28
+ to: p
29
+ quote: HD-8100 about product SKU-310
30
+ distractors-helpdesk-2:
31
+ vertices:
32
+ a:
33
+ type: Agent
34
+ quote: agent sam.r
35
+ mention: true
36
+ props:
37
+ handle: sam.r
38
+ t:
39
+ type: Ticket
40
+ quote: HD-8100
41
+ mention: true
42
+ props:
43
+ number: HD-8100
44
+ edges:
45
+ - relation: HANDLES
46
+ from: a
47
+ to: t
48
+ quote: agent sam.r has handled HD-8100 since 2024-07-01
49
+ props:
50
+ since: '2024-07-01'
@@ -0,0 +1,6 @@
1
+ description: A wide schema sliced under a tight budget; the text names types it says nothing about.
2
+ schema:
3
+ - lab
4
+ - lab-distractors
5
+ settings:
6
+ slice_max_elements: 14
@@ -0,0 +1,2 @@
1
+ {"source_id": "distractors-lab-1", "text": "No new protocol or grant here: sample S-0800 belongs to project PX-40."}
2
+ {"source_id": "distractors-lab-2", "text": "From the usual supplier's lot: sample S-0800 contains acetone (CAS 67-64-1) at 2 mM."}
@@ -0,0 +1,42 @@
1
+ distractors-lab-1:
2
+ vertices:
3
+ s:
4
+ type: Sample
5
+ quote: sample S-0800
6
+ mention: true
7
+ props:
8
+ sample_id: S-0800
9
+ p:
10
+ type: Project
11
+ quote: project PX-40
12
+ mention: true
13
+ props:
14
+ code: PX-40
15
+ edges:
16
+ - relation: BELONGS_TO
17
+ from: s
18
+ to: p
19
+ quote: sample S-0800 belongs to project PX-40
20
+ distractors-lab-2:
21
+ vertices:
22
+ s:
23
+ type: Sample
24
+ quote: sample S-0800
25
+ mention: true
26
+ props:
27
+ sample_id: S-0800
28
+ r:
29
+ type: Reagent
30
+ quote: acetone
31
+ props:
32
+ cas: 67-64-1
33
+ name: acetone
34
+ edges:
35
+ - relation: CONTAINS
36
+ from: s
37
+ to: r
38
+ quote: sample S-0800 contains acetone (CAS 67-64-1) at 2 mM
39
+ props:
40
+ concentration:
41
+ value: 2.0
42
+ quote: 2 mM
@@ -0,0 +1,6 @@
1
+ description: A wide schema sliced under a tight budget; the text names types it says nothing about.
2
+ schema:
3
+ - logistics
4
+ - logistics-distractors
5
+ settings:
6
+ slice_max_elements: 14
@@ -0,0 +1,2 @@
1
+ {"source_id": "distractors-logistics-1", "text": "Forget the container and the customs paperwork: shipment TRK-9100 left depot HAM-2, carried by NordFreight."}
2
+ {"source_id": "distractors-logistics-2", "text": "Not from the usual truck crew: Lea Ott, licence DL-7781, drives for NordFreight."}
@@ -0,0 +1,48 @@
1
+ distractors-logistics-1:
2
+ vertices:
3
+ s:
4
+ type: Shipment
5
+ quote: shipment TRK-9100
6
+ mention: true
7
+ props:
8
+ tracking: TRK-9100
9
+ w:
10
+ type: Warehouse
11
+ quote: depot HAM-2
12
+ mention: true
13
+ props:
14
+ code: HAM-2
15
+ c:
16
+ type: Carrier
17
+ quote: NordFreight
18
+ mention: true
19
+ props:
20
+ name: NordFreight
21
+ edges:
22
+ - relation: SHIPPED_FROM
23
+ from: s
24
+ to: w
25
+ quote: shipment TRK-9100 left depot HAM-2
26
+ - relation: CARRIED_BY
27
+ from: s
28
+ to: c
29
+ quote: carried by NordFreight
30
+ distractors-logistics-2:
31
+ vertices:
32
+ d:
33
+ type: Driver
34
+ quote: Lea Ott
35
+ props:
36
+ license: DL-7781
37
+ name: Lea Ott
38
+ c:
39
+ type: Carrier
40
+ quote: NordFreight
41
+ mention: true
42
+ props:
43
+ name: NordFreight
44
+ edges:
45
+ - relation: DRIVES_FOR
46
+ from: d
47
+ to: c
48
+ quote: Lea Ott, licence DL-7781, drives for NordFreight
@@ -0,0 +1,6 @@
1
+ description: A wide schema sliced under a tight budget; the text names types it says nothing about.
2
+ schema:
3
+ - plant
4
+ - plant-distractors
5
+ settings:
6
+ slice_max_elements: 14
@@ -0,0 +1,2 @@
1
+ {"source_id": "distractors-plant-1", "text": "The forklift crew complained, but press S-60 is fine: Ana Ruiz (ana.ruiz@plant.example) has operated it since January 2023."}
2
+ {"source_id": "distractors-plant-2", "text": "Supplier invoices aside, sensor PT-4 is mounted on press S-61."}
@@ -0,0 +1,41 @@
1
+ distractors-plant-1:
2
+ vertices:
3
+ s:
4
+ type: Machine
5
+ quote: press S-60
6
+ mention: true
7
+ props:
8
+ serial: S-60
9
+ ana:
10
+ type: Person
11
+ quote: Ana Ruiz
12
+ props:
13
+ email: ana.ruiz@plant.example
14
+ name: Ana Ruiz
15
+ edges:
16
+ - relation: OPERATES
17
+ from: ana
18
+ to: s
19
+ quote: Ana Ruiz (ana.ruiz@plant.example) has operated it since January 2023
20
+ props:
21
+ since:
22
+ value: 2023-01
23
+ quote: January 2023
24
+ distractors-plant-2:
25
+ vertices:
26
+ t:
27
+ type: Sensor
28
+ quote: sensor PT-4
29
+ props:
30
+ tag: PT-4
31
+ s:
32
+ type: Machine
33
+ quote: press S-61
34
+ mention: true
35
+ props:
36
+ serial: S-61
37
+ edges:
38
+ - relation: MOUNTED_ON
39
+ from: t
40
+ to: s
41
+ quote: sensor PT-4 is mounted on press S-61
@@ -0,0 +1,2 @@
1
+ description: A caller with no account, beside a customer who gives one.
2
+ schema: helpdesk
@@ -0,0 +1,2 @@
1
+ {"source_id": "identity-helpdesk-1", "text": "A caller who gave no account number reported that exports keep failing; this is ticket HD-4410."}
2
+ {"source_id": "identity-helpdesk-2", "text": "Customer ACC-2291 (Jo Park) raised HD-4411, and agent lena.k handles it."}
@@ -0,0 +1,36 @@
1
+ identity-helpdesk-1:
2
+ vertices:
3
+ t:
4
+ type: Ticket
5
+ quote: ticket HD-4410
6
+ props:
7
+ number: HD-4410
8
+ identity-helpdesk-2:
9
+ vertices:
10
+ c:
11
+ type: Customer
12
+ quote: Customer ACC-2291
13
+ props:
14
+ account: ACC-2291
15
+ name: Jo Park
16
+ t:
17
+ type: Ticket
18
+ quote: HD-4411
19
+ mention: true
20
+ props:
21
+ number: HD-4411
22
+ a:
23
+ type: Agent
24
+ quote: agent lena.k
25
+ mention: true
26
+ props:
27
+ handle: lena.k
28
+ edges:
29
+ - relation: RAISED
30
+ from: c
31
+ to: t
32
+ quote: Customer ACC-2291 (Jo Park) raised HD-4411
33
+ - relation: HANDLES
34
+ from: a
35
+ to: t
36
+ quote: agent lena.k handles it
@@ -0,0 +1,2 @@
1
+ description: A researcher known only by badge can be pointed at, never written.
2
+ schema: lab
@@ -0,0 +1,2 @@
1
+ {"source_id": "identity-lab-1", "text": "Sample S-0441 was handed in by a student whose badge was not recorded."}
2
+ {"source_id": "identity-lab-2", "text": "The researcher with badge B-1182 ran sample S-0441 on spectrometer SP-9."}
@@ -0,0 +1,43 @@
1
+ identity-lab-1:
2
+ vertices:
3
+ s:
4
+ type: Sample
5
+ quote: Sample S-0441
6
+ props:
7
+ sample_id: S-0441
8
+ identity-lab-2:
9
+ vertices:
10
+ r:
11
+ type: Researcher
12
+ quote: The researcher with badge B-1182
13
+ mention: true
14
+ props:
15
+ badge: B-1182
16
+ run:
17
+ type: Run
18
+ quote: ran sample S-0441 on spectrometer SP-9
19
+ s:
20
+ type: Sample
21
+ quote: sample S-0441
22
+ mention: true
23
+ props:
24
+ sample_id: S-0441
25
+ i:
26
+ type: Instrument
27
+ quote: spectrometer SP-9
28
+ mention: true
29
+ props:
30
+ serial: SP-9
31
+ edges:
32
+ - relation: PERFORMED
33
+ from: r
34
+ to: run
35
+ quote: The researcher with badge B-1182 ran
36
+ - relation: ANALYSED
37
+ from: run
38
+ to: s
39
+ quote: ran sample S-0441
40
+ - relation: USED
41
+ from: run
42
+ to: i
43
+ quote: on spectrometer SP-9
@@ -0,0 +1,2 @@
1
+ description: An unnamed driver beside one whose licence is stated.
2
+ schema: logistics
@@ -0,0 +1,2 @@
1
+ {"source_id": "identity-logistics-1", "text": "A driver dropped shipment TRK-9001 off at depot OSL-3."}
2
+ {"source_id": "identity-logistics-2", "text": "Per Ek, licence DL-55871, phone +46 70 123 45, drives for NordFreight."}