Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/NeonGeckoCom/neon_utterance_zeroshot_clf_plugin
https://github.com/NeonGeckoCom/neon_utterance_zeroshot_clf_plugin
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/NeonGeckoCom/neon_utterance_zeroshot_clf_plugin
- Owner: NeonGeckoCom
- Created: 2021-11-23T10:55:25.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2022-02-15T02:12:17.000Z (almost 3 years ago)
- Last Synced: 2024-02-15T15:33:14.514Z (10 months ago)
- Language: Python
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
- awesome-ovos-plugins - neon_utterance_zeroshot_clf_plugin - inject context (OPM plugins / Utterance Transformers)
README
```python
tars = TarsZeroShotClassifier()# NOTE: this usually comes from config and is not set like this
tars.classifiers = {"sentiment": ["happy", "sad"]}utts = ["I am so glad you liked it!",
"I get really sad when nobody reviews my PRs"]_, context = tars.transform(utts)
# context is a dict of clf_name: [prediction(utt) for utt in utterances]
print(context)
# {'zeroshot_classifier':
# {'sentiment': [[('happy', 0.8667009472846985)], [('sad', 0.9921779036521912)]]}}
```