Toposoid is a knowledge base construction platform. Toposoid has the following features.
- You can build a knowledge base just by entering sentences (currently only Japanese is supported).
- If you enter the text as it is, you can search the knowledge base and obtain inference results.
- This inferring program is designed so that developers can freely extend and replace it in their favorite programming language.
In this repository, it is published as Toposoid Community Edition. For more information -> https://toposoid.com/
ProjectName | Function | Status |
---|---|---|
toposoid | Root project for all Toposoid projects | |
toposoid-component-dispatcher-web | This microservice integrates two major microservices. One is a microservice that analyzes the predicate argument structure of sentences, and the other is a microservice that makes logical inferences. | |
toposoid-knowledge-register-web | This Microservice registers the results of predicate argument structure analysis of Japanese natural sentences in a graph database. | |
toposoid-sat-solver-web | This microservice provides solver functionality for Boolean satisfiability problems (SAT) or similar problems (Max-SAT etc.). | |
toposoid-sentence-parser-japanese-web | This Microservice analyzes the predicate argument structure of Japanese sentences and outputs the result in JSON. | |
toposoid-common-nlp-japanese-web | This Microservice provides an NLP function that handles Japanese and outputs the result in JSON. | |
toposoid-sentence-parser-english-web | This Microservice analyzes dependency's structure of English sentences and outputs the result in JSON. | |
toposoid-common-nlp-english-web | This Microservice provides an NLP function that handles English and outputs the result in JSON. | |
toposoid-deduction-admin-web | This microservice provides the ability to manage multiple deductive inference logic to register, update microservices. | |
toposoid-deduction-unit-exact-match-web | This microservice provides the ability to determine if the text you enter matches the knowledge graph exactly. | |
toposoid-deduction-unit-synonym-match-web | This microservice provides the ability to determine if the text you enter matches, provided that the knowledge graph and synonyms are equated. | |
toposoid-deduction-common | This is a common library used by toposoid developer in toposoid projects. In particular, this module is used by units that perform deductive reasoning in toposoid projects. | |
toposoid-sentence-parser-japanese | This component performs predicate argument structure analysis when a Japanese sentence is given as input. Then, it outputs the information necessary for converting to a knowledge graph. | |
toposoid-knowledgebase-model | This library defines a basic model commonly used in toposoid projects. | |
toposoid-deduction-protocol-model | This library defines a basic model commonly used in toposoid projects. Especially these are used in deductive logic. | |
toposoid-common | This is a common library used by toposoid developer in toposoid projects. | |
scala-data-accessor-neo4j-web | This Microservice get information from Neo4J graph database. outputs the result in JSON. | |
scala-data-accessor-neo4j | The main implementation of this project is the neo4j driver Wrapper. | |
scala-common | This is a common library used by Linked Ideal LLC. in Scala projects. |
- Docker version 20.10.x, or later
- docker-compose version 1.22.x
- Required: at least 8GB of RAM (The maximum heap memory size of the JVM is set to 6G (Application: 4G, Neo4J: 2G))
- Required: 65G or higher of HDD
docker-compose up -d
It takes more than 20 minutes to pull the Docker image for the first time.
# Regist knowledge
# Japanese
curl -X POST -H "Content-Type: application/json" -d '{"knowledgeList":[{"sentence":"案ずるより産むが易し。", "lang": "ja_JP", "extentInfoJson":"{}", "isNegativeSentence":false}]}' http://localhost:4444/regist/regist
# English
curl -X POST -H "Content-Type: application/json" -d '{"knowledgeList":[{"sentence":"Our life is our art.", "lang": "en_US", "extentInfoJson":"{}", "isNegativeSentence":false}]}' http://localhost:4444/regist/regist
Try accessing http://localhost:7474 in your browser. You will be able to see the data you registered from the API. as follows
# Deduction
# Japanese
curl -X POST -H "Content-Type: application/json" -d '{"premise":[],"claim":[{"sentence":"案ずるより産むが易し。", "lang": "ja_JP", "extentInfoJson":"{}", "isNegativeSentence":false}]}' http://localhost:4444/deduction/analyze
# English
curl -X POST -H "Content-Type: application/json" -d '{"premise":[],"claim":[{"sentence":"Our life is our art.", "lang": "en_US", "extentInfoJson":"{}", "isNegativeSentence":false}]}' http://localhost:4444/deduction/analyze
- Demo Web Application https://toposoid-service.com/
There are three people, A, B, and C, two honest people and the other one is a liar. And all three know who is honest and who is a liar. Here, an honest person is a person who always says the truth, and a liar is a person who always says the opposite of the truth. At this time, the following testimonies of A, B, and C were obtained.
- A's testimony: C is a liar.
- B's testimony: A is honest.
- C's testimony: B is a liar. Based on these testimonies, follow these steps to determine who is a liar.
This problem can be defined by one regulation and three hypothesis.
- (A AND B AND NOT C) OR (A AND NOT B AND C) OR (NOT A AND B AND C)
Step | Premise & Claim | LogicTree |
---|---|---|
1 | ||
2 | ||
3 |
- A → NOT C
- B → A
- C → NOT B
Step | Premise & Claim | LogicTree |
---|---|---|
4 | ||
5 | ||
6 |
Press the Analyze button to start logical inference.
- If you want to run in a remote environment or a virtual environment, change PRIVATE_IP_ADDRESS in docker-compose.yml according to your environment.
- The memory allocated to Neo4J can be adjusted with NEO4J_dbms_memory_heap_max__size in docker-compose.yml.
- Services provided by Toposoid are accessible on port 4444
Toposoid Community Edition is an open source product licensed under Apache-2.0 License. But, the license of Neo4J used by Toposoid Community Edition as a graph database is GPLv3. Please be careful. If you use Neo4j Enterprise Edition, this limitation is removed. Currently, we are working on making the licensed Topsoid Enterprise Edition including the above available soon.
- Makoto Kubodera(Linked Ideal LLC.)
Thank you!