hmi-utwente / flipper-2.0 Goto Github PK
View Code? Open in Web Editor NEWVersion 2.0 of the Dialogue Control system Flipper
License: GNU Lesser General Public License v3.0
Version 2.0 of the Dialogue Control system Flipper
License: GNU Lesser General Public License v3.0
When using weights in effects, i.e. , the effects can only have numbers, such as '3'. I would like to see also dynamic numbers for the weight, such that you get '3.
Basically, updating the weight in runtime should be a convenient feature.
We were unable to get the latest Flipper to work for our project with ASAP.
[java] 16:22:09.988 [main] INFO starters.FlipperDialogStarter - Loading flipper config file: Prototype1/config/flipper.properties
[java] 16:22:09.990 [main] INFO starters.FlipperDialogStarter - Starting Flipper thread
[java] Exception in thread "main" java.lang.NullPointerException
[java] at hmi.flipper2.javascript.JsEngine.eval(JsEngine.java:68)
[java] at hmi.flipper2.javascript.JsEngine.execute(JsEngine.java:56)
[java] at hmi.flipper2.Is.<init>(Is.java:40)
[java] at hmi.flipper2.TemplateController.<init>(TemplateController.java:152)
[java] at hmi.flipper2.TemplateController.<init>(TemplateController.java:180)
[java] at hmi.flipper2.TemplateController.create(TemplateController.java:100)
[java] at hmi.flipper2.launcher.FlipperLauncherThread.init(FlipperLauncherThread.java:132)
[java] at hmi.flipper2.launcher.FlipperLauncherThread.<init>(FlipperLauncherThread.java:79)
[java] at starters.FlipperDialogStarter.<init>(FlipperDialogStarter.java:36)
[java] at starters.FlipperDialogStarter.main(FlipperDialogStarter.java:103)
[java] Java Result: 1
After some digging it seems like the engine
in JsEngine is never really (successfully) initialized (i.e. here). Looks like using nashorn
instead of graal.js
still works fine for us (in an isolated test case). We're using the java version "1.8.0_301". Java 1.8 is recommended for ASAP at the moment.
My best explanation is that the 1.8 versions of javax.script.XXXX libs simply don't support graal.js
yet? The best solution of course would be to get ASAP/hmibuild to work with a more recent version of java, but independently, maybe we can do some changes here:
mgr.getEngineByName
doesn't seem to throw if it can't find/init the requested engine, can we add a check to whether engine
is initialized successfully/not-null?Currently, Flipper uses two JSON libraries, namely Jackson and Glassfish's one. This could be improved to only use one JSON library for Flipper.
It would be a bonus to have an external module viewing the IS in real-time.
When having templates without precondition tags , there is no parsing error given in build time, but in runtime it will have a null exception. If possible, can we add a check to the templates that every template should have or that if they're omitted, there is no more error.
.getResource() does not work when building top project with Flipper as dependency to .jar. We need to load all settings in the top project or replace everything with .getResourceAsStream().
There's a difference between the JDK 8 and JDK 11, in which Flipper is unable to parse arguments for methods, functions and constructors other than type Strings.
The right hand side of OR expressions aren't evaluated if the left one is already True
. Thus, in
TemplateFile.java#L135 and TemplateController.java#L169, the 'check' method is only called as long as changed
/res
remains False
.
We're currently in the state of developing a GUI debugger, making it easier to analyze exactly what is going on in the interaction and to quickly prototype.
We plan to also support GraalJS in Flipper, such that it's updated to use the most recent ECMAScript.
Consider the example template below. An object of class ...FlipperMiddleware
is initialized once (at TemplateFile or Template scope?). In this example, it manages communication with other components over middleware (i.e. listening on messages from the ASR component). In preconditions, one might want use the object to check whether there are messages queued up, and in effects these messages can be added to IS or the middleware object can be used to send responses (i.e. sending a response BML to the behavior realizer).
<?xml version="1.0"?>
<behaviourtemplates>
<is name="asr"><![CDATA[
{
"history": [],
"currentMessage": {}
}
]]></is>
<object name="AsrMiddleware" class="nl.utwente.hmi.FlipperExtensions.FlipperMiddleware">
<constructors>
<value class="String" constant="/topic/AsrOutput"/>
<!-- ... -->
</constructors>
</object>
<template id="1" name="UserASR">
<preconditions mode="and">
<method object="AsrMiddleware" name="hasMessage"></method>
</preconditions>
<effects>
<method is="is.asr.currentMessage" is_type="JSONString" object="AsrMiddleware" name="getMessage"></method>
<!-- do operations with currentMessage -->
</effects>
</template>
</behaviourtemplates>
Hi, I'm currently working on a project that uses ARIA VALUSPA as a foundation, which includes Flipper. Having looked at the xml files with the agent's templates, I noticed that some of the syntax within the templates are inconsistent, and I am unsure of the reason for this. In some templates, the preconditions are written in the following format:
<condition><![CDATA[!is.dialogue.greeted.agent]]></condition>
Though in other areas it has been written as:
<condition>is.dialogue.greeted.agent</condition>
My understanding of CDATA is that it is to prevent a string from being interpreted as XML markup, though I am uncertain of the reason for its inconsistency in the code. Could somebody please clarify if this was likely just an oversight or if there is an additional reason?
Secondly, I am unsure of the use of DMImpBegin and DMImpEnd, as I have read somewhere that their use is to create a pause in a sentence, though I have seen them placed in sentences in what I would consider irregular locations for pauses, I'd appreciate if somebody could give an in-sentence example of exactly how they would each be used?
Thank you.
When loading templates with a database connection, there is a NullPointerException.
Exception in thread "main" java.lang.NullPointerException
at hmi.flipper2.Template.handle_effect(Template.java:116)
at hmi.flipper2.TemplateFile.handle_database(TemplateFile.java:74)
at hmi.flipper2.TemplateFile.handle_section(TemplateFile.java:43)
at hmi.flipper2.TemplateFile.<init>(TemplateFile.java:34)
at hmi.flipper2.TemplateController.addTemplateFile(TemplateController.java:209)
at hmi.flipper2.Main.main(Main.java:39)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.