Giter VIP home page Giter VIP logo

deepkeyphraseextraction's Introduction

Deep Keyphrase Extraction

Deep Neural Networks for Keyphrase Extraction.

Currently containing three scripts:

  • SimpleRNN.py : Bidirectional LSTM recurrent neural network that scans the text and selects the keyphrases.
  • MergeRNN.py: Bidirectional LSTM recurrent neural network that scans the text two times: the left branch of the network reads the text and produces an encoded version of the document. This representation is then merged with the word embedding of each word and the text is scanned again using another Bidirectional LSTM that selects the keyphrases.
  • AnswerRNN.py: inspired from Question Answering models, this network receives a series of candidate keyphrases generated using part-of-speech tag patterns and compares them with the document. It used two Bidirectional LSTMs to generate the representations of both the document and the keyphrase and another network on top with classifies each candidate KP.
  • AnswerRNN2.py: evolution of AnswerRNN, borrows from Feng et Al., 2015 and Tan et al, 2016 similarity-based models.

Datasets

The datasets used are:

  • Hulth, 2003: it contains 2000 documents with 19276 different keyphrases, and these keyphrases have 786 different part-of-speech patterns.
  • Semeval 2017: it contains 500 documents with 9946 different keyphrases, and these keyphrases have 1689 different part-of-speech patterns.

Reproducibility

To ensure reproducibility of the results, you should use the latest development version of Theano. At the time of writing, results are fully reproducible using Theano version 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291.

The recommended way of reproducing the results is installing the latest Python version through Anacaonda.

After installing Anaconda, you should create a virtual environment by typing

> conda create -n venv anaconda

To activate the environment, run the command

> source activate venv

To install the packages necessary to run the code in this repository, run

> conda install --yes --file requirements.txt

After running your experiments, you should exit the virtual environment by running

> source deactivate

deepkeyphraseextraction's People

Contributors

basaldella avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

deepkeyphraseextraction's Issues

ValueError

ValueError: could not broadcast input array from shape (100) into shape (300)

I'm running a file SimpleRNN.ipynb in Anaconda which is reporting above error on

--- preprocessing.py file
451 if embedding_vector is not None:
452 # words not found in embedding index will be all-zeros.
--> 453 embedding_matrix[i] = embedding_vector
454
455 return train_x, train_y, test_x, test_y, val_x, val_y, embedding_matrix

AnswerRNN.py

Screenshot from 2023-04-14 17-02-12

I am getting the following error.
Please suggest the solution

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.