Slide 1

Slide 1 text

0UPOBTIJNFFUTJN!TQBSRM ʹ͜͠Γ͞ͿΖʙ!TVCSPI@

Slide 2

Slide 2 text

ࣗݾ঺հ w ʹ͜͠Γ͞ͿΖʙ w גࣜձࣾ#FBS5BJM w "OESPJEΤϯδχΞ ,PUMJO+BWB ˑ w 8FCΤϯδχΞ 3BJMT3FBDU w ୲౰଎ਫ૗ɾࡾๆ݁՚ 5XJUUFS*%!TVCSPI@

Slide 3

Slide 3 text

ϓνใࠂ w খௗ͞Μͱ%SPJE,BJHJొஃ͠·ͨ͠ 4QFL.PDL,+B$P$PͰ ΠέͯΔ6OJU5FTU؀ڥΛखʹೖΕΖ

Slide 4

Slide 4 text

໨࣍ ʮ0UPOBTIJʯͷػೳ঺հ w ,PUMJO੡41"32-ΫϥΠΞϯτ w ੡࡞ͷϞνϕʔγϣϯ ݐલຊԻ σϞɾ࢖͍ํ ͜Ε͔Βͷ໺๬

Slide 5

Slide 5 text

0UPOBTIJ w ,PUMJO੡41"32-ΫϥΠΞϯτ w (JUIVCTVCSPIPUPOBTIJ w ػೳ w 41"32-༻ͷΫΤϦϏϧμʔ w ޠኮิ׬ w +40/ܗࣜͷϨεϙϯεύʔαʔ

Slide 6

Slide 6 text

0WFSWJFX w ࡾๆ݁՚ͷσʔλΛશͯऔͬͯ͘ΔΫΤϦ SELECT ?predicate ?object WHERE { ?idol_iri rdf:type imas:Idol; schema:name ?idol_name. filter( contains(?idol_name, "三峰") ) ?idol_iri ?predicate ?object } client.where { v("idol_iri") be { rdfP.type to imasC.idol and schemaP.name to v("idol_name") } filter { contains(v("idol_name"), "三峰") } v("idol_iri") be { v("predicate") to v("object") } }.select { + v("predicate") + v("object") } ੜΫΤϦ 0UPOBTIJ

Slide 7

Slide 7 text

0WFSWJFX w ࡾๆ݁՚ͷσʔλΛશͯऔͬͯ͘ΔΫΤϦ SELECT ?predicate ?object WHERE { ?idol_iri rdf:type imas:Idol; schema:name ?idol_name. filter( contains(?idol_name, "三峰") ) ?idol_iri ?predicate ?object } client.where { v("idol_iri") be { rdfP.type to imasC.idol and schemaP.name to v("idol_name") } filter { contains(v("idol_name"), "三峰") } v("idol_iri") be { v("predicate") to v("object") } }.select { + v("predicate") + v("object") } ੜΫΤϦ 0UPOBTIJ

Slide 8

Slide 8 text

0WFSWJFX w ࡾๆ݁՚ͷσʔλΛશͯऔͬͯ͘ΔΫΤϦ SELECT ?predicate ?object WHERE { ?idol_iri rdf:type imas:Idol; schema:name ?idol_name. filter( contains(?idol_name, "三峰") ) ?idol_iri ?predicate ?object } client.where { v("idol_iri") be { rdfP.type to imasC.idol and schemaP.name to v("idol_name") } filter { contains(v("idol_name"), "三峰") } v("idol_iri") be { v("predicate") to v("object") } }.select { + v("predicate") + v("object") } ੜΫΤϦ 0UPOBTIJ

Slide 9

Slide 9 text

0WFSWJFX w ίʔσΟϯάσϞ

Slide 10

Slide 10 text

Ϟνϕʔγϣϯ ݐલ w ઌߦϥΠϒϥϦ"QBDIF+FOB w جຊతʹԿͰ΋Ͱ͖Δ w "32ˠΫΤϦΤϯδϯ w 41"32-ͷจ๏࢓༷ʹ४ڌ w JN!TQBSRMͰ΋ར༻ ਺ϲ݄લͷ΅͘ʮ͜ΕͰ͑͑΍Μʯ

