Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
300 commits
Select commit Hold shift + click to select a range
3a60dfd
Further normalize genre/form mappings
niklasl Apr 17, 2025
944f465
Add note about possibly superfluous mappings
niklasl Apr 22, 2025
50044f2
Add more genre/form mappings (to marcgt and repr)
niklasl Apr 29, 2025
a91212f
Move genreforms to categories and use ktg base URI
niklasl May 5, 2025
63b4a59
Move complex classes aside in favour of categories
niklasl May 5, 2025
5464d7b
Add Category class
niklasl May 5, 2025
0a1a719
Add KBV patterns and instance categories
niklasl May 8, 2025
06d31f4
Handle datasets with more than one source file
niklasl May 8, 2025
449e0da
Remake handling of KTG and RDA term definitions
niklasl May 12, 2025
75ba4e5
Use `skos:prefLabel`
niklasl May 12, 2025
4b9b757
Define singularLabelByLang and pluralLabelByLang
niklasl May 12, 2025
e42765b
Use `skos:altLabel`
niklasl May 12, 2025
0e35ca4
Use `skos:prefLabel` for RDA labels too
niklasl May 12, 2025
bdb8033
Add carrierforms categories to ktg dataset
niklasl May 12, 2025
f44c39c
Add ktg: to marc: mappings (from marcmatches.ttl)
niklasl May 12, 2025
5f440aa
Add more marc category mappings
niklasl May 13, 2025
7d9ea9b
Update category mappings
niklasl May 14, 2025
869ac1d
Improve mappings for type normalization
niklasl May 15, 2025
f180b55
Add more `marc:` category mappings
niklasl May 15, 2025
47d8499
Fix mapping of marcgt:art (to Article)
niklasl May 20, 2025
2fee249
Add more MARC category mappings
niklasl May 20, 2025
2e58610
Add more category mappings (and maintenance notes)
niklasl May 26, 2025
2204725
Add category to Work/Instance-cards
olovy May 28, 2025
78116ef
Use skos prefix in marcmatches.ttl
niklasl May 30, 2025
3599972
Update categories and add to div:find collection
niklasl May 30, 2025
905892f
Add more broader relations to literature
niklasl May 30, 2025
b25ba2e
Define Genre (as pending subclass of GenreForm)
niklasl Jun 2, 2025
f4ddf52
Update indent and add a marc mapping in rda ctg
niklasl Jun 2, 2025
679508d
Add labels and more marc mappings to categories
niklasl Jun 2, 2025
db18308
Add singularLabel to Concept lenses
olovy Jun 2, 2025
7925162
feat(apps/lxlweb): Add category facets
olovy Jun 3, 2025
805eb5f
Category facet first
olovy Jun 3, 2025
0bd442c
Fix: Library/Bibliography subClassOf Collection subClassOf Work
olovy Jun 3, 2025
a93af1f
Update facet order
olovy Jun 3, 2025
8c680cf
Update facet order
olovy Jun 3, 2025
2e24a5a
Merge branch 'develop' into feature/typenormalization
niklasl Jun 3, 2025
e3ee27e
Add category to Concept relationFilters
olovy Jun 3, 2025
8dde2cb
Update intersection patterns for Music and related
niklasl Jun 4, 2025
1eb5190
Add tentative barngf category mappings
niklasl Jun 4, 2025
70bab8a
Clean up category mappings
niklasl Jun 4, 2025
e85edde
Remove doubly declared categories (from barngf)
niklasl Jun 4, 2025
cfb6508
Make ktg:StillImage narrower than kbrda:StillImage
niklasl Jun 4, 2025
b6a555e
Deduplicate barngf from saogf
niklasl Jun 11, 2025
01bbda0
Adjust broader of barngf term
niklasl Jun 13, 2025
af3c654
Add terms to basic, find and identify collections
niklasl Jun 13, 2025
cdb783e
feat(apps/beta): Update facet order
olovy Jun 16, 2025
4ab5e6f
Correct broader kbrda terms
niklasl Jun 18, 2025
aa25381
Break cyclic broadMatch of TactileMaterial
niklasl Jun 18, 2025
0830b3b
Correct Genre baseclass
niklasl Jun 19, 2025
e2bed44
Move content types from mediacarriers to content
niklasl Jul 11, 2025
1d13998
Update carrier forms
niklasl Jul 16, 2025
ceb8e38
Update category prefixes and move some terms
niklasl Jul 16, 2025
2ac98e9
Include additional classes in Category domain and range
branchedelac Aug 19, 2025
0675b8e
comment out tentatively deprecated work and instance types
branchedelac Aug 19, 2025
9c17fe9
Add category as set
branchedelac Aug 19, 2025
8a78549
uncomment old types and make them pending instead
branchedelac Aug 19, 2025
de9d911
make some more types pending
branchedelac Aug 19, 2025
04972d4
make dataset pending and add category to work lens
branchedelac Aug 19, 2025
47aa0ce
add category to work lens
branchedelac Aug 19, 2025
cbe80d0
Control which category classes can be use with Work or Instance
branchedelac Aug 19, 2025
aa369cd
Undo failed attempt att control categories
branchedelac Aug 19, 2025
c4c9d35
Add categories folder to syscore compilation
branchedelac Aug 20, 2025
c1473de
Refine Category and CarrierType subclass relations
branchedelac Aug 25, 2025
e9eec88
Fix spelling
niklasl Aug 29, 2025
87eb762
Replace bare Category with ContentForm/CarrierForm
niklasl Aug 29, 2025
bc63e59
Correct label
niklasl Aug 29, 2025
03515f6
Update according to draft spreadsheet
branchedelac Sep 1, 2025
b3dbb6f
Change to YoungAudience on non-literature BarnGF
niklasl Sep 3, 2025
26bd6d4
Add marc matches to categories (WIP files)
niklasl Sep 3, 2025
ff868c3
Add SAOGF construction script, queries and patches
niklasl Sep 3, 2025
7204e73
Re-add mistakenly removed hiddenLabelByLang
niklasl Sep 4, 2025
7cf25cb
Remove inadvertently matched sub-concept
niklasl Sep 5, 2025
5f6ba32
Remove or comment out unused category collections
niklasl Sep 5, 2025
9ca34aa
Adjust ComicOrGraphicNovel sub-concepts
niklasl Sep 5, 2025
6db8384
Add inCollection to Concept search-chips
olovy Sep 9, 2025
58cb380
Add uv project
andersju Jul 3, 2025
3082903
Add comment about pyproject.toml version
andersju Jul 30, 2025
943ff39
Fix typo
niklasl Sep 22, 2025
5539c91
Map predicates in saogf-from-ktg
niklasl Sep 22, 2025
8bf48a3
Clarify Work subclass labels
niklasl Sep 25, 2025
6ea6a22
context: _categoryByCollection @container @index
olovy Sep 25, 2025
ec94314
Add WorkCategory and InstanceCategory
niklasl Sep 25, 2025
05b1caf
Remove catagories from vocab
branchedelac Sep 25, 2025
09bc4d6
feat: increase limit 100 -> 200 for category facet
olovy Sep 25, 2025
dd0feae
Add facets for find/identify
olovy Sep 25, 2025
26b72b9
Revert "Add facets for find/identify"
olovy Sep 25, 2025
5842e33
Revert "Revert "Add facets for find/identify""
olovy Sep 26, 2025
3c1c111
Add facets for find/identify
olovy Sep 26, 2025
ea1b159
Move instance type to top of facets
olovy Sep 26, 2025
325089b
Update category model and terms
niklasl Sep 26, 2025
d381297
Add id for _categoryByCollection in context
olovy Sep 29, 2025
f30037c
Revert "Add id for _categoryByCollection in context"
olovy Sep 29, 2025
a2bb8bb
Revert "Revert "Add id for _categoryByCollection in context""
olovy Sep 29, 2025
5c59178
fix(apps): categoryByCollection facet paths
olovy Sep 29, 2025
7884e88
Move saogf-related files to source/saogf
niklasl Sep 29, 2025
8697958
Rearrange categories into work- and instanceforms
niklasl Sep 29, 2025
7dcad52
Generalize some expression forms to genre forms
niklasl Sep 29, 2025
2cd79e4
Update SAOGF mappings
niklasl Sep 30, 2025
732c8a1
Only generate new SAOGF terms using prefLabel
niklasl Sep 30, 2025
1ced2fc
Move categories/rdacategories to rda/categorization
niklasl Sep 30, 2025
ed2fdc0
Update SAOGF mappings
niklasl Sep 30, 2025
83bd854
Build one saogf patch file including new terms
niklasl Sep 30, 2025
8206131
Add generated saogf patch file
niklasl Sep 30, 2025
94d7b01
Add sub-aggregation identify for find
olovy Sep 30, 2025
c0351a6
Add sub-aggregation identify for find
olovy Sep 30, 2025
4e28789
fix(vocab): category became _categoryByCollection in term defs
olovy Oct 1, 2025
dbd618a
Comment out pending category on new SAOGF terms
niklasl Oct 1, 2025
8284475
Comment out relatedMatch (not yet in KBV)
niklasl Oct 1, 2025
98ffc88
Define relatedMatch
niklasl Oct 1, 2025
af6213d
Use now defined relatedMatch where applicable
niklasl Oct 1, 2025
040afc8
feat(apps): Move (work) type facet down
olovy Oct 1, 2025
32943ae
Add inScheme to new SAOGF terms in patch file
niklasl Oct 2, 2025
9c4dfc3
Remove redundant term
niklasl Oct 2, 2025
66df804
Add Object work type intersection pattern
niklasl Oct 2, 2025
f5c6e94
Adjust kbrda:StillImage and kbrda:SpokenWord mappings
niklasl Oct 2, 2025
1666013
Promote category in display and facet views
niklasl Oct 3, 2025
ff7d9f3
Add inCollections to ContentType-cards
olovy Oct 4, 2025
3b3fc9b
Add missing Swedish labels for RDA terms
niklasl Oct 6, 2025
e56d262
Merge branch 'develop' into feature/typenormalization
kwahlin Oct 6, 2025
f3a3445
Remove MARC ContentType subclasses and restrictions
niklasl Oct 6, 2025
fbdb221
Remove MARC GenreForm subclasses and restrictions
niklasl Oct 6, 2025
78609b8
Fix mapping to MovingImage (from kbrda to ktg)
niklasl Oct 7, 2025
4adc07b
Remove MARC CarrierType subclasses and restrictions
niklasl Oct 13, 2025
566b12b
feat(apps.jsonld): _categoryByCollection facet size
olovy Oct 16, 2025
2d24f08
feat(apps.jsonld): Remove standalone _categoryByCollection.identify
olovy Oct 17, 2025
2a11e57
Revert "feat(apps.jsonld): Remove standalone _categoryByCollection.id…
olovy Oct 20, 2025
46a6ae8
Revert "Revert "feat(apps.jsonld): Remove standalone _categoryByColle…
olovy Oct 20, 2025
660a253
feat(apps.jsonld): facets: category -> _categoryByCollection.@none
olovy Oct 21, 2025
e8adc37
Remove category: pending
branchedelac Oct 23, 2025
49a64c8
Remove subClassOf CarrierType from BookFormat
branchedelac Oct 23, 2025
51c5679
Remake barngf as "patch" of existing scheme terms
niklasl Oct 24, 2025
7fa92b5
Update re-mappings of KTG to SAOGF
niklasl Oct 24, 2025
b0d64c4
Let ContentType, CarrierType and MediaType inherit from Concept
branchedelac Oct 27, 2025
9d7c055
fix(apps.jsonld): Disable facet _categoryByCollection.@none until it …
olovy Oct 28, 2025
e2f9393
Feature/libris search relation filters (#537)
kwahlin Oct 29, 2025
4777b42
Change MovingImage prefix from rda to ktg
branchedelac Oct 29, 2025
5475e46
Remove experimental inCollection basic
branchedelac Oct 29, 2025
81ab256
fix(apps.jsonld): Facet definitions
olovy Oct 29, 2025
d1285f5
Small changes after discussion with SAOred
branchedelac Nov 3, 2025
02506a8
More small changes after discussion with SAOred
branchedelac Nov 3, 2025
791d9df
Change Electronic to DigitalResource in freeOnline filter alias
kwahlin Nov 5, 2025
132359a
Remove double type
branchedelac Nov 5, 2025
153a2e5
Remove more double types
branchedelac Nov 5, 2025
92f8b3f
Test making Skönlitteratur and Facklitteratur find
branchedelac Nov 5, 2025
969fbcb
Circumvent identifier collision
branchedelac Nov 5, 2025
445b9ae
feat(apps.jsonld): category facet names (#539)
olovy Nov 6, 2025
bd85acc
feat(apps.jsonld): itemHeldBy OR
olovy Nov 10, 2025
b7aa088
feat(apps.jsonld): noneCategory showIf category
olovy Nov 10, 2025
0864023
feat(display): @reverse'/broadMatch in Concept-cards
olovy Nov 10, 2025
acbe343
feat(apps.jsonld): Add filter alias _suecia
olovy Nov 10, 2025
1f0c6d7
More revisions
branchedelac Nov 12, 2025
72c745c
Change type, and property to exactMatch so relationships are created …
branchedelac Nov 13, 2025
74facb9
Remove prefix from Canon
ebengtsson Nov 13, 2025
8a34df8
Add saogf terms as exactMatch
ebengtsson Nov 13, 2025
3e47dd4
feat(apps.jsonld): Add example subsites
olovy Nov 13, 2025
5d420de
Revert "feat(apps.jsonld): Add example subsites"
olovy Nov 13, 2025
8d5c4ee
feat(apps.jsonld): Add example subsites
olovy Nov 13, 2025
cd6037e
Adjust TGM mappings
branchedelac Nov 14, 2025
f7b45a4
Remove -rottl and --sorted options to work with trld 0.2.0
branchedelac Nov 14, 2025
c06f766
Fix typos
ebengtsson Nov 18, 2025
ff9970a
Out comment non top-term saogf
ebengtsson Nov 18, 2025
790e5ed
feat(apps.jsonld): Remove genreForm and intendedAudience facets
olovy Nov 19, 2025
d8128c7
Comment out SAO terms
branchedelac Nov 20, 2025
5fb3794
Include saogf-musik-patches.ttl in build
branchedelac Nov 20, 2025
e050e25
Rebuild with latest changes including music patches
branchedelac Nov 20, 2025
c073907
feat(apps.jsonld): Add :itemHeldByOrg facet (#542)
olovy Nov 20, 2025
2438e81
feat(display): Add bibdb:Organization-chips
olovy Nov 20, 2025
f8ef523
Use latest pre-release trld features
branchedelac Nov 20, 2025
f0ce26b
Rebuild with avant-garde trld features
branchedelac Nov 20, 2025
8c97c45
Feature/libris search ns (#540)
kwahlin Nov 25, 2025
c3d751e
Add record search-chip including bibliography (#543)
kwahlin Nov 25, 2025
e1efadf
Change label for ls:hasInstanceCategory to distinguish from :category
kwahlin Nov 26, 2025
719643c
Give FictionLiterature and NonFictionLiterature inCollection:find
branchedelac Nov 26, 2025
92dc775
Rebuild with Skönlitteratur & Ej skönlitteratur as Find
branchedelac Nov 26, 2025
cb2d4aa
feat (apps.jsonld) Add Swepub example subsite
olovy Nov 27, 2025
791c00e
Add Swepub example subsite
olovy Nov 27, 2025
3f93397
feat(apps.jsonld): Add NOT inDataset:swepub to beta defaultSiteFilters
olovy Nov 27, 2025
1ffa0ec
Some final tweaks
branchedelac Nov 28, 2025
9d62488
Build WIP patch file and move source files to folder
branchedelac Nov 28, 2025
a581f8e
Comment out terms that cause ID collisions
branchedelac Dec 2, 2025
25c9060
Feature/libris search terms (#544)
kwahlin Dec 2, 2025
2a5bd3e
Change broadMatch to broader
ebengtsson Dec 8, 2025
dd03099
Change English label
viklun Dec 8, 2025
157308f
Fetch Concept colleciton from EMM and transform into Turtle
branchedelac Dec 8, 2025
a4e9bcc
feat(display): Include qualifier in Library _topStr
olovy Dec 9, 2025
f6c245d
feat(display): Display marc:parallelTitle
olovy Dec 9, 2025
f75bb7a
feat(display): Add bibdb:Organization-cards
olovy Dec 9, 2025
b1631b3
feat(display): Add bibdb:Organization full
olovy Dec 9, 2025
8ca8653
Add inCllection div:identify to Volume
branchedelac Dec 10, 2025
03d4712
Change mappings
ebengtsson Dec 12, 2025
9e4fef4
Review and adjust
viklun Dec 15, 2025
3024a59
Add select flag
ebengtsson Dec 16, 2025
efa04f7
Outcomment CDbook
ebengtsson Dec 16, 2025
cbb998f
Modify mapping
ebengtsson Dec 16, 2025
71232e6
More review and adjustment
branchedelac Dec 16, 2025
8993f63
Remove exactMatch between (work) GF and (instance) ktg
branchedelac Dec 16, 2025
538ea47
Remove mapping SAOGF/ContentType
katnai1 Dec 16, 2025
5a0a845
Manually add term that was missed in ktg conversion
branchedelac Dec 17, 2025
a52e139
Add comment
branchedelac Dec 17, 2025
fa6ff0f
Remove intra-ConentType broader-relations for now
branchedelac Dec 17, 2025
1b049f7
Add saogf from genres.ttl
katnai1 Dec 17, 2025
d4ed051
Comment out precoordinated terms
branchedelac Dec 18, 2025
d55af9f
More review and adjustment
branchedelac Dec 18, 2025
c44ec2a
Even more review and adjust
branchedelac Dec 18, 2025
233b74e
Add missing prefix
branchedelac Dec 19, 2025
5fb94a9
Feature/libris search codes (#547)
kwahlin Dec 19, 2025
5fb16b6
Basics for querying repo files with rdflib
branchedelac Dec 19, 2025
8b18c78
Rename BrailleForm as Braille
branchedelac Jan 7, 2026
0d8fcd5
feat(apps.jsonld): itemHeldBy -> itemHeldByOrg
olovy Jan 7, 2026
ef13289
Add rdf:type to Concept showProperties
branchedelac Jan 7, 2026
57c08c9
Complete review and adjustment
branchedelac Jan 8, 2026
ac40637
Comment out seeAlso
branchedelac Jan 8, 2026
0392d8d
Replace :Genre and :ExpressionForm with :GenreForm
branchedelac Jan 9, 2026
a90ed40
Add part to Instance-search-cards
olovy Jan 9, 2026
a0cd7f6
Comment out broadMatch to contentTypes
branchedelac Jan 12, 2026
b0e7afe
fix(display): Role token alternateProperties
olovy Jan 13, 2026
e6ccc54
Change closeMatch to exactMatch from RDA to MARC
niklasl Jan 13, 2026
875bc8b
Fix Musik and Offentligt tryck
branchedelac Jan 13, 2026
cabbd49
change exactMatch to closeMatch
ebengtsson Jan 13, 2026
802c6ed
Show type on Concept chip
branchedelac Jan 13, 2026
eefd3cf
Merge rda/categorization.ttl into rda/content.ttl
niklasl Jan 13, 2026
f607933
Give Braille broader Unmediated
branchedelac Jan 14, 2026
626844a
Replace exactMatch with closeMatch
branchedelac Jan 14, 2026
d280007
Remove superfluous prefix and base declarations
niklasl Jan 14, 2026
f90c2e0
Map from TGM to SAOGF instead
niklasl Jan 14, 2026
2daa419
Change propertyChainAxiom context to container set
niklasl Jan 14, 2026
fa448d8
Add inScheme to all constructed SAOGF terms
branchedelac Jan 14, 2026
d4ca6f1
Remove references to ktg terms that have been replaced with new saogf…
branchedelac Jan 14, 2026
6c19414
Some tweaks to mappings
branchedelac Jan 14, 2026
3233670
Make labels more consistent
branchedelac Jan 15, 2026
197c1ba
Remove reference to deleted file
branchedelac Jan 15, 2026
c11563a
Assign everything prefLabel and comment out unused term
branchedelac Jan 15, 2026
88191c3
Fix prefLabel case and comment out unused term
branchedelac Jan 15, 2026
4395273
Reinstate Standalone device with Swedish prefLabel
branchedelac Jan 15, 2026
88f1547
Adjust relations and div:find
branchedelac Jan 15, 2026
7f4897a
Change ID back to Ej%20sk%C3%B6nlitteratur
branchedelac Jan 15, 2026
6569b5e
Change ID back to Facklitteratur
branchedelac Jan 15, 2026
5663a31
Remove div:find
branchedelac Jan 16, 2026
c11a6e4
Add div:find to saogf:Musik
branchedelac Jan 16, 2026
cda95aa
Remove mysteriously reappearing superfluous prefixes
branchedelac Jan 16, 2026
1467431
Fix double types and typo
branchedelac Jan 19, 2026
e72ba38
Update intersectionpatterns
niklasl Jan 20, 2026
0aad222
Update legacy type mappings (and note candidates)
niklasl Jan 22, 2026
f3304e6
Let kbda:SpokenWord broadMatch ktg:Audio
niklasl Jan 23, 2026
018f334
feat(display): Add instanceOf as fallback to Instance-chips
olovy Jan 26, 2026
5ff1d43
feat(display) Concept-full: inverseOf exactMatch, narrowMatch
olovy Jan 26, 2026
a9f961e
feat(display) Concept-full: inverseOf closeMatch
olovy Jan 26, 2026
78aef4c
Comment mappings to marc:BooksIllustrationsType terms
niklasl Jan 26, 2026
d6eeaef
fix(display): StructuredValue prefLabel
olovy Jan 26, 2026
454f7da
feat(bibdb): Get bibliograhy descriptions from bibliographies.ttl (#552)
olovy Jan 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions bibdb_datasets.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import datetime
from lxltools.datacompiler import Compiler
from rdflib import Graph
import os


Expand Down Expand Up @@ -31,7 +31,7 @@ def bibliographies():
def _construct_bibdb_data(query):
libraries = _fetch_libraries(f'https://bibdb.libris.kb.se/api?{query}')
bidb_context = 'https://bibdb.libris.kb.se/libdb/static/meta/context.jsonld'
return compiler.construct(sources=[
graph = compiler.construct(sources=[
{
"dataset": BASE + "dataset/libraries",
"data": libraries,
Expand All @@ -48,6 +48,10 @@ def _construct_bibdb_data(query):
],
query="source/construct-libraries.rq")

graph |= Graph().parse(str(compiler.path('source/bibdb/bibliographies.ttl')), format='turtle')

return graph


def _fetch_libraries(start_url):
url = start_url
Expand Down
6 changes: 6 additions & 0 deletions examples/typenormalization/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
To run tests:

$ pip install -r requirements.txt
$ make test

(Add `-d` cmdline flag see full OWL-RL output.)
Loading