Interactive semantic parsing client
Currently in progress, and focuses on a blocks world.
To install, simply run
yarn install. This will install all the needed node dependencies.
We use react-scripts to handle the building and running of the client.
To run locally with hot reload, run
By default, the client tries to connect to the servers specified in "constants/strings.js". But, if you wish the client to connect to a different instance of SEMPRE or the community server, you can set environment variables to override the URLs they try to connect. The following environmental variables will tell the client which server to connect to:
REACT_APP_SEMPRE_SERVERspecifies the URL of the running SEMPRE instance.
REACT_APP_COMMUNITY_SERVERspecifies the URL of the (optionally) running community server to support logging and community features.
You can either specify these in a
.env file or in the CLI command like so,
REACT_APP_SEMPRE_SERVER=localhost:8410 yarn start
yarn build to build a production version of the app. The build will be saved to "/build".
Note: In order to build to deploy to a URL that is not the root, you must set the "homepage" in "package.json" to the URL where the client will be hosted.
It is simple to deploy to Github Pages. Just set the "homepage" variable in "package.json", and then run
The setting (BlocksWorld) lives in the "src/setting". Here is the only logic that is blocks world dependent.
Build Your Own Setting!
Interested in expanding this client to handle a different setting? Everything should be setting agnostic except for the code in "src/setting". All you have to do is implement all the same props as "src/setting/BlocksWorld" does and then export the new setting as the App's setting by changing what gets imported in "src/setting/index.js". Then, everything should work as intended!