Coder Social home page Coder Social logo

kwangh / semantic-textual-similarity-tensorflow Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 4.0 5.02 MB

SICK train/test data set, Tensorflow Siamese Network, Semantic Textual Similarity measure

License: GNU General Public License v3.0

Jupyter Notebook 98.41% R 1.59%

semantic-textual-similarity-tensorflow's People

Contributors

kwangh avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

semantic-textual-similarity-tensorflow's Issues

Defining characters placeholders in addition to word placeholders

Hi Kyle29, thanks for the code. In the computation graph definitions, you have this for the words in sentences:

sentences_A=tf.placeholder(tf.int32,shape=([None,FLAGS.max_length]),name='sentences_A')
sentencesA_length=tf.placeholder(tf.int32,shape=([None]),name='sentencesA_length')

I wonder what would be the definition if you include the character level? Would it be like this?

sentences_words_A=tf.placeholder(tf.int32,shape=([None,FLAGS.max_length, max_word_len,]),name='sentences_A')
sentencesA_words_length=tf.placeholder(tf.int32,shape=([None, FLAGS.max_length]),name='sentencesA_length')

Thanks!

Prediction calibration step

Hi Kyle, I wonder if the prediction calibration step in the original paper (p. 4) has been implemented in your code? I don't seem to find it in your code although you did a conversion of the input values to lie between [0,1]. Particularly, this is their description of the calibration step:

Due to the simple construction of our similarity function, the predictions of our model are constrained to follow the exp(โˆ’x) curve and are thus not suited for these evaluation metrics. After training our model, we apply an additional nonparametric regression step to obtain better-calibrated predictions (with respect to MSE). Over the training set, the given labels (under original [1, 5] scale) are regressed against the univariate MaLSTM g-predicted relatedness as the sole covariate, and the fitted regression function is evaluated on the MaLSTM-predicted relatedness of the test pairs to produce adjusted final predictions. We use the classical local-linear estimator discussed in Fan and Gijbels (1992) with bandwidth selected using leave-one-out cross-validation. This calibration step serves as a minor correction for our restrictively simple similarity function (which is necessary to retain interpretability of the sentence representations).

Cheers,
Kurt

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.