Giter VIP home page Giter VIP logo

various-unsupervised-nlp-techniques-with-distilbert-sentence-embeddings's Introduction

Various unsupervised NLP techniques with DistilBERT

Usage of BERT pre-trained model for unsupervised NLP and text clustering techniques using sentence embeddings

This notebook illustrates the techniques for text clustering described in SBERT.net. The architecture uses DistilBERT language model and Sentence-Transformers model. The techniques described in the notebook are:

  • Computing sentence embeddings from pretrained BERT model
  • Semantic textual similarity
  • Semantic search

Both approaches use cosine similarity. In contrast to traditional search, that only finds documents based on lexical matches, semantic search can also find synonyms. These techniques leverage the embedding representation of text to identify the closest element from a semantic view (capture the meaning).

  • Text clustering
    • k-means
    • agglomerative clustering
    • fast clustering

Here embeddings are also utilized to cluster based on semantic proximity.

The notebook uses Quora duplicate questions dataset.

Two additional notebooks are added. These are introduced and described in this interesting analysis published in medium. The author explores sentence embeddings using SBERT. SBERT generates embeddings from a pretrained BERT model which is then modified with Siamese and Triplet network structures to generate meaningful Sentence Vectors. SBERT approach is described in this paper. Sentence embedding proves superior for semantic search as opposed to pure lexical matches which would fail at identifying similar meaning from a query. Sentence embedding also performs better than averaging word embeddings from a sentence.

  • experiment looking at sentence similarity using the average of BERT embeddings at word level
  • experiment looking at sentence similarity using SBERT model leveraging transfer learning from BERT to produce sentence embeddings These two notebooks run smoothly on google drive.

various-unsupervised-nlp-techniques-with-distilbert-sentence-embeddings's People

Contributors

laurentveyssier avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.