Skip to content
Snippets Groups Projects
Select Git revision
  • 8424b51f367463d758993ade740ee53fe124fb4e
  • master default protected
  • development
  • v.1.1.0
  • v.1.0.0
5 results

nlp_cpp

  • Clone with SSH
  • Clone with HTTPS
  • Mateusz Gniewkowski's avatar
    Mateusz Gniewkowski authored and MGniew committed
    Update .gitlab-ci.yml
    
    Update .gitlab-ci.yml
    
    Update .gitlab-ci.yml
    
    Update .gitlab-ci.yml
    
    Update .gitlab-ci.yml
    
    Update .gitlab-ci.yml
    
    Update .gitlab-ci.yml
    
    Update .gitlab-ci.yml
    
    Update .gitlab-ci.yml
    
    Update .gitlab-ci.yml
    
    Update .gitlab-ci.yml
    
    Update .gitlab-ci.yml
    
    Update CMakeLists.txt
    
    Update CMakeLists.txt
    
    Update .gitlab-ci.yml
    
    Update .gitlab-ci.yml
    
    Update CI
    
    Update CI
    
    Update
    
    Update CI
    
    Update CI
    
    Update CI
    
    Update CI
    
    Update CI
    
    Update CI
    
    Update CI
    
    Update CI
    8424b51f
    History
    ##INSTALLATION
    
    Dependencies:
     - AMQP-CPP 2.8.0 !!!
     (https://github.com/CopernicaMarketingSoftware/AMQP-CPP/releases/tag/v2.8.0)
    
    - Boost 1.58
     - ICU 52.0
    
    Installation:
    mkdir build && \
    cd build && \
    cmake .. && \
    make -j && \
    sudo make install
    
    ##USAGE
    
    To create service you have to include header:
    
    >    #include "nlpworker.h"
    
    and implement class:
    
    >    class your_Worker: public NLPWorker
    >    {
    >    public:
    >        void process(string task_path, boost::property_tree::ptree &config, string output_path);
    >        void static_init(boost::property_tree::ptree config);
    >        void init(boost::property_tree::ptree config);
    >    };
    
    add this main function to your file:
    
    >    int main(int argc, char* argv[])
    >    { 
    >        run_workers<your_Worker>(argc,argv);
    >    }
    
    Now you can compile your code with linked -wsnlp library.
    To run worker you need to place config .ini file. Below there is a template, fill it properly and if needed add your own section.
    
    >    [service]
    >    tool = name_of_your_worker
    >
    >    root = /samba/requests/
    >    rabbit_host = 
    >    rabbit_user = 
    >    rabbit_password = 
    >
    >    [tool]
    >    workers_number = number_of_workers