- Download ontology from Github
- Read and convert ontology into CLOS object
- Build web-server with ontology
- Install Homebrew
~ $ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
- Install roswell via Homebrew (or Linuxbrew)
# (For Linux: You have to install linuxbrew at first. See [Linuxbrew installation](https://github.com/Linuxbrew))
# Install roswell via home(linux)brew
~ $ brew install roswell
# Ensure path to Photon binary in the Roswell Directory
~ $ echo "export PATH='$(HOME)/.roswell/bin':$PATH" >> ~/.profile
- Install Photon from Github via Roswell
# Install photon via roswell
~ $ ros install dbym4820/photon
# install via github
~ $ git clone https://github.com/dbym4820/photon.git
- Initialize Photon
~ $ photon init
Please go to this page.
- Download ontology from github
CL-USER> (photon:install "dbym4820/ontologies/japanese-conversation/ontology3")
- Environment Initializer (Making .photon directory at home directory)
CL-USER> (photon:init)
- Converting Ontology
# ファイルパスの指定がなければ,デフォルトファイルを参照
CL-USER> (photon:convert-ontology "/path/to/xml")
("whole-root" ....)
- Show all concepts in converted ontology
CL-USER> (photon:show-concepts)
("whole-root" ....)
- Show all concepts in converted ontology without instance concepts
CL-USER> (photon:show-all-class-concept)
("whole-root" ....)
- Show all instanced concepts in converted ontology
CL-USER> (photon:show-all-instance)
("some instance" ....)
- Get CLOS object of a concept from concept label
CL-USER> (photon:find-concept "concept-label")
#<PHOTON.ONTOLOGY::BASIC-CONCEPT #x302001FB00FD>
- 概念クラスの属性を調べる(部分概念や属性概念,それらの個数制約や概念名など)
CL-USER> (photon:concept-name (photon:parent-concept (photon:find-concept "concept-label")))
#<PHOTON.ONTOLOGY::BASIC-CONCEPT #x302001FB015D>
- PhotonのWebサーバーのルーティングを書く
CL-USER> (photon:defphoton-route "/:arg" (params) (format nil "~A" (cdr (assoc 'arg :test #'string=))))
- PhotonのWebサーバーを立ち上げる・落とす
CL-USER> (photon:launch-gui :start-server 5000)
Hunchentoot server is started.
Listening on localhost:5000.
CL-USER> (photon:launch-gui :stop-server)
Copyright (c) 2018 Tomoki ABURATANI (aburatanitomoki@gmail.com)
Licensed under the MIT License.