cl-ignition - Common Lisp SPARQL Query Generator

5ce5c2aee2ec6dd358bf8e4e5d84d6e1?s=47 tomabu
December 15, 2018

cl-ignition - Common Lisp SPARQL Query Generator

About the Common Lisp library for generating SPARQL query in S-expression.

5ce5c2aee2ec6dd358bf8e4e5d84d6e1?s=128

tomabu

December 15, 2018
Tweet

Transcript

  1. 2.

    LOD The 8th Conference of Kansai Lisp Users Group 2018ー12ー15 -JOLFE0QFO%BUBʢϦϯΫτɾΦʔϓϯɾσʔλɺ໊ུ-0%ʣ͸ɺ

    ΢Σϒ্Ͱίϯϐϡʔλॲཧʹదͨ͠σʔλΛެ։ɾڞ༗͢ΔͨΊͷ ٕज़ͷ૯শͰ͋Δɻ ैདྷͷ΢Σϒ͕)5.-จॻؒͷϋΠύʔϦϯΫʹΑΔਓؒͷͨΊͷ ৘ใۭؒͷߏஙΛ໨తͱ͖ͯͨ͜͠ͱʹରԠͯ͠ɺ -JOLFE0QFO%BUBͰ͸ߏ଄Խ͞Εͨσʔλಉ࢜ΛϦϯΫͤ͞Δ͜ͱͰ ίϯϐϡʔλ͕ར༻Մೳͳʮσʔλͷ΢ΣϒʯͷߏஙΛ໨ࢦ͓ͯ͠Γɺ ηϚϯςΟοΫ΢Σϒͷܗ੒ʹॏཁͳٕज़ͱͳ͍ͬͯΔ<> ɻ ʢ8JLJQFEJBɿ-JOLFE0QFO%BUBΑΓʣ
  2. 3.

    SPARQL The 8th Conference of Kansai Lisp Users Group 2018ー12ー15 41"32-ʢεύʔΫϧ<>ɺ41"32-1SPUPDPMBOE3%'2VFSZ-BOHVBHFͷ

    ࠶ؼత಄ࣈޠʣ͸ɺ3%'ΫΤϦݴޠͷ̍ͭͰ͋Δɻ3%'ΫΤϦݴޠ͸ɺ 3FTPVSDF%FTDSJQUJPO'SBNFXPSL 3%' Ͱهड़͞Εͨ9.-΍5VSUMFͳͲͷ 3%'σʔλͷϦιʔεΛऔΓѻ͏ͨΊͷίϯϐϡʔλݴޠͰ͋Δɻ 41"32-͸ɺΫΤϦͷجຊతͳύλʔϯͰ͋Δ࿦ཧੵ΍࿦ཧ࿨Λ͸͡Ίɺ จࣈྻૢ࡞΍ϑΟϧλʔͳͲͷͦͷଞͷύλʔϯΛࢦఆՄೳͰ͋Γ<>ɺ 1ZUIPO΍3VCZͳͲͷϓϩάϥϛϯάݴޠͰ41"32-Λར༻Ͱ͖Δ ϥΠϒϥϦ͕ଘࡏ͢Δ<>ɻ ʢ8JLJQFEJBɿ41"32-ΑΓʣ
  3. 4.

    RDF・SPARQL The 8th Conference of Kansai Lisp Users Group 2018ー12ー15 ே೔ωοτɾ41"32-

    8$ͷ೔ຊޠ༁ ɿ IUUQXXXBTBIJOFUPSKQdBYTLNUOJOUFSOFUSEGSEGTQBSRM RVFSZIUNM 8$ɾ41"32-ɿ IUUQTXXXXPSH53SEGTQBSRMRVFSZ
  4. 5.

    DBpedia The 8th Conference of Kansai Lisp Users Group 2018ー12ー15 8JLJQEJB͔ΒσʔλΛऔΓग़͠ɼ-0%ͱͯ͠ެ։͢ΔίϛϡχςΟɾϓϩδΣΫτ

    ຊՈ%#QFEJB͸ɼओʹӳޠ൛ͷ8JLJQFEJBΛର৅ %#QFEJB೔ຊޠ൛͸ɼӳޠ൛ʴ೔ຊޠ൛8JLJQFEJB ൒खಈɾ൒ࣗಈͰσʔλΛ෇༩͍ͯ͠Δͱͷ͜ͱ ೔ຊޠ൛ ɹIUUQKBECQFEJBPSH  ӳޠ൛ ɹIUUQTXJLJECQFEJBPSH
  5. 6.

    SPARQLクエリ The 8th Conference of Kansai Lisp Users Group 2018ー12ー15 جຊతͳ4FMFDUจ

    TFMFDUEJTUJODU XIFSF\IUUQKBECQFEJBPSHSFTPVSDF౦ژ౎ ɹɹɹɹɹɹɹɹIUUQECQFEJBPSHPOUPMPHZMFBEFS/BNF P^ TFMFDUදࣔର৅DPOEJUJPO\lओޠlड़ޠzl໨తޠ^MJNJU l౦ژ౎zͷzϦʔμʔz͸ʁ 4FMFDUྫ %#QFEJB IUUQKBECQFEJBPSHSFTPVSDFદఴཁҰ
  6. 7.

    SPARQLクエリ The 8th Conference of Kansai Lisp Users Group 2018ー12ー15 TFMFDUEJTUJODU

    XIFSF\IUUQKBECQFEJBPSHSFTPVSDF౦ژ౎ ɹɹɹɹɹɹɹɹ QIUUQKBECQFEJBPSHSFTPVSDFદఴཁҰ^ l౦ژ౎zͱlદఴཁҰzͱͷlؔ܎z͸ʁ 4FMFDUྫ %#QFEJB IUUQECQFEJBPSHPOUPMPHZMFBEFS/BNF IUUQECQFEJBPSHPOUPMPHZXJLJ1BHF8JLJ-JOL IUUQKBECQFEJBPSHQSPQFSUZ஌ࣄ
  7. 8.

    日本語版DBpediaはHPで SPARQLエンドポイントも 公開してくれてる The 8th Conference of Kansai Lisp Users

    Group 2018ー12ー15 ˞41"32-ΤϯυϙΠϯτɿ41"32-ΫΤϦΛ࣮ߦ͢ΔΠϯλϑΣʔε
  8. 16.

    SPARQL実行例(DBpedia) The 8th Conference of Kansai Lisp Users Group 2018ー12ー15 l౦ژ౎zͷzϦʔμʔz͸ʁ

    TFMFDUEJTUJODU XIFSF\IUUQKBECQFEJBPSHSFTPVSDF౦ژ౎ IUUQECQFEJBPSHPOUPMPHZMFBEFS/BNF P^ ֤Ϧιʔε͸جຊ63*Ͱදݱ͞ΕΔ
  9. 17.

    SPARQL実行例(DBpedia) The 8th Conference of Kansai Lisp Users Group 2018ー12ー15 l౦ژ౎zͱlદఴཁҰzͱͷlؔ܎z͸ʁ

    TFMFDUEJTUJODU XIFSF\IUUQKBECQFEJBPSHSFTPVSDF౦ژ౎ɹ QIUUQKBECQFEJBPSHSFTPVSDFદఴཁҰ^
  10. 20.

    The 8th Conference of Kansai Lisp Users Group 2018ー12ー15 Common Lisp

    SPARQLクエリGenerator プロジェクト CL-Ignition IUUQTHJUIVCDPNECZNDMJHOJUJPO
  11. 21.

    Common Lisp SPARQLクエリGenerator プロジェクト The 8th Conference of Kansai Lisp

    Users Group 2018ー12ー15 CL-Ignition IUUQTHJUIVCDPNECZNDMJHOJUJPO
  12. 22.

    cl-ignitionで出来る (ようにしたい)こと The 8th Conference of Kansai Lisp Users Group 2018ー12ー15

    ɾ41"32-ͷΫΤϦੜ੒ ɾ41"32-ͷ࣮ߦ ɾ41"32-࣮ߦ݁Ռͷར༻ิॿ ɾͦͷଞΫΤϦߏஙิॿػೳ
  13. 24.

    基本的な関数・マクロ The 8th Conference of Kansai Lisp Users Group 2018ー12ー15 ؔ਺

    ϚΫϩ ɾXJUIQSFpYɿ41"32-ΫΤϦ࣮ߦ݁ՌΛγϯϘϧʹଋറ ɾDPOWFSURVFSZɿΫΤϦΦϒδΣΫτΛΫΤϦจࣈྻʹม׵ ɾSFTVMUpMUFSɿΫΤϦ࣮ߦ݁Ռ͔ΒσʔλΛநग़ ɾHFUTJOHMFLFZɿಉ্ ʴฦ٫σʔλͷΩʔΛ͚ͭͩࢦఆ  ɾSFRVFTUECQFEJBɿ%#QFEJBͷ41"32-αʔόʔʹ໰߹Θͤ
  14. 25.

    SPARQLのPrefix The 8th Conference of Kansai Lisp Users Group 2018ー12ー15 TFMFDUEJTUJODU

    1 0XIFSF\IUUQKBECQFEJBPSHSFTPVSDF෺ޠ IUUQECQFEJBPSHPOUPMPHZBCTUSBDU 0^ 13&'*9ECQFEJBKBIUUQKBECQFEJBPSHSFTPVSDF 13&'*9POUPMPHZIUUQECQFEJBPSHPOUPMPHZ TFMFDUEJTUJODU XIFSF\ECQFEJBKB෺ޠPOUPMPHZBCTUSBDU P^ cc ୺తʹ͸লུදه
  15. 26.

    基本的な使い方例 The 8th Conference of Kansai Lisp Users Group 2018ー12ー15 RMRVJDLMPBEDMJHOJUJPO

     DMJHOJUJPOXJUIQSFpY WBM     ECQFEJBKQIUUQKBECQFEJBPSHSFTPVSDF      POUPMPHZIUUQECQFEJBPSHPOUPMPHZ     TFMFDU OJM Q P     EJTUJODUU    TVCKFDU ECQFEJBKQ෺ޠ     QSFEJDBUF POUPMPHZBCTUSBDU    DMJHOJUJPODPOWFSURVFSZWBM  lTFMFDUEJTUJODU 1 0XIFSF\IUUQKBECQFEJBPSHSFTPVSDF෺ޠ IUUQECQFEJBPSHPOUPMPHZBCTUSBDU 0^
  16. 27.

    基本的な使い方例 The 8th Conference of Kansai Lisp Users Group 2018ー12ー15 RMRVJDLMPBEDMJHOJUJPO

     DMJHOJUJPOXJUIQSFpY WBM     ECQFEJBKQIUUQKBECQFEJBPSHSFTPVSDF      POUPMPHZIUUQECQFEJBPSHPOUPMPHZ     TFMFDU OJM Q P     EJTUJODUU    TVCKFDU ECQFEJBKQ෺ޠ     QSFEJDBUF POUPMPHZBCTUSBDU    DMJHOJUJPODPOWFSURVFSZWBM  lTFMFDUEJTUJODU 1 0XIFSF\IUUQKBECQFEJBPSHSFTPVSDF෺ޠ IUUQECQFEJBPSHPOUPMPHZBCTUSBDU 0^ ੜ੒͞ΕΔ41"32-ΫΤϦΦϒδΣΫτΛ ଋറ͢Δม਺
  17. 28.

    基本的な使い方例 The 8th Conference of Kansai Lisp Users Group 2018ー12ー15 RMRVJDLMPBEDMJHOJUJPO

     DMJHOJUJPOXJUIQSFpY WBM     ECQFEJBKQIUUQKBECQFEJBPSHSFTPVSDF      POUPMPHZIUUQECQFEJBPSHPOUPMPHZ     TFMFDU OJM Q P     EJTUJODUU    TVCKFDU ECQFEJBKQ෺ޠ     QSFEJDBUF POUPMPHZBCTUSBDU    DMJHOJUJPODPOWFSURVFSZWBM  lTFMFDUEJTUJODU 1 0XIFSF\IUUQKBECQFEJBPSHSFTPVSDF෺ޠ IUUQECQFEJBPSHPOUPMPHZBCTUSBDU 0^ লུදهͷͨΊͷ1SFpYએݴ 1SFpY໊l1SFpYͷத਎z  ʜ
  18. 29.

    基本的な使い方例 The 8th Conference of Kansai Lisp Users Group 2018ー12ー15 RMRVJDLMPBEDMJHOJUJPO

     DMJHOJUJPOXJUIQSFpY WBM     ECQFEJBKQIUUQKBECQFEJBPSHSFTPVSDF      POUPMPHZIUUQECQFEJBPSHPOUPMPHZ     TFMFDU OJM Q P     EJTUJODUU    TVCKFDU ECQFEJBKQ෺ޠ     QSFEJDBUF POUPMPHZBCTUSBDU    DMJHOJUJPODPOWFSURVFSZWBM  lTFMFDUEJTUJODU 1 0XIFSF\IUUQKBECQFEJBPSHSFTPVSDF෺ޠ IUUQECQFEJBPSHPOUPMPHZBCTUSBDU 0^ 4ࣜΫΤϦຊମ TFMFDU දࣔ͢Δର৅  EJTUJODUUPSOJM PCKFDUʜ QSFEJDBUFʜ TVCKFDUʜ
  19. 30.

    基本的な使い方例 The 8th Conference of Kansai Lisp Users Group 2018ー12ー15 RMRVJDLMPBEDMJHOJUJPO

     DMJHOJUJPOXJUIQSFpY WBM     ECQFEJBKQIUUQKBECQFEJBPSHSFTPVSDF      POUPMPHZIUUQECQFEJBPSHPOUPMPHZ     TFMFDU OJM Q P     EJTUJODUU    TVCKFDU ECQFEJBKQ෺ޠ     QSFEJDBUF POUPMPHZBCTUSBDU    DMJHOJUJPODPOWFSURVFSZWBM  lTFMFDUEJTUJODU 1 0XIFSF\IUUQKBECQFEJBPSHSFTPVSDF෺ޠ IUUQECQFEJBPSHPOUPMPHZBCTUSBDU 0^ ΫΤϦΦϒδΣΫτΛ จࣈྻʹม׵
  20. 31.

    基本的な使い方例 The 8th Conference of Kansai Lisp Users Group 2018ー12ー15 EFGVOHFUBCTUSBDU

    SFTPVSDFOBNF   DMJHOJUJPOXJUIQSFpY WBM     ECQFEJBKQIUUQKBECQFEJBPSHSFTPVSDF     POUPMPHZIUUQECQFEJBPSHPOUPMPHZ     TFMFDU OJM Q P     EJTUJODUU    TVCKFDU ECQFEJBKQSFTPVSDFOBNF     QSFEJDBUF POUPMPHZBCTUSBDU   DMJHOJUJPOSFRVFTUECQFEJB    DMJHOJUJPODPOWFSURVFSZWBM ྫ͑͹ɼݕࡧର৅ͷ໊લ͚ͩΛҾ਺ͱͯ͠༩͑Δؔ਺Ͱϥοϓ͢Ε͹ɽɽɽ
  21. 32.

    基本的な使い方例 The 8th Conference of Kansai Lisp Users Group 2018ー12ー15 $-64&3

    HFUBCTUSBDUl෺ޠz  ෺ޠʢ΋ͷ͕ͨΓʣͱ͸ɺ࿩͠ޠΔ͜ͱɻ͞·͟·ͷࣄฑʹ͍ͭͯ࿩͢͜ͱɻಛఆͷࣄ ฑͷҰ෦࢝ऴΛޠΔ͜ͱɺ͋Δ͍͸ݹ͔͘ΒޠΓ఻͑ΒΕͨ࿩Λ͢Δ͜ͱɻจֶܗࣜͷͻͱ ͭɻ࡞ऀ͕ݟͨ͜ͱ΍ฉ͍ͨ͜ͱ΍ɺ·ͨ͸૝૾Λجૅͱ͠ɺਓ෺΍ࣄ݅ʹ͍ͭͯঀड़ͨ͠ ࢄจͷจֶ࡞඼ʢڱٛʣ্هͷจֶ࡞඼ͷதͰɺಛʹฏ҆࣌୅͔Βࣨொ࣌୅·Ͱͷ΋ͷɻฏ ҆࣌୅ͷʰ஛औ෺ޠʱʰӉ௡อ෺ޠʱͳͲͷ࡞Γ෺ޠɺʰҏ੎෺ޠʱʰେ࿨෺ޠʱͳͲͷՎ ෺ޠΛܦͯɺʰݯࢯ෺ޠʱ΁ͱల։͠ɺח૔࣌୅ʹ͓͚Δٖݹ෺ޠʹࢸΔ·Ͱͷ΋ͷΛࢦ͢ɻ ਓܗড়ྤཨ΍Վ෣بͷ࣌୅෺ʹ͓͍ͯɺओ໾͕ࢥ͍ग़΍৺৘ͳͲΛޠΔ৔໘ͷ͜ͱɻ·ͨɺ ͦ͏ͨ͠ԋग़ͷ͜ͱɻˢˢˢˢˢz ྫ͑͹ɼݕࡧର৅ͷ໊લ͚ͩΛҾ਺ͱͯ͠༩͑Δؔ਺Ͱϥοϓ͢Ε͹ɽɽɽ
  22. 34.

    現状 The 8th Conference of Kansai Lisp Users Group 2018ー12ー15 ɾ1SFpY෇͖ͷ؆୯ͳ4FMFDUจ͕͔͚Δఔ౓

    ɾBOEPSݕࡧɾෳ਺ΫΤϦʹ͸ະରԠ ɾࠓޙগͣͭ͠ൃలͤͯ͞ɼߴ౓ͳҙຯॲཧٕज़ʹෆՄܽ ɹͳଘࡏͱͯ͠$PNPO-JTQΛച͍ͬͯ͘ࡐྉʹͳΔͱخ͍͠ ɹϓϩδΣΫτ ɾݱঢ়ͰͰ͖Δ͜ͱͷྫ͸ɼHJUIVCʹΞοϓ͍ͯ͠Δίʔυͷ ɹDMJHOJUJPOFYBNQMF಺ʹ͋Δ΋ͷ͘Β͍ͳͷͰɼྑ͚Ε͹ ɹ͓ࢼ͋͠Ε