You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Define `TopicModel` from an ARTM model at hand or with help from `model_constructor` module, where you can set models main parameters. Then create an `Experiment`, assigning a root position to this model and path to store your experiment. Further, you can define a set of training stages by the functionality provided by the `cooking_machine.cubes` module.
84
85
85
86
Further you can read documentation [here](https://machine-intelligence-laboratory.github.io/TopicNet/).
86
87
87
88
88
-
# Installation
89
+
##Installation
89
90
90
91
**Core library functionality is based on BigARTM library**.
91
92
So BigARTM should also be installed on the machine.
92
93
Fortunately, the installation process should not be so difficult now.
93
94
Below are the detailed explanations.
94
95
95
96
96
-
## Via pip
97
+
###Via Pip
97
98
98
99
The easiest way to install everything is via `pip` (but currently works fine only for Linux users!)
99
100
@@ -102,11 +103,15 @@ pip install topicnet
102
103
```
103
104
104
105
The command also installs BigARTM library, not only TopicNet.
106
+
However, [BigARTM Command Line Utility](https://bigartm.readthedocs.io/en/stable/tutorials/bigartm_cli.html) will not be assembled.
107
+
Pip installation makes it possible to use BigARTM only through Python Interface.
105
108
106
109
If working on Windows or Mac, you should install BigARTM by yourself first, then `pip install topicnet` will work just fine.
107
110
We are hoping to bring all-in-`pip` installation support to the mentioned systems.
108
111
However, right now you may find the following guide useful.
109
112
113
+
### BigARTM for Non-Linux Users
114
+
110
115
To avoid installing BigARTM you can use [docker images](https://hub.docker.com/r/xtonev/bigartm/tags) with preinstalled different versions of BigARTM library:
111
116
112
117
```bash
@@ -117,17 +122,23 @@ docker run -t -i xtonev/bigartm:v0.10.0
117
122
Checking if all installed successfully:
118
123
119
124
```bash
120
-
python
125
+
$ python
121
126
122
127
>>> import artm
123
128
>>> artm.version()
124
129
```
125
130
126
131
Alternatively, you can follow [BigARTM installation manual](https://bigartm.readthedocs.io/en/stable/installation/index.html).
132
+
There is also a pair of tips which may provide additional help for Windows users:
133
+
134
+
1. Go to the [installation page for Windows](http://docs.bigartm.org/en/stable/installation/windows.html) and download the 7z archive in the Downloads section.
135
+
2. Use Anaconda `conda install` to download all the Python packages that BigARTM requires.
136
+
3. Path variables must be set through the GUI window of system variables, and, if the variable `PYTHONPATH` is missing — add it to the **system wide** variables. Close the GUI window.
137
+
127
138
After setting up the environment you can fork this repository or use `pip install topicnet` to install the library.
128
139
129
140
130
-
## From source
141
+
###From Source
131
142
132
143
One can also install the library from GitHub, which may give more flexibility in developing (for example, making one's own viewers or regularizers a part of the module as .py files)
133
144
@@ -137,6 +148,20 @@ cd topicnet
137
148
pip install .
138
149
```
139
150
151
+
### Google Colab & Kaggle Notebooks
152
+
153
+
As Linux installation may be done solely using `pip`, TopicNet can be used in such online services as
154
+
[Google Colab](https://colab.research.google.com) and
All you need is to run the following command in a notebook cell:
157
+
158
+
```bash
159
+
! pip install topicnet
160
+
```
161
+
162
+
There is also a [notebook in Google Colab](https://colab.research.google.com/drive/1Tr1ZO03iPufj11HtIH3JjaWWU1Wyxkzv) made by [Nikolay Gerasimenko](https://github.com/Nikolay-Gerasimenko), where BigARTM is build from source.
163
+
This may be useful, for example, if you want to use the BigARTM Command Line Utility.
164
+
140
165
141
166
# Usage
142
167
@@ -150,11 +175,11 @@ TopicNet does not perform data preprocessing itself.
150
175
Instead, it demands data being prepared by the user and loaded via [Dataset](topicnet/cooking_machine/dataset.py) class.
151
176
Here is a basic example of how one can achieve that: [rtl_wiki_preprocessing](topicnet/demos/RTL-WIKI-PREPROCESSING.ipynb).
152
177
153
-
## Training topic model
178
+
## Training a Topic Model
154
179
155
180
Here we can finally get on the main part: making your own, best of them all, manually crafted Topic Model
156
181
157
-
### Get your data
182
+
### Get Your Data
158
183
159
184
We need to load our data prepared previously with Dataset:
Browsing the model is easy: create a viewer and call its `view()` method (or `view_from_jupyter()` — it is advised to use it if working in Jupyter Notebook):
0 commit comments