flair icon indicating copy to clipboard operation
flair copied to clipboard

Can I use TransformerDocumentEmbeddings to generate embeddings of publications abstracts ?

Open pruthvi-hegde opened this issue 1 year ago • 2 comments

I am working on a usecase where I need to generate document embeddings of abstracts of few articles. I am using TransformerDocumentEmbeddings to instantiate PubMedBert model. And, it generates 768 dimensional vector per document. Since, flair documentation says that the input to TransformerDocumentEmbeddings is a sentence, is it fair to feed in paragraph of multiple sentences and obtain embeddings this way ?

pruthvi-hegde avatar Jul 18 '22 09:07 pruthvi-hegde

Yes you can obtain your embeddings this way, flair's Sentence object does not necessarily end with "."

whoisjones avatar Jul 19 '22 08:07 whoisjones

Thank you @whoisjones

Is there any documentation that I can refer to understand the internal working of 'TransformerDocumentEmbeddings' class ? Basically I want to know how 'TransformerDocumentEmbeddings' calculates embedding for a given paragraph.

Thanks in advance!

pruthvi-hegde avatar Aug 09 '22 06:08 pruthvi-hegde

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Dec 24 '22 06:12 stale[bot]