GithubHelp home page GithubHelp logo

chenglongchen / tensorflow-dsmm Goto Github PK

View Code? Open in Web Editor NEW
231.0 10.0 77.0 91 KB

Tensorflow implementations of various Deep Semantic Matching Models (DSMM).

License: MIT License

Python 100.00%
tensorflow semantic-matching question-answering sentence-similarity dssm cdssm abcnn matchpyramid esim siamese-network

tensorflow-dsmm's Introduction

tensorflow-DSMM

Ongoing project for implementing various Deep Semantic Matching Models (DSMM). DSMM is widely used for:

  • duplicate detection
  • sentence similarity
  • question answering
  • search relevance
  • ...

Quickstart

Data

This project is developed with regard to the data format provided in the 第三届魔镜杯大赛.

You can see /data/DATA.md for the data format description and prepared data accordingly. Your data should be placed in the data directory. Current data directory also holds a toy data.

If you want to run a quick demo, you can download data from the above competition link. Download is allowed after registration.

Demo

python src/main.py

Supported Models

Representation based methods

  • DSSM style models
    • DSSM: use FastText as encoder
    • CDSSM: use TextCNN as encoder
    • RDSSM: use TextRNN/TextBiRNN as encoder

Interaction based methods

  • MatchPyramid style models
    • MatchPyramid: use identity/cosine similarity/dot product as match matrix
    • General MatchPyramid: use match matrices based on various embeddings and various match scores
      • word embeddings
        • original word embedding
        • compressed word embedding
        • contextual word embedding (use an encoder to encode contextual information)
      • match score
        • identity
        • cosine similarity/dot product
        • element product
        • element concat
  • BCNN style models
    • BCNN
    • ABCNN1
    • ABCNN2
    • ABCNN3
  • ESIM
  • DecAtt (Decomposable Attention)

Building Blocks

Encoder layers

  • FastText
  • TimeDistributed Dense Projection
  • TextCNN (Gated CNN and also Residual Gated CNN)
  • TextRNN/TextBiRNN with GRU and LSTM cell

Attention layers

  • mean/max/min pooling
  • scalar-based and vector-based attention
  • self and context attention
  • multi-head attention

Acknowledgments

This project gets inspirations from the following projects:

tensorflow-dsmm's People

Contributors

chenglongchen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tensorflow-dsmm's Issues

不知怎么生成split.pkl?

你好,直接跑程序,报错:
“FileNotFoundError: [Errno 2] No such file or directory: 'split.pkl'”

我看了前面两个问题的回答,但还是不知道怎么生成split.pkl。能更详细说明下吗?
谢谢!

please provide Data set , download link is not working

Hi , i am trying to download dataset from the link you provided but looks like the link is expired. I am trying to understand your code but data set format is confusing me , so please provide either the dataset or a sample dataset which is of same format.

Thanks in advance

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.