whatlies.language.SentenceTFMLanguage

This class provides the abitilty to load and use the encoding strategies found in the sentence transformers library.

A full list of pretrained embeddings can be found here.

Parameters

Name Type Description Default
name name of the model to load, be sure that it's downloaded or trained beforehand required

Usage:

> from whatlies.language import SentenceTFMLanguage
> lang = SentenceTFMLanguage('distilbert-base-nli-stsb-mean-tokens')
> lang['python is great']
> lang[['python is a language', 'python is a snake', 'dogs are cool animals']]