I tried using the 'logical constitution' that describes the Constitution of Japan in a logical programming language and displays it in an easy-to-understand manner using a Q & A method.



I tried using the web application ' Logical Constitution ' that describes the text of the

Constitution of Japan, which is the highest law of Japan , using logic programming and displays the contents of the Constitution of Japan in an easy-to-understand manner using a Q & A method.

Logical constitution
http://bitlaw-jp.github.io/logicon-system/index.html

The top screen of the 'Logical Constitution' looks like this. A selection box for setting the question content is placed in the center of the screen, and the set question content is displayed below it. By default, the question 'What is the Emperor?' Was displayed, so I decided to just click 'Ask a question' to see the answer.



The display of the answer looks like this. The results of the 'Logical Constitution' program are displayed on the left side, and the answers 'The emperor is a symbol of Japan (Article 1)' and 'The emperor is a symbol of Japanese national integration (Article 1)' are displayed on the right side. Is displayed. In this way, the 'Logical Constitution' makes it possible to display the contents of the Constitution of Japan in a concise and easy-to-understand manner. I'm curious about how it works, so click 'Check Source Code' to display

the source code of the 'Logical Constitution' .



If you check the source code, you can see that the text of the Constitution of Japan is written in

Prolog , which is one of the logic programming languages. In the 'Logical Constitution', the text of the Constitution of Japan is written in Prolog, and the Prolog question command '-?' User-selected predicate '(' User-selected subject ', X, N).' Is operated. By doing so, it seems that the Constitution of Japan is displayed in a Q & A format.



Also, at the bottom of the answer, there is a button that says 'Confirm the original text of the Constitution of Japan', and it is designed so that you can check the original text on

the page of the Constitution of Japan in the e-Gov Law Search , but the URL of e-Gov will be renewed in 2020. At the time of writing the article, the error page will be displayed even if you click 'Check the original text of the Constitution of Japan'. This time, I would like to check the contents of the Constitution of Japan, so click the round button at the bottom of the screen to return to the question screen.



On the question screen, you can select the predicate to use for the question by clicking the selection box on the left. This time, I selected 'do'.



You can select the subject in the selection box on the right, so select 'Cabinet'.



Now that the question 'What does the Cabinet do?' Is complete, click 'Ask a question' to display the answer.



The answer is like this. It was possible to display the contents divided into multiple articles as 'what the Cabinet does' at once.



The 'Logical Constitution' was developed as part of the ' bitlaw ' project, which aims to enable discussion of legal texts without using legal thinking by rewriting the legal texts into a form that can be processed by computers. In addition, all the source code related to bitlaw is published on GitHub , and anyone can modify and propose it.

in Review,   Web Application, Posted by log1o_hf