Skip to content

Commit

Permalink
v0.1.1
Browse files Browse the repository at this point in the history
* Fixed requirements
* Update docs
* Update readme
  • Loading branch information
MaartenGr committed Sep 24, 2020
1 parent 8377794 commit 06b8cf9
Show file tree
Hide file tree
Showing 9 changed files with 50 additions and 70 deletions.
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![PyPI - Status](https://img.shields.io/badge/status-beta-yellow.svg)](https://pypi.org/project/vlac/)
[![PyPI - Python](https://img.shields.io/badge/python-3.6-blue.svg)](https://pypi.org/project/bertopic/)
[![PyPI - License](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/MaartenGr/VLAC/blob/master/LICENSE)
[![PyPI - PyPi](https://img.shields.io/badge/pypi-v0.1.0-EF6C00.svg)](https://pypi.org/project/bertopic/)
[![PyPI - PyPi](https://img.shields.io/badge/pypi-v0.1.1-EF6C00.svg)](https://pypi.org/project/bertopic/)

BERTopic is a topic modeling technique that leverages BERT embeddings and c-TF-IDF to create dense clusters
allowing for easily interpretable topics whilst keeping important words in the topic descriptions.
Expand Down Expand Up @@ -42,11 +42,19 @@ and 🤗 transformers embeddings. The results is **BERTopic**, an algorithm for

<a name="installation"/></a>
### 2.1. Installation
**[PyTorch 1.2.0](https://pytorch.org/get-started/locally/)** or higher is recommended. If the install below gives an
error, please install pytorch first [here](https://pytorch.org/get-started/locally/).

Installation can be done using [pypi](https://pypi.org/project/bertopic/)
Installation can be done using [pypi](https://pypi.org/project/bertopic/):

``pip install bertopic``

**PyTorch**
If you get

If you want to use a GPU / CUDA, you must install PyTorch with the matching CUDA Version. Follow
[PyTorch - Get Started](https://pytorch.org/get-started/locally/) for further details how to install PyTorch.

<a name="usage"/></a>
### 2.2. Usage

Expand Down
1 change: 1 addition & 0 deletions docs/BERTopic.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
../README.md
20 changes: 0 additions & 20 deletions docs/Makefile

This file was deleted.

5 changes: 5 additions & 0 deletions docs/api.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
BERTopic API Guide
=================

.. automodule:: bertopic.BERTopic
:members:
30 changes: 24 additions & 6 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
import sphinx_rtd_theme
from recommonmark.parser import CommonMarkParser

import os
import sys
sys.path.insert(0, os.path.abspath('..'))

# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
Expand All @@ -22,34 +29,45 @@
author = 'Maarten Grootendorst'

# The full version, including alpha/beta/rc tags
release = '0.0.1'
release = 'v0.1.1'


# -- General configuration ---------------------------------------------------

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
]
extensions = ['recommonmark', 'sphinx_rtd_theme', 'sphinx.ext.autodoc', 'sphinx.ext.napoleon']

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
exclude_patterns = []


# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'alabaster'
#html_theme = 'alabaster'


html_theme = "sphinx_rtd_theme"
#html_theme_path = ["_themes", ]

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
html_static_path = ['_static']

master_doc = 'index'

# source_parsers = {
# '.md': CommonMarkParser,
# }

#source_suffix = ['.rst', '.md']
13 changes: 9 additions & 4 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
.. BERTopic documentation master file, created by
sphinx-quickstart on Thu Sep 24 13:44:26 2020.
sphinx-quickstart on Mon Mar 23 19:00:08 2020.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to BERTopic's documentation!
====================================
Welcome to Top2Vec's documentation!
===================================

.. toctree::
:maxdepth: 2
:caption: Contents:
:caption: User Guide / Tutorial:

BERTopic

.. toctree::
:caption: API Reference:

api

Indices and tables
==================
Expand Down
35 changes: 0 additions & 35 deletions docs/make.bat

This file was deleted.

2 changes: 0 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
-f https://download.pytorch.org/whl/torch_stable.html
torch==1.6.0
tqdm==4.49.0
numpy==1.19.2
umap-learn==0.4.6
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
setuptools.setup(
name="bertopic",
packages=["bertopic"],
version="0.1.0",
version="0.1.1",
author="Maarten Grootendorst",
author_email="[email protected]",
description="BERTopic performs topic Modeling with state-of-the-art transformer models.",
Expand Down

0 comments on commit 06b8cf9

Please sign in to comment.