Update universe example codes (#9422)

* Update universe plugins

* Adjust azure trigger

* Add init to tests/universe

* deliberatly trying to break the universe to see if the CI catches it

* revert

Co-authored-by: svlandeg <svlandeg@github.com>
This commit is contained in:
Edward 2021-10-13 16:29:19 +02:00 committed by GitHub
parent 78365452d3
commit 72711dc2c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 15 deletions

View File

@ -16,6 +16,8 @@ pr:
exclude: exclude:
- "website/*" - "website/*"
- "*.md" - "*.md"
include:
- "website/meta/universe.json"
jobs: jobs:
# Perform basic checks for most important errors (syntax etc.) Uses the config # Perform basic checks for most important errors (syntax etc.) Uses the config

View File

@ -1363,20 +1363,19 @@
"url": "https://explosion.ai/demos/sense2vec", "url": "https://explosion.ai/demos/sense2vec",
"code_example": [ "code_example": [
"import spacy", "import spacy",
"from sense2vec import Sense2VecComponent",
"", "",
"nlp = spacy.load('en')", "nlp = spacy.load(\"en_core_web_sm\")",
"s2v = Sense2VecComponent('/path/to/reddit_vectors-1.1.0')", "s2v = nlp.add_pipe(\"sense2vec\")",
"nlp.add_pipe(s2v)", "s2v.from_disk(\"/path/to/s2v_reddit_2015_md\")",
"", "",
"doc = nlp(\"A sentence about natural language processing.\")", "doc = nlp(\"A sentence about natural language processing.\")",
"assert doc[3].text == 'natural language processing'", "assert doc[3:6].text == \"natural language processing\"",
"freq = doc[3]._.s2v_freq", "freq = doc[3:6]._.s2v_freq",
"vector = doc[3]._.s2v_vec", "vector = doc[3:6]._.s2v_vec",
"most_similar = doc[3]._.s2v_most_similar(3)", "most_similar = doc[3:6]._.s2v_most_similar(3)",
"# [(('natural language processing', 'NOUN'), 1.0),", "# [(('machine learning', 'NOUN'), 0.8986967),",
"# (('machine learning', 'NOUN'), 0.8986966609954834),", "# (('computer vision', 'NOUN'), 0.8636297),",
"# (('computer vision', 'NOUN'), 0.8636297583580017)]" "# (('deep learning', 'NOUN'), 0.8573361)]"
], ],
"category": ["pipeline", "standalone", "visualizers"], "category": ["pipeline", "standalone", "visualizers"],
"tags": ["vectors"], "tags": ["vectors"],
@ -2970,11 +2969,10 @@
"github": "thomasthiebaud/spacy-fastlang", "github": "thomasthiebaud/spacy-fastlang",
"pip": "spacy_fastlang", "pip": "spacy_fastlang",
"code_example": [ "code_example": [
"import spacy", "import spacy_fastlang",
"from spacy_fastlang import LanguageDetector",
"", "",
"nlp = spacy.load('en_core_web_sm')", "nlp = spacy.load(\"en_core_web_sm\")",
"nlp.add_pipe(LanguageDetector())", "nlp.add_pipe(\"language_detector\")",
"doc = nlp('Life is like a box of chocolates. You never know what you are gonna get.')", "doc = nlp('Life is like a box of chocolates. You never know what you are gonna get.')",
"", "",
"assert doc._.language == 'en'", "assert doc._.language == 'en'",