Giter VIP home page Giter VIP logo

docai's Introduction

DoCAI

Abstract:

DoCAI (Document Conversational AI) is an AI-powered document analyzing tool and question-answering chatbot. Given a URL address, document or free text, DoCAI analysis them, answers questions in the context of the document and provides insights like topic distribution of the document using Natural Language Processing. Any user/professional referring a large set of documents on a daily basis can leverage DoCAI to quickly go through and assimilate large amounts of information.

Question Answer Bot:

The very important component of DoCAI is the Question Answer chatbot. Given a document or context, the bot answers questions asked by user from documents.

For question answering chatbot, I am using Stanford Question Answering Dataset (SQuAD).

STEP 0:

It is very important to understand the dataset and visualize insights in data before building the model. Please run the Dataset Analysis notebook to pre-process data and analyze insights from the dataset.

*** open Dataset Analysis.ipnb ***

STEP 1:

The initial step is to convert the SQuAD JSON data into Pandas Dataframe and convert tokens into word embeddings (pretrained GloVe embeddings) and character embeddings.

*** python pre-process.py ***

STEP 2:

I have choosed Bidirectional Attention Flow architecture for building the Question Answer baseline model. BiDAF takes advantage of attention mechanism to the encoded sequence.

The hyperparameters for this training the model are: categories Logo

*** python3 train.py -n baseline ***

*** tensorboard --logdir save --port 5678 *** #runs the tensorboard

STEP 3:

The final step isto run the test.py function to get the answers for new questions.

Evaluation metrics:

EM(Exact Match) and F1 are standard evaluation metrics for SQuAD. EM is strict compared to F1, for example, if the actual answer is Elon Musk and your predicted answer is Elon, Em score will be 0. However, we get 50% recall (as half of the actual answer is correct) and 100% precision (as full of the predicted answer is correct). Hence, the F1 score is 2precisionrecall / (precision + recall) = 66.66%.

After 30 epochs of training, baseline gave me 58% F1 and 51% EM.

Future Models:

I am currently planning to modify my baseline and develop new architectures. I am developing code to use ELMO and BERT in place of GloVe embeddings. In baseline I used bidirectional LSTM's, I want to see if GRU gives more performance. I also wanted to implement Transformers with attention. I also wanted to see if an ensemble of multiple models performs well.

Insights generated by DoCAI:

Insights given by DoCAI include topic distribution of documents (https://github.com/kaushikData/Document-Classification-Using-Wikipedia-Data) and sentiment of documents.

docai's People

Contributors

kaushikdata avatar

Watchers

James Cloos avatar  avatar

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.