Code Monkey home page Code Monkey logo

sptm's Introduction

sptm: Sentence Topic Prediction using Topic Modeling

sptm logo

license

Quick rundown

sptm is a high-level API, written in Python and capable of training Topic Models using Gensim and MALLET. It was developed as a summer internship project under the guidance of @Anupam Mediratta. The package was wriiten with a focus on enabling fast experimentation. Being able to go from idea to result with the least possible delay is key to doing good research.

Use sptm if you need a library that:

  • Allows for easy and fast topic model training
  • Draw Inter-topic Distance Maps
  • Construct Conditional Probability Matrix for topics
  • Predict topic of sentences

Read the documentation at [sptm_source]/docs/_build/html/index.html.

sptm is compatible (tested) with: Python 3.7.


Some good stuff about sptm

  • User friendliness. The source code is very simple to follow

  • Modularity. You can use your own models, training algorithms etc. as long as it is supported by gensim


Getting started: 30 seconds to sptm

In the test folder of the repository, you will find a single script with almost all classes and functions used.


Installation

  • Important

sptm makes use of MALLET whose installtion steps can be found here.

This is required only if you want to train the topic model using gensim's LDAMallet wrapper that is the default training algorithm used in sptm.

Then, you can install sptm itself. There are two ways to install sptm:

  • Install sptm from PyPI (recommended):
sudo pip3 install sptm

If you are using a virtualenv, you may want to avoid using sudo:

pip3 install sptm
  • Alternatively: install sptm from the GitHub source:

First, clone sptm using git:

git clone https://github.com/Rochan-A/sptm.git

Then, cd to the sptm folder and run the install command:

cd sptm
sudo python3 setup.py install
  • NOTE: You will need to specifically download spacy's en_core_web_sm model.

This step needs to be done irrespective the method of installation.

You can do that by running:

python3 -m spacy download en_core_web_sm

Support

You can post bug reports and feature requests in GitHub issues. Make sure to read the guidelines first.


Why name it sptm?

sptm stands for - Sentence topic Prediction using Topic Modeling

Why is this readme oddly familiar?

This README is a heavily edited version of keras's


sptm's People

Contributors

rochan-a avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

sptm's Issues

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.