A question about using an improved convolutional neural network for sentiment classification

For the changes to CNN proposed in the paper "Detecting Dependency-Related Sentiment Features for Aspect-level Sentiment Classification": After extracting the features in the convolutional layer, the features are multiplied by the dependency weights proposed in the text to obtain the weighted features, and then input to the pooling Floor.

Dependency weighting is a real value that quantitatively measures the dependency-relatedness between a word and the aspect term in a sentence.

Dependency weighting of each word is calculated by inputting syntactic distance between it and the aspect term to some decreasing functions. The shortest path algorithms can calculate syntactic distances between all word pairs. On the dependency parse tree, words with smaller syntactic distance to the aspect term are more closely related than the other words. The dependency parse tree can be annotated manually according to dependency grammar or created automatically by parsers.

enter image description here

I would like to ask you, if I use a data set with aspect labels now, how do I write code to calculate the syntactic distance when I enter a sentence? That is how to apply this shortest path algorithm. (I have learned that one is to create a dependency parse tree first, and then use the shortest path algorithm. But I haven't figured out how to write code to create a dependency parse tree)



from Recent Questions - Stack Overflow https://ift.tt/3nEcaiX
https://ift.tt/3BoY0qR

Comments

Popular posts from this blog

Today Walkin 14th-Sept

Hibernate Search - Elasticsearch with JSON manipulation

Spring Elasticsearch Operations