no modifs at all

This commit is contained in:
2020-07-19 12:40:54 +02:00
parent 8993f7a27d
commit a03993c4e1
4 changed files with 32 additions and 0 deletions
BIN
View File
Binary file not shown.
+16
View File
@@ -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)
+15
View File
@@ -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
View File
@@ -1,3 +1,4 @@
#!/usr/bin/env python
import os
import shutil