You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 30, 2023. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+11-3Lines changed: 11 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
# bidaf-keras
2
2
Implementation of [Bidirectional Attention Flow for Machine Comprehension](https://arxiv.org/abs/1611.01603) in Keras 2
3
3
4
-
## What is this project abour?
4
+
## What is this project about?
5
5
Machine Comprehension is a task in the field of NLP & NLU where the machine is provided with a passage and a question, and the machine tries to find an answer to the asked question from that given passage, by understanding the syntax and semantics of human language (here, English) and by establishing and understanding the relations betweeen the passage and the question.
6
6
7
7
We have implemented a model suggested in the paper Bidirectional Attention Flow for Machine Comprehension by a team of allennlp, popularly known as BiDAF.
@@ -79,6 +79,7 @@ This project is available for use as a complete module. You can use this project
79
79
- Ability to run predictions on a list of passages and questions.
80
80
- Sample shuffling can be enabled.
81
81
- Ability to return confidence score as well as character locations in the passage.
@@ -101,12 +102,20 @@ This project is available for use as a complete module. You can use this project
101
102
- embedding dimension: 400
102
103
- squad version: 1.1
103
104
105
+
## Project flow
106
+
- First of all, the project will download the data required for training the model. This consists of two categories: Magnitude and SQuAD.
107
+
- SQuAD files are dataset files on which the model can be trained. Based on it's version specified, it will download the required files and preprocess them. The SQuAD data will be stored in **data/squad**. For more information on the SQuAD dataset, [visit this site](https://rajpurkar.github.io/SQuAD-explorer/).
108
+
- Magnitude files are a form of compressed and encoded files that we use for word embeddings at word-level and character-level. The project will download the required files based on the mebedding dimension specified by the user, in the **data/magnitude** directory. For more information on Magnitude, [visit this site](https://github.com/plasticityai/magnitude/)
109
+
- Now, users can train the model. The users have various options available while training to save models after every epoch and save the history of training as well. All these items will be saved in a directory called **saved_items**.
110
+
- To run predictions on any trained model, make sure that the model lies in the directory **saved_items** and then pass the name of the model to loading script. After loading the model, call the predict function.
111
+
- To resume training or to use pretrained models provided above, just place the model inside **saved_items** directory and pass it's name to the project.
112
+
104
113
## Improvements in future releases
105
114
- Provide two modes for preprocessing: Strict and Moderate.
106
115
- Measure accuracy of model with Moderate mode.
107
-
- Support for use via command line
108
116
- GUI support
109
117
- Database support
118
+
- Your suggestions...?
110
119
111
120
## To-do list
112
121
- Make this project as a portable module and publish it on pypi
@@ -115,7 +124,6 @@ I don't know which things should I keep in mind to do this (such as how to creat
115
124
116
125
Thoughts, samples codes, modifications and any other type of contributions are appreciated. This is my first project in Deep Learning and also first being open source. I will need as much help as possible as I don't know the path I need to follow. Thank you..
117
126
118
-
119
127
## Warnings
120
128
- There's a dependency flaw in our project. The package we used to generate word embeddings, pymagnitude, hasn't yet added suport for fixed length inputs - https://github.com/plasticityai/magnitude/issues/50. Hence, trying to use this model with fixed length input will throw an error. We have looked into their source code and found the problem. We have forked that repo, fixed the issue and then generated a pull request but it seems like the author is no more maintaining that project. So, we have to wait. Till then, you may use the patched version of that package to make this functionality work. You can find it here - https://github.com/ParikhKadam/magnitude/tree/patch-1
121
129
- If the author is no more supporting this project, we are planning to maintain our forked version in future. But we don't know how to publish such a forked version on PyPI. You can help us in case you know it. Or wait until we learn xD.
0 commit comments