Skip to content

Average embeddings using SentenceEmbeddings #5974

Answered by maziyarpanahi
pdurham2 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi,

Since you are using WordEmbeddingsModel, and for this annotator (GloVe) there is no maximum sequence unlike transformers (BERT, ALBERT, RoBERTa, etc.), you can just remove SentenceDetector, use document for setInputCols in all the annotators that come after DocumentAssembler.

Could you please try that and see what happens?

UPDATE: This should be fixed in our new release: https://github.com/JohnSnowLabs/spark-nlp/releases/tag/3.2.3

Replies: 1 comment 9 replies

Comment options

You must be logged in to vote
9 replies
@pdurham2
Comment options

@maziyarpanahi
Comment options

@maziyarpanahi
Comment options

@maziyarpanahi
Comment options

@pdurham2
Comment options

Answer selected by maziyarpanahi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants