Coder Social home page Coder Social logo

recursivenn's People

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

recursivenn's Issues

About the padding of labels

Since some words' labels may be -1,
in def extract_batch_tree_data from tf_data_utils,
labels_arr.fill(-1) may be not reasonable.(in line 185)
I am appreciated for your reply.

Using Stanford Sentiment Treebank

Hello,

In the code, it looks like the files that need to be read are "vocab-cased.txt", "trainsents.txt", "testsents.txt", etc (see below). However, when I download the dataset from http://nlp.stanford.edu/sentiment/index.html (three links on the right hand side), I don't see those files in any of the downloads. Can you kindly point me to where I need to pick the correct set of files? Thanks a ton.

`def load_sentiment_treebank(data_dir,fine_grained):
voc=Vocab(os.path.join(data_dir,'vocab-cased.txt'))

split_paths={}
for split in ['train','test','dev']:
    split_paths[split]=os.path.join(data_dir,split)

fnlist=[tNode.encodetokens,tNode.relabel]
arglist=[voc.encode,fine_grained]
#fnlist,arglist=[tNode.relabel],[fine_grained]

data={}
for split,path in split_paths.iteritems():
    sentencepath=os.path.join(path,'sents.txt')
    treepath=os.path.join(path,'parents.txt')
    labelpath=os.path.join(path,'labels.txt')
    trees=parse_trees(sentencepath,treepath,labelpath)
    if not fine_grained:
        trees=[tree for tree in trees if tree.label != 0]
    trees = [(processTree(tree,fnlist,arglist),tree.label) for tree in trees]
    data[split]=trees

return data,voc`

various input shape

I get the error about various input data shape ! how is the static computation graph supposed to handle this issue? I taught that I have to use a dynamic computation graph provided in TensorFlow fold and PyTorch for these kinds of tasks. The error I get is this :
(0) Invalid argument: Shapes of all inputs must match: values[0].shape = [17] != values[2].shape = [23] [[node stack (defined at C:\Users\RAKA\Documents\tree_lstm\HSR_tree_lstm\tree_structured_lstm.py:150) ]]
line 150 :
batch_loss = tf.stack(outloss)

Running on SICK dataset

Hi, thank you for sharing this code! I wonder if you could point out/explain a bit which part of the code I would need to change to use the SICK dataset? Thank you so much.

Kurt

On Implementing Semantic Relatedness

I just found your code while trying to understand the paper and was wondering if you could help me.
In section 4.2, it is said that the first step in investigating relatedness between two sentences is to produce sentence representations of HL and HR using a Tree-LSTM model over each sentence's parse tree. Afterwards, another neural network is introduced which uses the angle and distance of the obtained sentence representation pairs.
My question would be how exactly are the HL and HR obtained using the Tree-LSTM model?
Section 5.2 also mentions a produced constituency parse using PCFG, how is this used with the Tree-LSTM?

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.