Skip to content

Commit

Permalink
Merge pull request EllaVator#74 from LauraRF/master
Browse files Browse the repository at this point in the history
there was a mistake in the Domain file and the Module related to the bathroom floor, fixed in this version
  • Loading branch information
psibre committed Sep 2, 2015
2 parents 9663738 + d3e2edb commit 21de9ce
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 33 deletions.
6 changes: 1 addition & 5 deletions src/main/java/ModuleElla.java
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,6 @@ public void trigger(DialogueState state, Collection<String> updatedVars) {
System.out.println("EllaModule: go to floor: " + togoFloor);
changePosition(togoFloor);
}
//the restrooms have to be done seperately, because the command is not "Movefloor("
if (actionValue.equals("restrooms")) {
changePosition("restrooms");
}

}
}
Expand All @@ -109,7 +105,7 @@ private void changePosition(String togoFloor) {
if (togoFloor.equals("zero")) {
newFloor = 0;
}
else if (togoFloor.equals("restrooms")) {
else if (togoFloor.equals("zero point five")) {
newFloor = 1;
}
else if (togoFloor.equals("one")) {
Expand Down
43 changes: 15 additions & 28 deletions src/main/resources/Domain_Opendial_Ella.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@
<model trigger="u_u">

<rule>
<case>

<!-- to avoid confusion in this file the rules we are not currently using / do not currently know how to handle, such as the "up" and "down" commands are commented out at the moment. We can put them in again once we know how to deal with them -->


<!-- <case>
<condition operator="or">
<if var="u_u" value="no" relation="contains" />
<if var="u_u" value="didn't * mean * that" relation="contains" />
Expand All @@ -26,6 +30,7 @@
<set var="a_u" value="nope" />
</effect>
</case>
<case>
<condition operator="or">
<if var="u_u" value="(go |move)? up" relation="contains" />
Expand All @@ -42,7 +47,7 @@
<effect prob="1">
<set var="a_u" value="Request(down one floor)" />
</effect>
</case>
</case> -->
<case>
<condition operator="or">
<if var="u_u" value="(go * to | move *to)* floor * zero" relation="contains" />
Expand Down Expand Up @@ -167,13 +172,13 @@
<if var="u_u" value="restrooms" relation="contains"/>
</condition>
<effect prob="1">
<set var="a_u" value="restrooms" />
<set var="a_u" value="Requestfloor(zero point five)" />
</effect>
</case>

<case>
<condition operator="or">
<if var="u_u" value="Hi" relation="contains" />
<if var="u_u" value="hi" relation="contains" />
<if var="u_u" value="hello" relation="contains" />
</condition>
<effect prob="1">
Expand All @@ -186,7 +191,7 @@

<!-- Action selection model -->
<model trigger="a_u">
<rule id="grounding">
<!-- <rule id="grounding">
<case>
<condition>
<if var="a_u" value="nope" />
Expand All @@ -206,7 +211,8 @@
<set var="a_m" value="Move({X})" />
</effect>
</case>
</rule>
</rule>
-->


<rule id="movetofloor">
Expand All @@ -219,17 +225,6 @@
</effect>
</case>
</rule>

<rule id="restroomfloor">
<case>
<condition>
<if var="a_u" value="restrooms" />
</condition>
<effect util="1">
<set var="a_m" value="restrooms" />
</effect>
</case>
</rule>


<rule id="greeting">
Expand Down Expand Up @@ -260,7 +255,7 @@
<!-- NLG model -->
<model trigger="a_m">
<rule>
<case>
<!-- <case>
<condition>
<if var="a_m" value="Move({X})" />
</condition>
Expand All @@ -277,7 +272,7 @@
<effect util="1">
<set var="u_m" value= "I'm not {last}." />
</effect>
</case>
</case> -->

<case>
<condition>
Expand All @@ -288,15 +283,7 @@
<set var="u_m" value="I will take you to floor {X}" />
</effect>
</case>
<case>
<condition>
<if var="a_m" value="restrooms" />
</condition>
<effect util="1">
<set var="last" value="not taking you to floor zero dot five" />
<set var="u_m" value="I'm moving to floor zero dot five, where the restrooms are located" />
</effect>
</case>


<case>
<condition>
Expand Down

0 comments on commit 21de9ce

Please sign in to comment.