Skip to content
This repository has been archived by the owner on Jul 7, 2023. It is now read-only.

Non deterministic Decoding. How can I do in Transformer. #607

Open
dixiematt8 opened this issue Feb 21, 2018 · 2 comments
Open

Non deterministic Decoding. How can I do in Transformer. #607

dixiematt8 opened this issue Feb 21, 2018 · 2 comments
Labels

Comments

@dixiematt8
Copy link

dixiematt8 commented Feb 21, 2018

Let's say I have an input in meaning representation (MR) format

I: {"name":"NAME", "familyFriendly":-1, "eatType":"Coffee Shop", "food":"Chinese", "priceRange": "moderate", "near":-1, "area":"riverside", "customer rating":"1 out of 5"}

Transformed Input (taking values alone): NAME -1 Coffee Shop Chinese moderate -1 riverside 1 out of 5

For the first run:
O: NAME is a family friendly Chinese coffee shop with moderate price, which is located in Riverside with customer rating of 1 out of 5

For the second run:
O: NAME is a family friendly Chinese coffee shop with moderate price, which is located in Riverside with customer rating of 1 out of 5

Here I get the same output for two runs.

But what I actually want different output sentences for the given input. Like this...

I: {"name":"NAME", "familyFriendly":-1, "eatType":"Coffee Shop", "food":"Chinese", "priceRange": "moderate", "near":-1, "area":"riverside", "customer rating":"1 out of 5"}

Transformed Input (taking values alone): NAME -1 Coffee Shop Chinese moderate -1 riverside 1 out of 5

For the first run:
O: NAME is a family friendly Chinese coffee shop with moderate price, which is located in Riverside with customer rating of 1 out of 5

For the second run:
O: A Chinese coffee shop named NAME is located in Riverside with a customer rating of 1 out of 5 has a moderate price.

You can see the data set here: http://www.macs.hw.ac.uk/InteractionLab/E2E/

Can you please tell how can I achieve this using transformer.

@yynil
Copy link
Contributor

yynil commented Feb 22, 2018

just turn the MR to a sequence. you can refer the paper "Grammar as a foreign language". https://arxiv.org/abs/1412.7449

@rsepassi
Copy link
Contributor

Have you tried increasing beam_size?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants