• Stars
    star
    159
  • Rank 234,527 (Top 5 %)
  • Language
    Python
  • Created over 7 years ago
  • Updated over 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Intent parsing and slot filling in PyTorch with seq2seq + attention

PyTorch Seq2Seq Intent Parsing

Reframing intent parsing as a human - machine translation task. Work in progress successor to torch-seq2seq-intent-parsing

The command language

This is a simple command language developed for the "home assistant" Maia living in my apartment. She's designed as a collection of microservices with services for lights (Hue), switches (WeMo), and info such as weather and market prices.

A command consists of a "service", a "method", and some number of arguments.

lights setState office_light on
switches getState teapot
weather getWeather "San Francisco"
price getPrice TSLA

These can be represented with variable placeholders:

lights setState $device $state
switches getState $device
weather getWeather $location
price getPrice $symbol

We can imagine a bunch of human sentences that would map to a single command:

"Turn the office light on."
"Please turn on the light in the office."
"Maia could you set the office light on, thank you."

Which could similarly be represented with placeholders.

TODO: Specific vs. freeform variables

A shortcoming of the approach so far is that the model has to learn translations of specific values, for example mapping all of the device names to their equivalent device_name. If we added a "basement light" the model would have no basement_light in the output vocabulary unless it was re-trained.

The bigger the potential input space, the more obvious the problem - consider the getWeather command, where the model would need to be trained with every possible location we might ask about. Worse yet, consider a playMusic command that could take any song or artist name...

This can be solved with a technique which I have implemented in Torch here. The training pairs have "variable placeholders" in the output translation, which the model generates during an intial pass. Then the network fills in the values of these placeholders with an additional pass over the input.

More Repositories

1

practical-pytorch

Go to https://github.com/pytorch/tutorials - this repo is deprecated and no longer maintained
Jupyter Notebook
4,512
star
2

char-rnn.pytorch

PyTorch implementation of char-rnn (character-level language model)
Python
197
star
3

torch-seq2seq-attention

Torch implementation of seq2seq machine translation with GRU RNN and attention
Lua
78
star
4

simon

Dynamic routing/vhosts with nginx + Lua + Redis
Lua
73
star
5

RARNN

Recursive application of recurrent neural networks, for hierarchical intent parsing
Jupyter Notebook
59
star
6

nalgene

Natural language generation language
Python
55
star
7

torch-seq2seq-intent-parsing

Intent parsing and slot filling in Torch with seq2seq + attention
Lua
49
star
8

TwitterProfileClone

Swift clone of Twitter's iOS profile view with a stretchy header
Swift
44
star
9

pytorch-text-vae

Python
33
star
10

sconce-python

Python
16
star
11

lit

Literate programming for any language. It's 🔥.
Shell
16
star
12

nextjs-boilerplate

Next.js Boilerplate with TypeScript, TailwindCSS, and Redux-Saga
TypeScript
12
star
13

torch-seq2seq

Word-level sequence to sequence RNN for translation
Lua
11
star
14

torch-rnn-word-classifier

Learns to classify names by country of origin with a LSTM RNN in Torch
Lua
9
star
15

blinkinch

Square inch clone of the blink(1) indicator light with ATTiny85 and V-USB.
Assembly
7
star
16

nalgene-js

Natural language generation language
CoffeeScript
6
star
17

hashpipe

Bash-like language and shell with parallel pipes and JSON support
CoffeeScript
5
star
18

Vector

The Edge Whisperer
Java
5
star
19

comfyui-mirror

Python
4
star
20

readme2tex-test

4
star
21

learning-avrc

Simple AVR C projects with the ATMega328p and ATTiny85
C
4
star
22

knobbox

USB knob with ATTiny85 (as HID keyboard) and ATMega328P (multi-modal with OS X driver)
4
star
23

knobbox-megaknob

Modal USB volume, brightness, and more knob with ATMega328 and V-USB
C
4
star
24

knobbox-tinyknob

USB HID volume knob with ATTiny85 and V-USB
C
4
star
25

dotfiles

Slices of configuration happiness
Lua
3
star
26

node-arxiv

CoffeeScript
3
star
27

tinymidi

One button USB MIDI controller on ATTiny85 with V-USB
C
2
star
28

mini

A minimalistic text editor, made with Electron.
CoffeeScript
1
star
29

soundcloud-widget

CoffeeScript
1
star
30

tug

tug at the heart of your deployment process
JavaScript
1
star
31

ismystartupideagood

CoffeeScript
1
star
32

upordown

Slack bot to tell you if the price of Bitcoin is going up or down
CoffeeScript
1
star
33

qwyp

miniature encrypted peer-to-peer chat.
1
star
34

shades

an experiment with auto-generated color schemes
CoffeeScript
1
star
35

croppit

Small but durable image cropping web service
CoffeeScript
1
star
36

hjklist

A hierarchical list maker.
JavaScript
1
star
37

chinook

Hipache config tool for quickly assigning local ports and docker containers
JavaScript
1
star
38

most-bus

A pushable, pluggable stream for Most.js
CoffeeScript
1
star