Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/NeonGeckoCom/neon-utterance-plugin-wn_entailment
https://github.com/NeonGeckoCom/neon-utterance-plugin-wn_entailment
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/NeonGeckoCom/neon-utterance-plugin-wn_entailment
- Owner: NeonGeckoCom
- Created: 2021-11-26T01:59:03.000Z (about 3 years ago)
- Default Branch: dev
- Last Pushed: 2023-04-26T17:46:10.000Z (over 1 year ago)
- Last Synced: 2024-08-04T02:06:35.172Z (5 months ago)
- Language: Python
- Size: 1.95 KB
- Stars: 0
- Watchers: 2
- Forks: 2
- Open Issues: 3
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
- awesome-ovos-plugins - neon_utterance_wn_entailment_plugin - inject context (OPM plugins / Utterance Transformers)
README
```python
from neon_utterance_KeyBERT_plugin import KeyBERTExtractor
from neon_utterance_wn_entailment_plugin import WordNetEntailmentsfrom neon_utterance_KeyBERT_plugin import KeyBERTExtractor
kbert = KeyBERTExtractor() # or RAKE or YAKE or all of them!
tars = WordNetEntailments()
utts = ["The man was snoring very loudly"]
_, context = kbert.transform(utts)
# {'keybert_keywords': [('snoring', 0.829), ('man snoring loudly', 0.8174), ('man snoring', 0.668)]}_, context = tars.transform(utts, context)
print(context)
# {'entailments': ['exhale', 'inhale', 'sleep']}
```