Git Product home page Git Product logo

topic-analysis's Introduction

SingnetLogo

Topic Analysis Services

This repository contains various topic analysis services for SingularityNET. The topic analysis methods would include:

  • Latent semantic analysis (LSA)
  • Probabilistic latent semantic analysis (PLSA)
  • Latent Diritchlet allocation (LDA)
  • LDA2vec

The services are wrapped using gRPC.

The user provides a collection of documents for topic analysis and the service would return discoverd topics. Each topic consists of a collection of words that represent a given topic.

All services have been tested to work with python3.6.

User Guide

Please look at the user guide for a detailed spec of the services and how to use the services.

Running the service locally

Install preprequisites

pip install -r requirements.txt

Setup

Run the following commands to generate gRPC classes for Python

python3.6 -m grpc_tools.protoc -I. --python_out=.  --grpc_python_out=. service_spec/topic_analysis.proto

Running unit tests

python3.6 test_topic_analysis_grpc.py

Usage

To start the gRPC server locally

python3.6 topic_analysis_grpc.py

Topic analysis would most likely involve running a dimensionality reduction alogrithm which would take a considerable lenght of time to complete. For this reason, running the service above would return a handle which you will need to use to query a restapi endpoint at a later time. See the user guide for details. You can start that endpoint with the command

python3.6 analysis_results.py

You can also use a suitable application server for python flask. A sample config file using gunicorn is config.py.

Then, you can execute the below command to serve analysis_results.py, by executing gnunicorn in a folder containing config.py, while the configuration file confi.py has a path pointing to analysis_results.py.

gunicorn -c config.py analysis_results:app

Resources

LSA:

PLSA:

LDA:

LDA2vec:

Contributors

Authors

  • Eyob Yirdaw

Maintainers

  • Eyob Yirdaw

topic-analysis's People

Contributors

edyirdaw avatar vinthedark avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.