A Library for Creating RDF Files from VSDX Files

Overview This is a memo about a library I created for generating RDF files from VSDX files. https://github.com/nakamura196/vsdx-rdf Background I have been exploring methods for creating RDF data using Microsoft Visio in articles like the following. This article corresponds to the note in the above article that said “This library will be introduced in a separate article.” Usage Please refer to the following. https://nakamura196.github.io/vsdx-rdf/ Google Colab A notebook is available for trying out this library. ...

July 18, 2024 · 1 min · Nakamura

Understanding the Relationship Between RDF, Turtle, JSON-LD, and IIIF Manifest Files

Overview To verify that IIIF manifests are written in JSON-LD, I tried converting them to other formats, so this is a memo of that process. We hope this serves as a useful reference for understanding the relationship between RDF and file formats such as JSON-LD and Turtle, as well as their relationship with IIIF manifest files described in JSON-LD. Target For this exercise, we will use the following manifest file published on the NDL Digital Collection. ...

June 28, 2024 · 22 min · Nakamura

Applied Examples of Data Description Using Linked Data

Overview I have written the following articles related to RDF. I tried visualizing these together, so here are my notes. Data The following data was used this time. I described information such as: a person named “Satoru Nakamura (0000-0001-8245-7925)” is interested in “Thirty-Six Views of Mount Fuji: Fine Wind, Clear Morning (cobas-166407)” held by the Tokyo National Museum, and its creator is “Katsushika Hokusai.” The TTL description is as follows. ...

June 23, 2024 · 24 min · Nakamura

Using prefix.cc

Overview This is a memo about trying prefix.cc for resolving prefixes in RDF data. https://prefix.cc/ Namespace Lookup API This is a service that allows you to retrieve URIs by providing a prefix. https://prefix.cc/about/api For example, providing the following: https://prefix.cc/foaf.file.json Returns the following result. { } " f o a f " : " h t t p : / / x m l n s . c o m / f o a f / 0 . 1 / " Reverse Lookup API For example, providing the following: ...

June 23, 2024 · 2 min · Nakamura

Notes on Adding and Visualizing RDF Data

Overview This article explains the process of converting data created with Microsoft Visio to RDF format, and the method for adding RDF data when a specific URI (in this case, a Japan Search URI containing information about Katsushika Hokusai) is specified. We introduce techniques for handling Visio data in RDF format through the conversion process, and present the results of incorporating information about Katsushika Hokusai as a concrete example. Background In the following article, I introduced an example of converting data created with Microsoft Visio to RDF: ...

June 23, 2024 · 11 min · Nakamura

Retrieving RDF from URIs Using Content Negotiation in Python

Overview I had an opportunity to retrieve RDF data from Wikidata entity URIs, so here are my notes. Without Content Negotiation First, make a request with empty headers as follows. i # u h } # r # i e m r e e f l p U l a S s C s o R d e p h r e r L = e n o e e t p : p t r d n c s e r r f " s i s k p x i i r o h n e i o t n n e r t = g n n t t q t = g s = ( ( u t p { a e t " e h : r i . r e F s e / G e f s e x a t / E q t s t i s W w T u t a p [ l i w e h t o : e k w r s e u n 5 d i . e t s s 0 d w q s r _ e 0 t a i u . e c . 0 o t k e g q o t ] a i s e u d e ) r d t t e e x e e a ( s t t n t t u t = r t a o r = i i . l w e t o t , a 2 v y r h s 0 e g e h 0 i / e s : R n e U a u D n R d c F R t L e c D i r e d F t s s a y = s t f h f a Q e u . r 1 a l m 2 d S a 4 e t t 1 r a 8 s t " ) u s c o d e : " , r e s p o n s e . s t a t u s _ c o d e ) In this case, you can retrieve text data in JSON format as follows. ...

June 23, 2024 · 18 min · Nakamura

Creating RDF Data Using Microsoft Visio

Overview I had the opportunity to use Microsoft Visio for creating RDF data, so this is a memo of that experience. https://www.microsoft.com/ja-jp/microsoft-365/visio/flowchart-software Note that Microsoft Visio is not a tool specialized for creating RDF data, but it is a flowchart and diagramming software with high usability. Therefore, I attempted to convert data created with this tool into RDF. For converting data created in Microsoft Visio to RDF, the following Python library is used. ...