Slide 11

Slide 11 text

Ϟνϕʔγϣϯ ݐલ w "QBDIF+FOB"32ͷαϯϓϧίʔυ 5SJQMFܕΠϯελϯεΛ࡞ͬͯ #MPDLΛද͢Πϯελϯεʹ BEE5SJQMF͢Δ ΅͘ʮ͏ʔΜѹ౗త+BWBΈɹ௚ײత͡Όͳ͍ʯ

Slide 12

Slide 12 text

Ϟνϕʔγϣϯ ݐલ w "OESPJEͰࢼ͠ʹ࢖͏ ʊਓਓਓਓਓਓਓਓʊ ʼɹbuild failedɹʻ ʉY^Y^Y^Y^Y^Y^Y^Y^ʉ ݁࿦ࣗ࡞͠Α͏ w 41"32-ͷΫΤϦΛ"DUJWF3FDPSEͬΆ͍ॻ͖ຯͰॻ͚Δ w "OESPJEͰಈ͘ w ޠኮͷิ׬ػೳ͕͋Δ ผϞδϡʔϧͰఏڙ w ·ͣ͸4FMFDUจ͚ͩͰ΋࢖͑ΔΑ͏ʹ͢Δ

Slide 13

Slide 13 text

Ϟνϕʔγϣϯ ຊԻ w ϛϦΦϯUI#%ൃച w ಛయө૾ʹͯɺΨϛ1͔ΒΞΠυϧୡ΁ͷ՝୊ఏى w Ψϛ1ʮΞΠυϧʹͱͬͯɺ଍Γͳ͍΋ͷ͕͋Δͱࢥ͍·͢ʯ

Slide 14

Slide 14 text

Ϟνϕʔγϣϯ ຊԻ w Ψϛ1ʮ଍Γͳ͍ϞϊɺͦΕ͸ʮ஌ੑʯͰ͢ʯ

Slide 15

Slide 15 text

Ϟνϕʔγϣϯ ຊԻ w લఏ,PUMJOͰॻ͔Εͨʮ0UPOBTIJʯ 0UPOBTIJNBEFCZ,PUMJO w ͜ͷϥΠϒϥϦ͸খௗ͞ΜͱಉҰͷଘࡏ w ੈքதɺ͋ΒΏΔ41"32-ΤϯυϙΠϯτ͔Β৘ใΛऔಘ w ࢖ΘΕΕ͹࢖ΘΕΔ΄Ͳখௗ͞Μ͸஌ੑΛ֫ಘ͍ͯ͘͠ w খௗ͞Μˠ଍Γͳ͍΋ͷ ஌ੑ Λิ͑Δ w ΅͘ˠਓྨͷӥஐͷશͯΛ֫ಘͨ͠z࠷ڧͷԻແখௗzΛҭͯΒΕΔ

Slide 16

Slide 16 text

αϯϓϧΞϓϦͷσϞ w "OESPJEΞϓϦ https://twitter.com/subroh_0508/status/1115635445889523712

Slide 17

Slide 17 text

αϯϓϧΞϓϦͷσϞ w αʔόʔαΠυ,PUMJO ,UPS 3FBDU 5ZQF4DSJQU https://twitter.com/subroh_0508/status/1118176150058967040

Slide 18

Slide 18 text

