Giter Club home page Giter Club logo

sempre-interactive-flipper's Introduction

SEMPRE INTERACTIVE - FLIPPER: Semantic Parsing with Execution, modified for usage in robotic world

(based on original interactive sempre repository https://github.com/sidaw/sempre-interactive)

What is SEMPRE and semantic parsing?

See SEMPRE-DOCUMENTATION.md.

What does this "Flipper" version of SEMPRE do?

This specific version of SEMPRE is a modification of the Voxelurn project which uses SEMPRE as the basis for a block-building world where input utterances act as build instructions for the block world (displayed with a browser-based JavaScript application). This version SEMPRE spcifically models a simple environment where a robot can move around a small map and pick/drop colored items. In addition to using the core language to control the robot, a user can define custom commands which are learned by the system improving its ability to understand more natural language-style commands.

Installation

Requirements

You must have the following already installed on your system.

  • Java 8 (not 7)
  • Ant 1.8.2
  • Ruby 1.8.7 or 1.9
  • wget

Other dependencies will be downloaded as you need them. SEMPRE has been tested on Ubuntu Linux 16.04, Debian 8, and MacOS X. Your mileage will vary depending on how similar your system is.

Easy setup

  1. Clone this GitHub repository:

     git clone https://github.com/mpi-sws-rse/sempre-interactive-flipper.git (https)
     git clone [email protected]:mpi-sws-rse/sempre-interactive-flipper.git (ssh)
    
  2. Download the minimal core dependencies (all dependencies will be placed in lib):

     ./pull-dependencies core
    
  3. Compile the source code (this produces libsempre/sempre-core.jar):

     ant interactive
    
  4. Run server (defaults to port 8410):

     ./interactive/run @mode=voxelurn
    

The command should execute, display some information about the grammar, and wait for input from the browser client (server can be stopeed with Ctrl+D. To go further with running sempre in the context of Robotic world, check Flipper

Additional options

While rewriting user's definition (option GrammarInducer.useEquivalentRewriting), the rewritings are scored based on both best packing score and the semantic similarity (cosine similarity of average of words in the spec). In order to use semantic similarity (option GrammarInducer.useSemanticSimilarityOfSentences), you have to provide a file with trained vectors (e.g. from GloVe) and give a path to it in the option InteractiveMaster.wordEmbeddingsFilePath.

General Troubleshooting

Here are some general tips for troubleshooting:

  • If the browser client is acting weirdly
    • Pull the newest version for the repository (no need to restart yarn)
    • On the panel on the right side, press Clear
  • If the code does not compile or immediately fails at runtime
    • Pull newest version of the code
    • Run ant clean and then ant interactive
  • If the server throws an error during use with the browser client
    • Open an issue detailing the server-side error and the client-side input
  • If all previously learned rules have to be forgotten, one can clean the file sempre-interactive/int-output/grammar.log.json

Browser Client

The corresponding browser-based client to this project can be found here.

sempre-interactive-flipper's People

Contributors

sidaw avatar percyliang avatar samginn avatar akshalaniche avatar ppasupat avatar ivan-gavran avatar froystig avatar brendon-boldt avatar crazydonkey200 avatar afader avatar kurige avatar yonatansito avatar mateuszmalinowski avatar thammegowda avatar zxie avatar siamakh avatar

Watchers

Jeff Fischer avatar Rupak Majumdar avatar James Cloos avatar Eva Darulova avatar

Forkers

akshalaniche

sempre-interactive-flipper's Issues

Problem inducing grammar definitions with aggressivePartialParsing

With the -Parser.aggressivePartialParsingoption flag, when doing the following:

Try "for each point in world containing item is red {visit point; pick every item is red" (note the space in "for each"). This is parsed as "foreach point in world containing item is red {visit point; pick every item is red" by the extended parsing. Accept the parse

Define "gather red" as "for each point in world containing item is red {visit point; pick every item is red"

Then the grammar inducer does not induce "gather $Color" and "gather $Property".

If defining "gather red" as "foreach point in world containing item is red {visit point; pick every item is red" (without the space in "foreach"), then "gather $Color" and "gather $Property" are induced.

Always induce original definition

After the introduction of "definition rephrasing", now we are only inducing the best scoring definition. This results in an unexpected behavior if the user expects the original definition to generalize correctly.

Add both the definitions: the original one and the best scoring one

Unify treating of colors and shapes

Currently, items are referred by their color by e.g. .. has color red and by their shape by ... has shape triangle.
That difference is artificial. A preferred solution would be ... is red and ... is triangle

Grammar inducer induces definition for point

If visit all red is defined as foreach point in world containing item has color red visit point (no curly braces around visit point, which is ok regarding to the grammar), then the GrammarInducer induces (amond other things) $Point -> all red.

This is a problem because $Point doesn't have a meaning outside a for loop.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.