From 4df12f5490d98bc12c1ced12090c192d69993110 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?sloev=20/=20Johannes=20Valbj=C3=B8rn?= Date: Wed, 15 Mar 2023 00:31:52 +0100 Subject: [PATCH] add spacy_onnx_sentiment_english to universe --- website/meta/universe.json | 44 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/website/meta/universe.json b/website/meta/universe.json index 16e3bc361..c4d0c1c1b 100644 --- a/website/meta/universe.json +++ b/website/meta/universe.json @@ -3215,6 +3215,50 @@ "category": ["pipeline"], "tags": ["syllables", "multilingual"] }, + { + "id": "spacy_onnx_sentiment_english", + "title": "Spacy Onnx Sentiment English", + "slogan": "English sentiment pipeline component", + "description": "English sentiment pipeline component using Onnx sentiment model", + "github": "https://github.com/sloev/spacy_onnx_sentiment_english", + "pip": "spacy_onnx_sentiment_english", + "code_example": [ + "import pytest", + "import spacy", + "from spacy_onnx_sentiment_english import OnnxSentimentEnglish", + "", + "nlp = spacy.load('en_core_web_sm')", + "nlp.add_pipe('sentencizer')", + "nlp.add_pipe('onnx_sentiment_en', after='sentencizer')", + "", + "sentences = [", + " (sent.text, sent._.onnx_sentiment_en)", + " for doc in nlp.pipe(", + " [", + " 'i hate pasta on tuesdays',", + " 'i like movies on wednesdays',", + " 'i find your argument ridiculous',", + " 'soda with straws are my favorite',", + " ]", + " )", + " for sent in doc.sents", + "]", + "", + "assert sentences == [", + " ('i hate pasta on tuesdays', 'Negative'),", + " ('i like movies on wednesdays', 'Positive'),", + " ('i find your argument ridiculous', 'Negative'),", + " ('soda with straws are my favorite', 'Positive'),", + "]" + ], + "thumb": "https://raw.githubusercontent.com/sloev/spacy_onnx_sentiment_english/master/.github/onix.webp", + "author": "Johannes Valbjørn", + "author_links": { + "github": "sloev" + }, + "category": ["pipeline"], + "tags": ["sentiment", "english"] + }, { "id": "gobbli", "title": "gobbli",