Thanks to visit codestin.com
Credit goes to github.com

Skip to content

toposoid/toposoid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

88 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Toposoid Community Edition

Toposoid is a knowledge base construction platform. Toposoid has the following features.

  • You can build a knowledge base just by entering sentences (Currently only supports Japanese and English).
  • 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/

Outline Drawing

Knowledge Base Image

Toposoid project dependencies

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. Unit Test And Build Image Action
toposoid-easy-search-web This microservice provides a simple search API. Specifically, it supports text search and image search. Test And Build
toposoid-knowledge-register-web This microservice provides the functionality for manual registration. Unit Test And Build Image Action
toposoid-knowledge-register-subscriber This microservice provides the functionality for manual registration. Unit Test And Build Image Action
toposoid-document-analysis-subscriber This microservice provides the functionality to register from a document. Unit Test And Build Image Action
toposoid-sat-solver-web This microservice provides solver functionality for Boolean satisfiability problems (SAT) or similar problems (Max-SAT etc.). Test And Build
toposoid-sentence-parser-japanese-web This Microservice analyzes the predicate argument structure of Japanese sentences and outputs the result in JSON. Test And Build
toposoid-common-nlp-japanese-web This Microservice provides an NLP function that handles Japanese and outputs the result in JSON. Test And Build
toposoid-sentence-parser-english-web This Microservice analyzes dependency's structure of English sentences and outputs the result in JSON. Test And Build
toposoid-common-nlp-english-web This Microservice provides an NLP function that handles English and outputs the result in JSON. Test And Build
toposoid-deduction-admin-web This microservice provides the ability to manage multiple deductive inference logic to register, update microservices. Unit Test And Build Image Action
toposoid-deduction-unit-exact-match-web This microservice provides the ability to determine if the text you enter matches the knowledge graph exactly.   Unit Test And Build Image Action
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. Unit Test And Build Image Action
toposoid-deduction-unit-sentence-vector-match-web This microservice provides the ability to identify the input text as a distributed representation using the Bert model and match it against the knowledge graph. Test And Build
toposoid-deduction-unit-image-vector-match-web This microservice makes inferences by matching images to a knowledge database. Test And Build
toposoid-deduction-unit-whole-sentence-image-match-web This microservice performs inference by comparing images with a knowledge database, and handles cases where images are linked to entire sentences. Test And Build
data-accessor-weaviate-web This microservice is a CUID wrapper for Weaviate. Test And Build
data-accessor-redis-web This microservice is a CUID wrapper for redis. Test And Build
data-accessor-mysql-web This microservice is a CUID wrapper for MySql. Test And Build
data-accessor-neo4j-web This Microservice get information from Neo4j graph database. outputs the result in JSON. Unit Test And Build Image Action
toposoid-contents-admin-web This microservice is responsible for managing content. Specifically, this includes image management. outputs the result in JSON. Test And Build
toposoid-common-image-recognition-web This microservice is responsible for vectorizing data for image recognition. outputs the result in JSON. Test And Build
toposoid-feature-vectorizer The main implementation of this module is text-to-vector representation conversion and search. Unit Test
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. Unit Test Action
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. Unit Test
toposoid-knowledgebase-model This library defines a basic model commonly used in toposoid projects. Header Check Action
toposoid-deduction-protocol-model This library defines a basic model commonly used in toposoid projects. Especially these are used in deductive logic. Header Check Action
toposoid-common This is a common library used by toposoid developer in toposoid projects. Unit Test
toposoid-test-utils This is a common library used by Linked Ideal LLC. in Scala projects. The main implementation of this project is Registering and deleting test data. Unit Test
scala-data-accessor-neo4j The main implementation of this project is the Neo4j driver Wrapper. Unit Test Action
scala-common This is a common library used by Linked Ideal LLC. in Scala projects. Header Check Action

Requirements

  • Docker version 24.0.x, or later
  • docker-compose version 1.25.x

Recommended environment For Standalone

  • Required: at least 32GB of RAM
  • Required: at least 100G of HDD(Total required Docker Image size)
  • Please understand that since we are dealing with large models such as LLM, the Dockerfile size is large and the required machine SPEC is high.

Setup For Standalone

Toposoid uses the PDF Extract API provided by Adobe for document registration.The PDF Extract API can be used free of charge under the following conditions:https://developer.adobe.com/document-services/docs/overview/limits/#free-tier In order to use The PDF Extract API, you need to create credentials. https://developer.adobe.com/document-services/apis/pdf-services/ After creating the credentials, please set the following environment variables in docker-compose.yml. TOPOSOID_PDF_SERVICES_CLIENT_ID TOPOSOID_PDF_SERVICES_CLIENT_SECRET

docker-compose up
  • It takes more than 30 minutes to pull the Docker image for the first time.

Usage

  • Try accessing http://localhost:4444 in your browser.
  • The UI has been confirmed to work only on Chrome browser.

Knowledge data registration. You can register both text and images.

Knowledge data registration. You can also register via documents.

Easy search. You can search both text and images.

Try accessing http://localhost:7474 in your browser. You will be able to see the data you registered from the API. as follows

Deduction's Example

  • During inference, it is possible to select units accordingly. Please set from the screen below.

An example of a logic puzzle called a liar game

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.

regulation

  • (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

hypothesis

  • A → NOT C
  • B → A
  • C → NOT B
Step Premise & Claim LogicTree
4
5
6

result

  • Press the Analyze button to start logical inference.

Note

  • 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 uses the PDF Extract API provided by Adobe for document registration.The PDF Extract API can be used free of charge under the following conditions:https://developer.adobe.com/document-services/docs/overview/limits/#free-tier
  • In order to use The PDF Extract API, you need to create credentials. https://developer.adobe.com/document-services/apis/pdf-services/ After creating the credentials, please set the following environment variables in docker-compose.yml. TOPOSOID_PDF_SERVICES_CLIENT_ID TOPOSOID_PDF_SERVICES_CLIENT_SECRET
  • 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.

License

This program is offered under a commercial and under the AGPL license. For commercial licensing, contact us at https://toposoid.com/contact. For AGPL licensing, see below.

AGPL licensing: This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see https://www.gnu.org/licenses/.

Author

Thank you!

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors