Skip to main content

Multi-label Text Classification Toolkit

Project description

# Caver: a toolkit for multilabel text classification.

Rising a torch in the cave to see the words on the wall. This is the `Caver`.

## Tutorial

[Documents](https://guokr.github.io/Caver)

### Train model

```python
from caver import Trainer
t = Trainer(
'CNN',
'data_path',
...... # kwargs will update the default value in config
)
t.train()
```

### Classify

```python
from caver import Caver
cnn = Caver('CNN', 'CNN_model.pth', 'data_path')

# predict
cnn.predict('Across the Great Wall, we can reach every corner in the world')

# get top label
cnn.get_top_label('The quick brown fox jumps over the lazy dog')

# ensemble
from caver import Ensemble
swen = Caver('SWEN', 'SWEN_model.pth', 'data_path')
model = Ensemble([cnn, swen])

model.predict('The quick brown fox jumps over the lazy dog', 'log')
model.get_top_label('The quick brown fox jumps over the lazy dog', 'avg')
```


## TODO

* [x] BaseModule
* [x] Data
* [x] classify
* [x] ensemble: voting
* [x] config
* [x] model save and load
* [x] models: CNN, LSTM, SWEN, HAN
* [x] dropout
* [ ] fastText support
* [ ] docker

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

caver-0.0.4.tar.gz (11.0 kB view hashes)

Uploaded Source

Built Distribution

caver-0.0.4-py3.6.egg (37.5 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page