June 8, 2024 · 3 min · Nakamura

Using "ARC2 RDF Graph Visualization" from Python

Overview I had the opportunity to use “ARC2 RDF Graph Visualization” published by Masahide Kanzaki from Python, so here are my notes. The public page for “ARC2 RDF Graph Visualization” is below. https://www.kanzaki.com/works/2009/pub/graph-draw By providing RDF described in Turtle, RDF/XML, JSON-LD, TriG, or Microdata as input, you can obtain visualization results as png or svg files. Usage Example in Python i t o # u d } # r # i e m e u r a e f l p x t D l t S s C s o t p a a e p h r e r u t = " " " " " n o e e p # : o # w t = t a = R r g r q d n c s r s i _ " D t t a n s k p i p . S t r " p n h { F y y n a P e o n r m a h e @ a e t " p p k m O i n t i a v f q p t e t : e e d e S = f s ( n k e o . u r h d p " " i " T e " t e p w e e e s t : : r : r r . R ( d r e r s f = d : e " r e e h e r i e n i t i / x " " : " e q s e s e r s ( t s x " f t t p o q u p a p s s p o e . w , u n " n u e o d o p ( o u ( n / r w r g l " e s n e n o o n t r s g w t " r , s t s r s n s s p e 1 r P . l , " t s e s e s . e u s : a O k e , . [ e p t p p S a " p i ' i . a a _ o < h T n , o s C s t t s p n h . z s o e h a s t p r a t n n n x . P t e t n e k ( o t o t d N h . p g q i u t e t [ i G , c : " u . r n : r o / e c l a t a 5 n f ' n / s o , - 0 a i w t e t m P T P 0 m l b e x / d N y N ] e e ' n a w a G p G ) ( ) t m o t e o ) p r a i ' i u a l k = m ] m # t s e s d a a p . / a g ! g D u f o 2 t e = e i t : r 0 a . s _ g 0 ) ' p p / 9 i D l a p / m i a t r p a s y h o u g p ) p b e l f , e / / a i r g p y r e y r n i s x / a g n t i > p ' g s h : 5 t - c 0 _ \ d o 0 o n r n k \ a t c = n w e h T < " n a r h t r u t : a e t " c ) p ) t : e / r / s e x # a m [ p : l 5 e 0 . 0 o ] r g / b b b > n s 1 : a a a \ " c c c \ " . " Summary I hope this is helpful for visualizing RDF data. ...

June 7, 2024 · 4 min · Nakamura

Prototyping entity-lookup Using the Japan Search Utilization Schema

Overview This is a continuation of the following article. I will prototype a package that performs CWRC entity-lookup using the Japan Search utilization schema. Demo You can try it on the following page. https://nakamura196.github.io/nuxt3-demo/entity-lookup/ Entity-lookup is performed against JPS, Wikidata, and VIAF for each type such as Person, Place, and Organization. Library It is published at the following location. https://github.com/nakamura196/jps-entity-lookup Based on the repository https://github.com/cwrc/wikidata-entity-lookup already published by CWRC, I mainly modified the following file to match the Japan Search utilization schema. ...

May 17, 2024 · 1 min · Nakamura

Counting Triples in an RDF Store 2: Co-occurrence Frequency

