mirror of
https://github.com/explosion/spaCy.git
synced 2025-07-05 04:13:05 +03:00
rename to sentimental-onix
This commit is contained in:
parent
4df12f5490
commit
fd9ede7c87
|
@ -3216,42 +3216,41 @@
|
||||||
"tags": ["syllables", "multilingual"]
|
"tags": ["syllables", "multilingual"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "spacy_onnx_sentiment_english",
|
"id": "sentimental-onix",
|
||||||
"title": "Spacy Onnx Sentiment English",
|
"title": "Sentimental Onix",
|
||||||
"slogan": "English sentiment pipeline component",
|
"slogan": "Use onnx for sentiment models",
|
||||||
"description": "English sentiment pipeline component using Onnx sentiment model",
|
"description": "spacy pipeline component for sentiment analysis using onnx",
|
||||||
"github": "https://github.com/sloev/spacy_onnx_sentiment_english",
|
"github": "sloev/sentimental-onix",
|
||||||
"pip": "spacy_onnx_sentiment_english",
|
"pip": "sentimental-onixh",
|
||||||
"code_example": [
|
"code_example": [
|
||||||
"import pytest",
|
|
||||||
"import spacy",
|
"import spacy",
|
||||||
"from spacy_onnx_sentiment_english import OnnxSentimentEnglish",
|
"from sentimental_onix import pipeline",
|
||||||
"",
|
"",
|
||||||
"nlp = spacy.load('en_core_web_sm')",
|
"nlp = spacy.load(\"en_core_web_sm\")",
|
||||||
"nlp.add_pipe('sentencizer')",
|
"nlp.add_pipe(\"sentencizer\")",
|
||||||
"nlp.add_pipe('onnx_sentiment_en', after='sentencizer')",
|
"nlp.add_pipe(\"sentimental_onix\", after=\"sentencizer\")",
|
||||||
"",
|
"",
|
||||||
"sentences = [",
|
"sentences = [",
|
||||||
" (sent.text, sent._.onnx_sentiment_en)",
|
" (sent.text, sent._.sentiment)",
|
||||||
" for doc in nlp.pipe(",
|
" for doc in nlp.pipe(",
|
||||||
" [",
|
" [",
|
||||||
" 'i hate pasta on tuesdays',",
|
" \"i hate pasta on tuesdays\",",
|
||||||
" 'i like movies on wednesdays',",
|
" \"i like movies on wednesdays\",",
|
||||||
" 'i find your argument ridiculous',",
|
" \"i find your argument ridiculous\",",
|
||||||
" 'soda with straws are my favorite',",
|
" \"soda with straws are my favorite\",",
|
||||||
" ]",
|
" ]",
|
||||||
" )",
|
" )",
|
||||||
" for sent in doc.sents",
|
" for sent in doc.sents",
|
||||||
"]",
|
"]",
|
||||||
"",
|
"",
|
||||||
"assert sentences == [",
|
"assert sentences == [",
|
||||||
" ('i hate pasta on tuesdays', 'Negative'),",
|
" (\"i hate pasta on tuesdays\", \"Negative\"),",
|
||||||
" ('i like movies on wednesdays', 'Positive'),",
|
" (\"i like movies on wednesdays\", \"Positive\"),",
|
||||||
" ('i find your argument ridiculous', 'Negative'),",
|
" (\"i find your argument ridiculous\", \"Negative\"),",
|
||||||
" ('soda with straws are my favorite', 'Positive'),",
|
" (\"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": "Johannes Valbjørn",
|
||||||
"author_links": {
|
"author_links": {
|
||||||
"github": "sloev"
|
"github": "sloev"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user