Giter VIP home page Giter VIP logo

nlp_qa_project's Introduction

NLP Question Answering Project

description: natural language processing question answering system

1. Packages

To run prase.py file, please follow the steps (Only the first two steps are relevant. i.e. download the stanford core nlp library and running the server in terminal) and run the following command in the terminal:

java -mx4g -cp "*" edu.stanford.nlp.pipeline.StanfordCoreNLPServer -annotators "tokenize,ssplit,pos,lemma,parse,sentiment" -port 9000 -timeout 30000

Here is a list of python modules I am using:

# python default library
import sys
import operator
import re
import os
import random

# project modules
from bin_questions import BinQuestion
from parse import Parse
from tokenize import Tokenize

# installed packages
import nltk
from nltk.tree import Tree as Tree
from nltk.corpus import wordnet
from nltk import word_tokenize, pos_tag, ne_chunk
from stanfordcorenlp import StanfordCoreNLP

from pattern.en import conjugate
from pattern.en import tenses

2. Running

The command line for question generation takes 2 parameters: a directory of a .txt file and a number specifying how many questions to be generated.

./ask einstein.txt 20

The command line for answering takes 2 parameters: one directory of .txt file (source) and a directory of .txt file that contains a list of questions. The program will return a list of answer corresponding to each question.

./answer einstein.txt questions.txt

3. Overall Idea

I have explained the big picture (definitions of the problem, syntatic versus semnatics method, parsing approach, type of grammars, overall architecture of code, possible improvements) in the following Youtube Video: https://youtu.be/ohM7D21C_8Q or for your convenience: you may click here

4. Credit

Collaborated With Angela Liang.

nlp_qa_project's People

Contributors

21han avatar

Watchers

James Cloos 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.