Open yomnamahmoud opened 3 years ago
hi @yomnamahmoud ,
Can you please check the version of SpaCy? You may be running a version not up to date. I think Language.factory
was introduced with SpaCy v2 or higher. Now I would recommend at least spaCy v3.
Best, Martino
I was running the following example as part of multiple trials on google collab:
import spacy_sentence_bert
nlp = spacy_sentence_bert.load_model('en_roberta_large_nli_stsb_mean_tokens') doc_1 = nlp('Hi there, how are you?') doc_2 = nlp('Hello there, how are you doing today?') print(doc_1.similarity(doc_2[0:7]))
I got the following message :
---> 26 @Language.factory('sentence_bert', default_config={ 27 'model_name': None, 28 'debug': True
AttributeError: type object 'Language' has no attribute 'factory'
I am currently trying to trace it in the library itself but any suggestion would be appreciated,