mirror of
https://github.com/explosion/spaCy.git
synced 2025-07-13 01:32:32 +03:00
add spacy_onnx_sentiment_english to universe
This commit is contained in:
parent
96b61d0671
commit
4df12f5490
|
@ -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",
|
||||
|
|
Loading…
Reference in New Issue
Block a user