From 9467995e7417a131d519e98f1575fb758060e293 Mon Sep 17 00:00:00 2001 From: Christian Kasim Loan Date: Mon, 8 Apr 2024 18:45:12 +0200 Subject: [PATCH] decomment class --- .../sentence_mpnet/MPNetSentenceEmbedding.py | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/nlu/components/embeddings/sentence_mpnet/MPNetSentenceEmbedding.py b/nlu/components/embeddings/sentence_mpnet/MPNetSentenceEmbedding.py index 91242551..c08b50ca 100644 --- a/nlu/components/embeddings/sentence_mpnet/MPNetSentenceEmbedding.py +++ b/nlu/components/embeddings/sentence_mpnet/MPNetSentenceEmbedding.py @@ -1,18 +1,18 @@ -# from sparknlp.annotator import MPNetEmbeddings -# -# -# class MPNetSentence: -# @staticmethod -# def get_default_model(): -# return MPNetEmbeddings.pretrained() \ -# .setInputCols(["documents"]) \ -# .setOutputCol("mpnet_embeddings") -# -# @staticmethod -# def get_pretrained_model(name, language, bucket=None): -# return MPNetEmbeddings.pretrained(name,language,bucket) \ -# .setInputCols(["documents"]) \ -# .setOutputCol("mpnet_embeddings") -# -# -# +from sparknlp.annotator import MPNetEmbeddings + + +class MPNetSentence: + @staticmethod + def get_default_model(): + return MPNetEmbeddings.pretrained() \ + .setInputCols(["documents"]) \ + .setOutputCol("mpnet_embeddings") + + @staticmethod + def get_pretrained_model(name, language, bucket=None): + return MPNetEmbeddings.pretrained(name,language,bucket) \ + .setInputCols(["documents"]) \ + .setOutputCol("mpnet_embeddings") + + +