Overview I had an opportunity to count co-occurrence frequencies for RDF triples, so this is a memo of the process. Following the article below, I will again use the Japan Search RDF store as an example. Example 1 The following counts the number of triples that share a common creator (schema:creator) among instances of the sword type. The filter avoids identical instances and prevents duplicate counting. s } e l ? ? F e e e I c n n L t t t T i i E ( t t R c y y ( o 1 2 ? u e n a a n t t ( t s t s i * y c y c t ) p h p h y e e e e 1 a : m : m s 刀 a 刀 a ! 剣 : 剣 : = ? ; c ; c c r r ? o e e e u a a n n t t t t o o i ) r r t y w ? ? 2 h v v e a a & r l l & e u u e e ? { e . . n t i t y 1 < ? e n t i t y 2 ) https://jpsearch.go.jp/rdf/sparql/easy/?query=select+(count(*)+as+%3Fcount)+where+{ ++%3Fentity1+a+type%3A刀剣%3B +++++++++++++schema%3Acreator+%3Fvalue+. ++%3Fentity2+a+type%3A刀剣%3B +++++++++++++schema%3Acreator+%3Fvalue+. ++FILTER(%3Fentity1+!%3D+%3Fentity2+%26%26+%3Fentity1+<+%3Fentity2) } ...

May 8, 2024 · 2 min · Nakamura

Counting the Number of Triples in an RDF Store

Overview This is a memo on how to count the number of triples in an RDF store. This time, we will use the Japan Search RDF store as an example. https://jpsearch.go.jp/rdf/sparql/easy/ Number of Triples You can count the number of triples with the following query. S W } E H L E ? E R s C E T ? { p ( C ? O o U N T ( * ) A S ? N u m b e r O f T r i p l e s ) The result is as follows. ...

May 6, 2024 · 4 min · Nakamura

Using the Course of Study LOD

Overview The Course of Study LOD is described as follows. The Course of Study LOD publishes the content, codes, and related information of the Course of Study and Education Guidelines published by the Ministry of Education, Culture, Sports, Science and Technology as Linked Open Data (LOD). The target for LOD conversion is the latest version of the code tables for all school types of current and former Courses of Study and Education Guidelines (including partial revisions) that are currently published. ...

April 15, 2024 · 1 min · Nakamura

Using the Media Arts Database SPARQL Endpoint with Yasgui

Overview The Media Arts Database was officially released on 2024/1/31. https://mediaarts-db.artmuseums.go.jp/ This article introduces usage examples of the Media Arts Database SPARQL endpoint with Yasgui. I hope the following article about Yasgui is also helpful. Usage Examples Time-series changes in the number of published manga tankoubon (collected volumes) https://api.triplydb.com/s/AqIH1InmC Time-series changes in the number of published game packages https://api.triplydb.com/s/L2REuOshZ Time-series changes in the number of published manga tankoubon containing “isekai” (another world) or “tensei” (reincarnation) https://api.triplydb.com/s/4ciTNJGb2 ...

February 17, 2024 · 4 min · Nakamura

Converting JSON-LD Data to RDF/XML and Turtle Using EASY RDF

Overview In the following article, I introduced how to add an export feature. One of the export formats available is JSON-LD. In this article, we will try converting this JSON-LD to RDF/XML and Turtle formats. Tool Used This time, we will use EASY RDF. https://www.easyrdf.org/converter Copy the contents of the following JSON-LD obtained through the Omeka S export. { } " " " " " " } " " " " " } " } " } " ] " " ] " ] " ] @ @ @ o o o , o o o o t , o , o , o , o o , d , d c i t : : : : : : : h : : : : : c c o d y i i o r r t t u c m m i s t t n " p d s w " " e e h i m " " " r " " o " " e { } t i { } e { } e { } t : e " _ n @ o s s u t b l m s e @ @ d @ @ d e t r r e " : p e i : o o m l n a e q a v t i v t i m e m m x " : u r d i u u b e a r d u t a y f a y a _ " s s t h 1 b " " d r r n " i g i a e l p i l p " " " s : " " : " " " " " : " " " " " " t " 2 l : : " c c a : l e u r d u e e u e : @ o e @ o t t p p i @ c t p p i @ : t o , i : e e i _ " m e " e " d e " i : t [ i : i y r r s v r y r r s v p : c { " _ _ l " d : " " : " : " " : [ d i " d i t p o o _ a e p o o _ a " s I " h 1 c t " a i : : : : : " d : " d l e p p p l a e p p p l h : t : t l e : a s " { " " : " : " e " e e u u t " e e u u t / e t a m a p h " " " h { " h : [ : " : r r b e o : r r b e t / m t p s p n " l t h h 2 t 2 t " ] " : t t l " r t t l " p o " r s s l u , a t t t 0 t 0 t h 1 , h 1 " y y i : " " y y i : s m , u : " a l y p t t 2 p 2 p t 3 t [ l _ _ c : l _ _ c : e e / : t l _ s p p 3 : 3 : t t i i l " " i i l " " / k , / e , u : s s - / - / p p t d a : a [ t d a : b / a o n " r / : : 0 / 1 / s s e " b a e " b b o s m u : l / 7 w 0 w : : r : e t a r : e t b m . e l s - w - w / / a l r " a l r " e a k l n " m o 2 w 1 w / / l 1 " u l 2 " u k w a , u : e m m 6 . 7 . o o " , : e " , : e a s s l k e e T w T w m m , , , , s . . l { a k k 2 3 0 3 e e " " . l a , s a a 2 . 6 . k k T C a d w . s s : o : o a a i r w a s a . . 5 r 5 r s s t e s s . w a a 2 g 6 g . . l a . . l s w w : / : / a a e t l j d . s s 3 2 1 2 w w " o d p a l . . 1 0 6 0 s s , r a / s d l l + 0 + 0 . . " s x . a d d 0 1 0 1 l l , . x j s a a 0 / 0 / d d j x p . s s : X : X a a p / j . . 0 M 0 M s s o x p j j 0 L 0 L . . x m x / p p " S " S j j x e x x / / , c , c p p x k / x x x h h / / / a o x x x e e x x o s m / x x m m x x m / e o / a a x x e a k m o # # / / k p a e m m d d o o a i s k e e a a m m s / a k k t t e e i a s a a e e k k a t p / s s T T a a p e i f / / i i s s i m / i f f m m / / - s u l i i e e a a c s e l l " " p p 1 e s e e i i n 2 r / s s / / t " s l / / m s e , / a m s e i x 1 r e q d t t " g d u i e " , e i a a s , / u r / / 4 m e 1 1 f / / 3 " 5 4 4 " , 7 f f , 9 5 5 6 7 7 0 9 9 c 6 6 4 0 0 4 c c 7 4 4 1 4 4 c 7 7 9 1 1 5 c c 4 9 9 c 5 5 6 4 4 d c c 3 6 6 a d d a 3 3 c a a 0 a a a c c 2 0 0 3 a a b 2 2 d 3 3 4 b b 4 d d 1 4 4 a 4 4 6 1 1 f a a 4 6 6 e f f b 4 4 8 e e b b b . 8 8 j b b p . . g j j " p p , g g " " , Then, paste it into the Input Data form in EASY RDF. ...

October 24, 2023 · 7 min · Nakamura

Visualizing Item Counts by Latest Update Year for the Japan Search Utilization Schema

This is a memo about visualizing item counts by latest update year for the Japan Search utilization schema. https://api.triplydb.com/s/bfcE2qF65 It is based on the following query. https://zenn.dev/nakamura196/books/a4534e306de7e7/viewer/e38587 We hope this is helpful.

August 16, 2023 · 1 min · Nakamura

Utilizing Exhibition Information Stored in the Cultural Japan RDF Store

Overview The Cultural Japan RDF store contains information about exhibitions. You can retrieve a list using a query like the following, specifying type:展覧会 (Exhibition) for rdf:type. P P s } R R e ? E E l s F F e I I c r X X t d f t r d : r y d i t d p f s y f e s t p s : : i e : n l < < c t a h h t y b t t p e t t e l p p : s : w 展 ? : h 覧 l e 会 a w r ; b j w e e p w l s . { e w . a 3 r . c o h r . g g 2 . 0 j 0 p 0 / / t 0 e 1 r / m r / d t f y - p s e c / h > e m a # > https://ld.cultural.jp/snorql/?query=select+distinct+*+where+{ %3Fs+rdf%3Atype+type%3A展覧会%3B +++++++rdfs%3Alabel+%3Flabel+.+ } ++ ...

August 4, 2023 · 7 min · Nakamura

Checking ORCID RDF Data

Here is how to check the RDF data of ORCID. The following ORCID ID is used as the target. https://orcid.org/0000-0001-8245-7925 For browsing, I use the Linked Data Browser developed by Masahide Kanzaki. https://www.kanzaki.com/works/2014/pub/ld-browser For example, you can browse the RDF data from the following URL. https://www.kanzaki.com/works/2014/pub/ld-browser?u=https%3A%2F%2Forcid.org%2F0000-0001-8245-7925 The specific RDF data is as follows. < r / d < r f f / d : x x x x x x x x o < > < > < > < < < < < f f R m m m m m m m m a p 2 p 2 p 2 p p / p f f o : D l l l l l l l l f a 0 r 0 a 0 a r < p a o o a R F n n n n n n n n : v 1 o 2 v 2 v o p / r v a a f D s s s s s s s s P : 7 v 2 : 2 : v r < < < < < < < < p o : f f : F : : : : : : : : e c - : - l - c : o f / f / f f / f f r r r v c : : P > r o p p r g f x r r 0 g 1 a 1 r w v o < f o < f o o < f o o d d o : r m p e d w r a d n o s s e 7 e 2 s 2 e a : a f / o a f o a a g / o a a f f v w e a r r f l o v f = a d o a - n - t - a s P f o < < < f a f o a f f n < < g a f f s : : a a k i s = = v = s " f = n t 1 e 1 U 1 t A e : a r f f o f : a f : : : g / g n f : : : t P s t e m o " " = " = h = " a e 4 r 4 p 4 e t r a f d o o a : p f : p b F n < g n : : f g l y e A e r a n h h " h " t " h l d T a T d T d t s c : f a a f a u : p a a e : r / n : F b a i a p r t d r a t t h t h t h t P O 0 t 0 a 0 W r o c O s f f : c b D u g s a p d < < < r : c e a m v b e s t B r y l t t t t t p t t r n 0 e 2 t 2 i i n o n : : : O c l o b e e t a f g g r d p o a s i e e o r y d T P p p t p t : t p o : d : e : t b u l l a a n o i c l d u r : n n d f a u t e l n l r n i f o r : : p : p / p : f r 2 A 4 O 4 h u r n i a c c l u c u i r _ r e D : : f : r n u d y N > d > b r : p o / : : : i d 7 t 0 n 0 t d t n b c c i n a m c d n e n e n c s D e t r _ N a S f u d r i f / w l f : T : : r e f > e e o o n t t e a f e > t s a o : e n r e n a m a : t f e c i w w p / w w e : 1 i 0 r 0 d d : A l u u e > i n t : a C c m u l s t y > e m e t r e : s l w w w u w w x w D d 7 m 4 d 4 f T a c > n n A o t i r r o r e n a c C C a e > o e d r o r e w w w r w . m w o a . e . f . : o b c 0 t t c n o e > u i > t b r o o r > S r s T e u d D . . w l w g l . c t 4 6 : 6 r > o o 0 N S c s r n s n p J r e i u d > N a u o o s r f o w w . . . e n w u a 2 r 9 d 9 e u u 0 a e o > d s o t t a y l p n e a t u > o c : c 3 3 w o w o s 3 m t 1 d 3 a 3 s t n 0 m r u f > u r i p C > t t > k o N r u e r u . . 3 r 3 n . . e y Z f Z t Z o = t - e v n : r y o a o J i r J a r a c r = e m o o . g . a c o n p < : < a < u " 0 > i t a c > n n d a o y P m u k e c " s e r r o o m o r t e / d / t / r h r 0 0 c > b e < e p n > < u < a = e h o n g g r p r e m g = p a p y p c t d 0 0 e o = r / > a > / r / m " = t u t / / g a g s / r " a t r p a e t f 1 0 H u " d g J n g a f u h " t r > 1 2 / v . f 2 d h v a o e v = p : - 0 o t h f n P < n < r t h p c 9 0 n 2 o o 0 f t : t v = : " s a 8 - m = t : : < : a a t t s e 9 0 s " 0 r a 0 : t c y : " l h : b 2 0 e " t a n r c f f < p t : = 9 2 0 g f 1 a p r p g h a t / o 4 0 p h p b a g d o o : / : p / " / p 0 / b : e e e t s t / u 5 0 a t s o m n f u a g r / s / h 0 0 r 0 X o / a = n t t p o t - 1 g t : u e : s n f i d / : t 2 7 0 n . M u / t " e p U s r = 7 - e p / t > c : t : v f x r t / v 1 t 1 L t w e h r : p : c " 9 8 s / = o l r f e s m c p 2 o # / o / S = w d t a / d / i h 2 2 r : r " u a y a n : l o i s 2 w " r l " c " w O t t / a / d t 5 4 d / e h n b C m N l n r d : - l d o h h . n p e w t o . t < 5 f / s t t e o i a a s c . r # f g e t w > : d w e r o p / - : o e t r l d l m b . i d " - y m t 3 / A w O c r s r 7 r r a p y > e y e e c d r o f s # a p . / t . n i g : d 9 e c r : C > N > l o . g r - c " # : w T w > d / / f 2 s i c / o a > m o / c s h " r w i 3 . 0 / s 5 o d h / d m / r 0 i y e > / g w m . o 0 o : < u . m s e e f g 0 d n m p / . e o r 0 r l / r o a w > > o / 0 . t a u 2 w > r g 0 c a f c r p s a 0 0 o a # b 0 3 g " - i b o e g . . f 0 - r x " . 0 . / / 0 d e a = / j g / 0 0 g - o 1 o 2 > 0 . l f " 0 p e 0 0 0 / n r / r 0 0 o > : h 0 / o . - 0 0 s c X g 0 1 r a t 0 n n 1 0 1 0 # i M / 1 - g c t 0 a a / 0 - 0 " d L 2 / 8 / c p - k m P 0 8 0 . S 0 X 2 0 o s 0 a e e 1 2 - o c 0 M 4 0 u : 0 m s r - 4 0 r h 1 L 5 0 n / 0 u . s 8 5 0 g e / S - 0 t / 1 r o o 2 - 0 / m X c 7 - N o - a r n 4 7 1 o a M h 9 0 a r 8 . g " 5 9 - r # L e 2 0 m c 2 s / / - 2 8 c d S m 5 0 e i 4 a 1 > 7 5 2 i a c a " 1 > d 5 t 8 9 " 4 d t h # > - . - o 6 2 / 5 - e e d 8 o 7 r 1 5 > - p T m a 2 r 9 u 0 " 7 u i a t 4 g 2 / 6 / 9 b m # e 5 " 5 ? 0 > 2 - e d T - / # l / 5 w " a i 7 > w a " " e t m 9 o n > / b e e 2 r g > / T " 5 k = e i # s e x m o p n p e r a g e " c c l r i e i i d - s m - w h e i o " n d r / t " k > a > s l " _ / r > d f _ v 1 / 0 0 0 0 - 0 0 0 1 - 8 2 4 5 - 7 9 2 5 " > I hope this is helpful as a reference. ...

April 20, 2023 · 11 min · Nakamura

Creating RDF from Excel

Overview For creating RDF data, I prototyped a Python library that converts data created in Excel to RDF data. It is still a work in progress, but here are my notes. Notebook You can try it from the following notebook. https://colab.research.google.com/github/nakamura196/ndl_ocr/blob/main/ExcelからRDFデータを作成する.ipynb Source Excel Data Create an Excel file like the following. https://docs.google.com/spreadsheets/d/16SufG69_aZP0u0Kez8bisImGvVb4-z990AEPesdVxLo/edit#gid=0 In the above example, the prefix information used is organized in a sheet named “prefix.” The actual data is entered in a sheet named “target.” Referencing the specifications of Omeka S’s Bulk Import, language labels like “@ja” and types like “^^uri” are specified. ...

April 3, 2023 · 1 min · Nakamura

Trying to Create a ShEx File

Overview ShEx is described on Wikipedia as: Shape Expressions is a data modeling language for validating and describing Resource Description Framework Here are my notes from attempting to create a ShEx file. Creating a ShEx File This time, we start with RDF data in data/tmp/merged.ttl. We use shexer to create a ShEx file from the RDF data. p i p i n s t a l l s h e x e r Get the list of classes in the RDF data. ...

April 3, 2023 · 18 min · Nakamura

Obtaining Persistent Identifiers with w3id.org and Redirecting to Snorql

Overview I created the following page for publishing RDF data. https://sukilam-educational-metadata.github.io/ In particular, from the following page, you can search RDF data using SPARQL and Snorql. For Snorql, I am using “Snorql for Japan Search”. Please try the query examples at the bottom of the page. https://sukilam-educational-metadata.github.io/snorql/ When publishing this page, I obtained persistent identifiers using w3id.org and set up redirects to Snorql, so this is a personal note for future reference. ...

April 2, 2023 · 3 min · Nakamura