... | ... | @@ -116,13 +116,13 @@ bert_tagger.train(data_sample, pos_label="OFFENSIVE", bert_model = "bert-base-un |
|
|
|
|
|
#### Tag text: output only the most probable class
|
|
|
|
|
|
```
|
|
|
```python
|
|
|
prediction = bert_tagger.tag_text("I hope you die!", highest_only=True)
|
|
|
```
|
|
|
|
|
|
#### Output
|
|
|
|
|
|
```
|
|
|
```python
|
|
|
{"prediction": "OFFENSIVE", "probability": 0.75200404}
|
|
|
```
|
|
|
|
... | ... | |