Skip to content

Software implementation of semantic network storage and processing

License

Notifications You must be signed in to change notification settings

MksmOrlov/sc-machine

Repository files navigation

codecov

Documentation: GitHub Pages

Clone:

git clone https://github.com/ostis-ai/sc-machine.git
cd sc-machine
git submodule update --init --recursive

Install dependencies

Debian-based (Ubuntu, Debian, Mint)

cd scripts
./install_deps_ubuntu.sh
cd ..
pip3 install wheel setuptools
pip3 install -r requirements.txt

macOS

cd scripts
./install_deps_macOS.sh
cd ..
pip3 install wheel setuptools
pip3 install -r requirements.txt

Please note: you should add Qt5 and LLVM to PATH variable. To do this, after installing dependencies execute the following commands (considering you use zsh as your shell):

echo 'export PATH="'$HOMEBREW_PREFIX'/opt/qt@5/bin:$PATH"' >> ~/.zshrc
echo 'export PATH="'$HOMEBREW_PREFIX'/opt/llvm/bin:$PATH"' >> ~/.zshrc

Build sc-machine

cd sc-machine/scripts
./make_all.sh #You can also pass all CMake generation arguments there

or, alternatively (requires CMake 3.13+)

cd sc-machine
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build -j$(nproc) #-j flag for paralleled build process

Additional CMake flags can be used to build tests, format code or analyze memory leaks, check our build docs for more info.

Build knowledge base

This repo provides build_kb.py script to prepare and build knowledge base (KB). Note that you will need to run a server with a path to a compiled KB in the next step.

Usage example

cd sc-machine
python3 scripts/build_kb.py ../ims.ostis.kb -c config/sc-machine.ini

Default config file saves compiled KB one level above sc-machine, sc-machine/..

Alternatively, you can use build_kb.py without a config file to define output path and other settings manually:

cd sc-machine
build_kb.py [-o OUTPUT_PATH] [-l ERRORS_FILE_PATH] [-f REPO_FILE_NAME] repo_folder

To get more information, use python3 scripts/build_kb.py -h

Note: flags have higher priority than config file.

repo.path example

# Comments should start with hashtag as a first character in the line
# Here you can specify path to one or several kb folders
# Paths can be relative
../ims.ostis.kb
#../custom_kb

Servers

sc-machine provides two network protocols to interact with:

  1. sc-server: use python3 scripts/run_sc_sever.py -c config/sc-machine.ini to run sc-server with the default config file. To get more information, use python3 scripts/run_sc_server.py -h
  2. sctp server: use python3 scripts/run_sctp.py -c config/sc-machine.ini to run sctp server. To get more information, use python3 scripts/run_sctp.py -h

Config

This repository provides a default configuration for sc-machine. To customize sc-machine usage you can create your own config file. You can check docs at docs/other/config.md

This repository continues the development of this sc-machine from version 0.6.0.

About

Software implementation of semantic network storage and processing

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 63.4%
  • C 31.8%
  • CMake 2.2%
  • Python 1.3%
  • Shell 0.7%
  • ANTLR 0.5%
  • Dockerfile 0.1%