no modifs at all
This commit is contained in:
Binary file not shown.
@@ -0,0 +1,16 @@
|
||||
import spacy
|
||||
import sys
|
||||
|
||||
# Load the spacy model that you have installed
|
||||
nlp = spacy.load('en_core_web_md')
|
||||
sentence = ' '.join(sys.argv[2:])
|
||||
|
||||
# process a sentence using the model
|
||||
doc = nlp(sentence)
|
||||
|
||||
# It's that simple - all of the vectors and words are assigned after this point
|
||||
# Get the vector for 'text':
|
||||
print(doc[0],doc[0].vector)
|
||||
|
||||
# Get the mean vector for the entire sentence (useful for sentence classification etc.)
|
||||
print(doc.vector)
|
||||
@@ -0,0 +1,15 @@
|
||||
import requests
|
||||
|
||||
url = "https://quotes15.p.rapidapi.com/quotes/random/"
|
||||
|
||||
querystring = {"language_code":"fr"}
|
||||
|
||||
headers = {
|
||||
'x-rapidapi-host': "quotes15.p.rapidapi.com",
|
||||
'x-rapidapi-key': "9f89a4d69emsh51b4e1005159b42p14a115jsn521840e553e7"
|
||||
}
|
||||
|
||||
response = requests.request("GET", url, headers=headers, params=querystring)
|
||||
|
||||
print(response.text)
|
||||
|
||||
Regular → Executable
+1
@@ -1,3 +1,4 @@
|
||||
#!/usr/bin/env python
|
||||
import os
|
||||
import shutil
|
||||
|
||||
|
||||
Reference in New Issue
Block a user