LaserEmbeddings()The language or language code you'd like to use If empty, this implementation will default to using a multilingual earlier LASER encoder model (called laser2) Find the list of supported languages at https://github.com/facebookresearch/flores/blob/main/flores200/README.md#languages-in-flores-200
LASER Language-Agnostic SEntence Representations. LASER is a Python library developed by the Meta AI Research team and used for creating multilingual sentence embeddings for over 147 languages as of 2/25/2024 See more documentation at:
To use this class, you must install the laser_encoders Python package.
pip install laser_encoders
Example:
from laser_encoders import LaserEncoderPipeline
encoder = LaserEncoderPipeline(lang="eng_Latn")
embeddings = encoder.encode_sentences(["Hello", "World"])