项目作者: alejandrods

项目描述 :
Named Entity Recognition in travel-related documents using RNN
高级语言: Python
项目地址: git://github.com/alejandrods/Travel-Entity-Recognition.git
创建时间: 2020-04-25T13:42:48Z
项目社区:https://github.com/alejandrods/Travel-Entity-Recognition

开源协议:

下载


Travel Entity Recognition Travel-Related Sentences

Project to create a named entity recognition (NER) for travel-related sentences.
I developed this project inspired by how Gmail extracts information from the
travel-related emails and automatically inserts the event in your calendar.
It developed it using Keras and the model is deployed as REST API.

Table of Contents

Installation

Train

Run App

Examples

Installation

1- Clone the repository in your local machine:

  1. git clone git@github.com:alejandrods/Travel-Entity-Recognition.git

2- Install requirements

  1. pip install -r requirements.txt

Change tensorflow-gpu to tensorflow in requirements.txt if you are not available to use GPU.

3- Environment variables required

  1. DATA_PATH (Path to data - i.e: ./data)
  2. CONVERT_PATH (Path to converted files - i.e: ./converted)
  3. DATASET_FILE (Dataset file - i.e: travel_set.csv)
  4. QUERY_FILE (Name for query converted file - i.e: query_set.txt)
  5. LABEL_FILE (Name for label converted file - i.e: labels_set.txt)
  6. GLOVE_DIR= (Path to Glove embeddings - i.e: ./embedding/glove.6B.100d.txt)
  7. EMBEDDING_DIM (Embedding Dimension - i.e: 100)
  8. MAX_SEQ_LEN (Max length sequences - i.e: 60)
  9. MODEL_DIR (Path to model dir - i.e: ./model)

4- Download pre-trained words vector in .txt format from this site - Glove

Train

1- Set environment variables in .env

2- To train a new model, run the next command:

python train.py

Run App

1- Set environment variables in .env

2- To deploy the front-end using flask-app, run the next command:
python app.py

Examples

I need a flight from New York to Barcelona on may 4th morning.

What is the status of the flight UX 1092.

I would like to rent a car in the airport.