-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Closed
Description
New to spaCy and wanting to match the user's utterance to a list of examples using similarity method, this runs the first time, but the server would hang the second time with another message, this is on an Apache server on a cloud platform with shared, non-dedicated resources if this info is useful. Sorry if this might not be the right place to ask.
intent = {'intent': '', 'similarity': 0.0, 'response': ''}
message_nlp = nlp(message)
for x in intent_basic_info:
for y in x['message']:
message_nlp_example = nlp(y.lower())
similarity = message_nlp.similarity(message_nlp_example)
if similarity > intent['similarity']:
intent['intent'] = x['intent']
intent['similarity'] = similarity
intent['response'] = random.choice(x['response'])
spaCy version 3.4.2
Platform Linux-5.8.0-50-generic-x86_64-with-glibc2.32
Python version 3.8.10
Pipelines en_core_web_md (3.4.1)
Metadata
Metadata
Assignees
Labels
No labels