࢖͍ํ w (SBEMFͷEFQFOEFODJFTʹґଘؔ܎௥Ճ // build.gradle repositories { jcentor() } // app/build.gradle dependencies { implementation 'net.subroh0508.otonashi:core:${latest_version}' // additional implementation 'net.subroh0508.otonashi.vocabularies:schema:${latest_version}' implementation 'net.subroh0508.otonashi.vocabularies:foaf:${latest_version}' implementation 'net.subroh0508.otonashi.vocabularies:imasparql:${latest_version}' }

Slide 19

Slide 19 text

࢖͍ํ w (SBEMFͷEFQFOEFODJFTʹґଘؔ܎௥Ճ // build.gradle repositories { jcentor() } // app/build.gradle dependencies { implementation 'net.subroh0508.otonashi:core:${latest_version}' // additional implementation 'net.subroh0508.otonashi.vocabularies:schema:${latest_version}' implementation 'net.subroh0508.otonashi.vocabularies:foaf:${latest_version}' implementation 'net.subroh0508.otonashi.vocabularies:imasparql:${latest_version}' } ޠኮิ׬༻ϥΠϒϥϦ ඞཁʹԠͯ͡௥ه

Slide 20

Slide 20 text

࢖͍ํ w ΤϯυϙΠϯτɾ13&'*9ɾޠኮิ׬ΦϒδΣΫτͷࢦఆ val client: Kotori = Otonashi.Study { destination("https://sparql.crssnky.xyz/spql/imas/query") reminds(SchemaPrefix.SCHEMA, FoafPrefix.FOAF, ImasparqlPrefix.IMAS) buildsUp(*schemaVocabularies, *foafVocabularies, *imasparqlVocabularies) }

Slide 21

Slide 21 text

࢖͍ํ w ΤϯυϙΠϯτɾ13&'*9ɾޠኮิ׬ΦϒδΣΫτͷࢦఆ val client: Kotori = Otonashi.Study { destination("https://sparql.crssnky.xyz/spql/imas/query") reminds(SchemaPrefix.SCHEMA, FoafPrefix.FOAF, ImasparqlPrefix.IMAS) buildsUp(*schemaVocabularies, *foafVocabularies, *imasparqlVocabularies) } ΤϯυϙΠϯτࢦఆ

Slide 22

Slide 22 text

࢖͍ํ w ΤϯυϙΠϯτɾ13&'*9ɾޠኮิ׬ΦϒδΣΫτͷࢦఆ val client: Kotori = Otonashi.Study { destination("https://sparql.crssnky.xyz/spql/imas/query") reminds(SchemaPrefix.SCHEMA, FoafPrefix.FOAF, ImasparqlPrefix.IMAS) buildsUp(*schemaVocabularies, *foafVocabularies, *imasparqlVocabularies) } 13&'*9Λઃఆ ͜ͷҰߦͰҎԼͷ13&'*9͕ΫΤϦʹ௥Ճ͞ΕΔ PREFIX schema: PREFIX foaf: PREFIX imas:

Slide 23

Slide 23 text

࢖͍ํ w ΤϯυϙΠϯτɾ13&'*9ɾޠኮิ׬ΦϒδΣΫτͷࢦఆ val client: Kotori = Otonashi.Study { destination("https://sparql.crssnky.xyz/spql/imas/query") reminds(SchemaPrefix.SCHEMA, FoafPrefix.FOAF, ImasparqlPrefix.IMAS) buildsUp(*schemaVocabularies, *foafVocabularies, *imasparqlVocabularies) } ޠኮิ׬ΦϒδΣΫτͷࢦఆ TDIFNBPSH΍JN!TQBSRMͷ*3*ޠኮ͕ิ׬Ͱ͖ΔΑ͏ʹ͢Δॲཧ

Slide 24

Slide 24 text

࢖͍ํ w ΫΤϦ૊Έཱͯ+40/ͷϚοϓઌΫϥεͷએݴ client.where { v("idol_iri") be { rdfP.type to imasC.idol and schemaP.name to v("idol_name") } filter { contains(v("idol_name"), "三峰") } v("idol_iri") be { v("predicate") to v("object") } }.select { + v("predicate") + v("object") } @Serializable data class MitsumineResult( val predicate: String, val `object`: String ) ΫΤϦ ϚοϓઌͷσʔλΫϥε

Slide 25

Slide 25 text

࢖͍ํ w )551ΫϥΠΞϯτϥΠϒϥϦΛ࢖ͬͯΫΤϦΛ౤͛Δ ྫ,UPS suspend inline fun get(kotori: Kotori): SparqlResponse { val ktorClient: HttpClient = ... val response = ktorClient.get(kotori.toString()) { accept(ContentType("application", "sparql-results+json")) } @UseExperimental(ImplicitReflectionSerializer::class) return Json.nonstrict.parse( SparqlResponse.serializer(MitsumineResult.serializer()), response.readText(charset = Charsets.UTF_8) ) }

Slide 26

Slide 26 text

࢖͍ํ w )551ΫϥΠΞϯτϥΠϒϥϦΛ࢖ͬͯΫΤϦΛ౤͛Δ ྫ,UPS suspend inline fun get(kotori: Kotori): SparqlResponse { val ktorClient: HttpClient = ... val response = ktorClient.get(kotori.toString()) { accept(ContentType("application", "sparql-results+json")) } @UseExperimental(ImplicitReflectionSerializer::class) return Json.nonstrict.parse( SparqlResponse.serializer(MitsumineResult.serializer()), response.readText(charset = Charsets.UTF_8) ) } ,PUPSJUP4USJOH Ͱ ΤϯίʔυࡁΈ63-Λऔಘ

