Closed adaj closed 1 year ago
Hi @adaj, Thank you for opening the issue. I didn't know about the model that you linked. Version 0.4.3 adds support for these models. You can use the following CMLM models:
en_use_cmlm_md
https://tfhub.dev/google/universal-sentence-encoder-cmlm/en-baseen_use_cmlm_lg
https://tfhub.dev/google/universal-sentence-encoder-cmlm/en-largexx_use_cmlm
https://tfhub.dev/google/universal-sentence-encoder-cmlm/multilingual-basexx_use_cmlm_br
https://tfhub.dev/google/universal-sentence-encoder-cmlm/multilingual-base-brimport spacy
# on top of any spacy model
nlp = spacy.load('en_core_web_md')
# add the pipeline stage with one of the values
nlp.add_pipe('universal_sentence_encoder', config={'model_name': 'xx_use_cmlm'})
# this prints 0.9549750226856141
nlp('Hi there how are you').similarity(nlp('hello there how are you doing?'))
Let me know if you find any issues by using the models.
Best, Martino
Thanks a lot @MartinoMensio!
Hi, thanks for providing these USE-Spacy interfaces!! Recently Google released another USE, now as a conditional masked language model, please find it here https://tfhub.dev/google/universal-sentence-encoder-cmlm/multilingual-base/1.
My question is if that's possible for you to include it in this repo as well.