mirror of
https://github.com/explosion/spaCy.git
synced 2025-07-04 03:43:09 +03:00
rename to sentimental-onix
This commit is contained in:
parent
4df12f5490
commit
fd9ede7c87
|
@ -3216,42 +3216,41 @@
|
|||
"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",
|
||||
"id": "sentimental-onix",
|
||||
"title": "Sentimental Onix",
|
||||
"slogan": "Use onnx for sentiment models",
|
||||
"description": "spacy pipeline component for sentiment analysis using onnx",
|
||||
"github": "sloev/sentimental-onix",
|
||||
"pip": "sentimental-onixh",
|
||||
"code_example": [
|
||||
"import pytest",
|
||||
"import spacy",
|
||||
"from spacy_onnx_sentiment_english import OnnxSentimentEnglish",
|
||||
"from sentimental_onix import pipeline",
|
||||
"",
|
||||
"nlp = spacy.load('en_core_web_sm')",
|
||||
"nlp.add_pipe('sentencizer')",
|
||||
"nlp.add_pipe('onnx_sentiment_en', after='sentencizer')",
|
||||
"nlp = spacy.load(\"en_core_web_sm\")",
|
||||
"nlp.add_pipe(\"sentencizer\")",
|
||||
"nlp.add_pipe(\"sentimental_onix\", after=\"sentencizer\")",
|
||||
"",
|
||||
"sentences = [",
|
||||
" (sent.text, sent._.onnx_sentiment_en)",
|
||||
" (sent.text, sent._.sentiment)",
|
||||
" 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',",
|
||||
" \"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'),",
|
||||
"]"
|
||||
" (\"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",
|
||||
"thumb": "https://raw.githubusercontent.com/sloev/sentimental-onix/master/.github/onix.webp",
|
||||
"author": "Johannes Valbjørn",
|
||||
"author_links": {
|
||||
"github": "sloev"
|
||||
|
|
Loading…
Reference in New Issue
Block a user