-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor how entities are generated in agent sentences (#453)
The goal of this refactor is two fold: - We need to generate delexicalized agent utterances at inference time to pass to the NLG - We want the actual text of the entity to be generated by the I18n code during postprocessing, so consistent postprocessing is applied to both synthetic and NLG sentences, and we can use locale-specific code. To apply this refactoring, the system of inference time constants is modified to make use of a SequentialEntityAllocator, which allocates entity tokens (NUMBER_0, DATE_1, etc.) for each value that appears in the context. This entity allocator is also passed to the Describe module when that module extracts a value from the program. At training time, we have only one SequentialEntityAllocator, which is primed with the fake entities used during generation, plus any entity that is generated by the simulator and observed by Describe. At inference time, we reset the entity allocator immediately prior to processing a new context. The entities thus allocated are later passed to the I18n module for postprocessing. This module gained code to automatically select the most appropriate unit for a given size. Fixes #447
- Loading branch information
Showing
24 changed files
with
600 additions
and
431 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.