Slide 27

Slide 27 text

࢖͍ํ w )551ΫϥΠΞϯτϥΠϒϥϦΛ࢖ͬͯΫΤϦΛ౤͛Δ ྫ,UPS suspend inline fun get(kotori: Kotori): SparqlResponse { val ktorClient: HttpClient = ... val response = ktorClient.get(kotori.toString()) { accept(ContentType("application", "sparql-results+json")) } @UseExperimental(ImplicitReflectionSerializer::class) return Json.nonstrict.parse( SparqlResponse.serializer(MitsumineResult.serializer()), response.readText(charset = Charsets.UTF_8) ) } ϦΫΤετૹ৴

Slide 28

Slide 28 text

࢖͍ํ w )551ΫϥΠΞϯτϥΠϒϥϦΛ࢖ͬͯΫΤϦΛ౤͛Δ ྫ,UPS suspend inline fun get(kotori: Kotori): SparqlResponse { val ktorClient: HttpClient = ... val response = ktorClient.get(kotori.toString()) { accept(ContentType("application", "sparql-results+json")) } @UseExperimental(ImplicitReflectionSerializer::class) return Json.nonstrict.parse( SparqlResponse.serializer(MitsumineResult.serializer()), response.readText(charset = Charsets.UTF_8) ) } +40/ˠ.JUTVNJOF3FTVMU΁ͷม׵

Slide 29

Slide 29 text

͜Ε͔Βͷ໺๬ w $*Ͱςετճ͢ w 41"32-ͷݴޠ࢓༷ʹԊͬͯ࡞Γ௚͢ ಛʹ4FSWJDFߏจͷ௥Ճ w ಈ͘͜ͱΛ࠷༏ઌʹͨͨ͠Ίɺ֤ॴΨόΨό࣮૷Ͱػೳత੍ݶ͕ଟ͍ w αϯϓϧΞϓϦͷ௥Ճ w ,PUMJO+4,PUMJOˠ+BWBTDSJQUͷτϥϯεύΠϧϑϨʔϜϫʔΫ w ,PUMJO/BUJWF,PUMJOͰJ04ΞϓϦ࡞ΕΔϑϨʔϜϫʔΫ ݄ͷ-5ձͰ༧ఆ͍ͯͨ͠Ϟϊ͕஻Εͳ͍৔߹͸0UPOBTIJͷৄ͍࣮͠૷ղઆ͢Δ͔΋

Slide 30

Slide 30 text

rʮ5P1BSSBOHFECZTVCSPI@ʯ lͲΜͳ೔΋৐Γӽ͑ͯ ·͙ͬ͢ਐ΋͏ ΈΜͳ৴ͯ͡ ࠷ڧͷԻແখௗɺ஀ੜͷॠؒ·Ͱz (JWFNFB4UBS 8FMDPNF$POUSJCVUFTˠTVCSPIPUPOBTIJ