/ASF-core

ATIS Slot-filler with tensorflow

Primary LanguagePythonApache License 2.0Apache-2.0

Model overview

Getting started

  1. Download the GloVe vectors with
make glove
  1. Build the training data, train and evaluate the model with
make run

Training Data

The training data must be in the IOB format

i O
need O
a O
flight O
from O
memphis B-fromloc.city_name
to O
las B-toloc.city_name
vegas I-toloc.city_name

Usage

Working demo: https://ofis.justanotherdemo.xyz/

Start the server

python3 server.py

POST /parse

curl -X POST "http://localhost:5000/parse" -d "flight to new york from los angeles for next sunday"

Response

{
  "type": "",
  "departure": "LAX",
  "destination": "NYC",
  "departureDate": "2018-03-25",
  "departureTime": "",
  "returnDate": ""
}

Possible improvements

  • Improve char embedding Model
  • Split Dataset
  • Generate more data
  • Add lexicon of cities, dates and times
  • Move from BIO labels to BIOES (Begin, Inside, Outside, End, Single)
  • Replace multi-digit numbers same as single-digit ones
  • Split word before and after digit (ex: $5, 5pm)
  • Try glove with 50d
  • Explore FastText model
  • Reduce out-of-training words

Credits / Resources

https://arxiv.org/pdf/1511.08308.pdf

https://arxiv.org/pdf/1603.01354.pdf

https://guillaumegenthial.github.io/sequence-tagging-with-tensorflow.html

https://github.com/guillaumegenthial/sequence_tagging