[TeamTalk 282]: [818] trunk/TeamTalk/Resources/Grammar: Migrated bugfix from branches/air/ Resources/Grammar 815-817

tk@edam.speech.cs.cmu.edu tk at edam.speech.cs.cmu.edu
Mon Oct 8 16:53:30 EDT 2007


An HTML attachment was scrubbed...
URL: http://mailman.srv.cs.cmu.edu/pipermail/teamtalk-developers/attachments/20071008/b9965e46/attachment.html
-------------- next part --------------
Deleted: trunk/TeamTalk/Resources/Grammar/DynamicRobotName.class
===================================================================
--- trunk/TeamTalk/Resources/Grammar/DynamicRobotName.class	2007-10-08 18:57:17 UTC (rev 817)
+++ trunk/TeamTalk/Resources/Grammar/DynamicRobotName.class	2007-10-08 20:53:30 UTC (rev 818)
@@ -1,4 +0,0 @@
-	(alphie)
-	(bashful)
-	(clyde)
-	(decker)

Modified: trunk/TeamTalk/Resources/Grammar/TeamTalkTask.gra
===================================================================
--- trunk/TeamTalk/Resources/Grammar/TeamTalkTask.gra	2007-10-08 18:57:17 UTC (rev 817)
+++ trunk/TeamTalk/Resources/Grammar/TeamTalkTask.gra	2007-10-08 20:53:30 UTC (rev 818)
@@ -61,13 +61,9 @@
 
 [HumanSearchCommand]
 	(search *[MapLocation])
+	(search [MoveDirection])
 ;
 
-[MapLocation]
-	(this space)
-	(the area)
-;
-
 [HumanFollowCommand]
 	(*[RobotName] FOLLOW [OBJ-Robot])
 FOLLOW
@@ -77,7 +73,7 @@
 ;
 
 [HumanPauseCommand]
-	(*[RobotName] pause *task)
+	(*[RobotName] pause *tas*herek)
 ;
 
 [HumanContinueCommand]
@@ -100,14 +96,18 @@
 ;
 
 [Number-180-by5]
-#	equalize the relative proportion
-	( %[Number-95-by5]% ) #%%0.54%%
+	( %[Number-95-by5]% ) #%%0.54%%   # equalize the relative proportion
 	( HUNDRED *and %[Number-80-by5]% ) #%%0.46%%
 HUNDRED
 	( a hundred ) 
 	( one hundred ) 
 ;
 
+[Number-over180]
+	(*one hundred *and %[Number-85-95-by5]%) #%%0.1%%
+	(two hundred *and %[Number-95-by5]%) #%%0.5%%
+	(three hundred *and %[Number-60-by5]%) #%%0.4%% 
+;
 
 [TurnDirection]
 	(*PREP SIDE *[AngularQualifier])
@@ -138,7 +138,8 @@
 ;
 
 [AngularQualifier]
-	([Number-180-by5] degrees)
+	([Number-180-by5] degrees) #%%0.667%%
+	([Number-over180] degrees) #%%0.333%%  # can do up to 360 deg's
 ;
 
 
@@ -155,6 +156,18 @@
 	([TeamTalkThreeQuarter] of the way)
 ;
 
+[MapLocation]
+	(this space)
+	(the area)
+	(around *PLACE)
+	(PLACE)
+PLACE
+	(here)
+	(there)
+	(your location)
+;
+
+
 [TeamTalkAll]
 	(all)
 ;
@@ -286,10 +299,10 @@
 #	(yard)
 ;
 
-[HumanGoodbyeCommand]
-	(goodbye)
-	(bye)
-	(mission complete)
+#[HumanGoodbyeCommand]
+#	(goodbye)
+#	(bye)
+#	(mission complete)
 #	(that's it)
 ;
 
@@ -325,12 +338,12 @@
 	(sure)
 	(of course)
 	(correct)
-#	(fine)
 	(perfect)
 	(great)
-#	(wonderful)
 	(acceptable)
 	(good *enough)
+#	(fine)
+#	(wonderful)
 #	(right)
 #	(alright)
 ;
@@ -345,8 +358,8 @@
 	(*no i DONT think so)
 	(nevermind)
 	(not really)
-	(nowhere)
 	(negative)
+#	(nowhere)
 DONT
 	(don't)
 	(do not)

Modified: trunk/TeamTalk/Resources/Grammar/tokenize.pl
===================================================================
--- trunk/TeamTalk/Resources/Grammar/tokenize.pl	2007-10-08 18:57:17 UTC (rev 817)
+++ trunk/TeamTalk/Resources/Grammar/tokenize.pl	2007-10-08 20:53:30 UTC (rev 818)
@@ -22,8 +22,8 @@
 my $epsilon = 0.0001;  # slop factor for probability distribution (10^-4)
 my $fault = 0;
 
-# scan .gra file; make list of classes that need to be processed
-# also collect all terminals to make a wordlist (for lm compilation)
+# scan .gra file; make a list of classes that need to be processed
+# also collect all terminals to make a wordlist (used in lm compilation)
 my %classes = (); my %wordlist = ();
 open(GRA,$grafile) or die "tokenize: $grafile not found!\n$usage\n";
 while (<GRA>) {
@@ -32,27 +32,23 @@
   if ( /\s+\(\s*(.+?)\)\s*/) {  # look only at ()'s
     @toks = split /\s+/, $1;
   } else { next; }
-#print STDERR "$_\n  ->";
   foreach $tok (@toks) {
     $tok =~ s/^\**(.+)/$1/;  # strip off Kleene star
-#    print STDERR " '$tok'";
     if ( $tok =~ /^[A-Z]+/ ) { next; }  # skip macros
-    if ( $tok =~ /%(\[.+?\])%/) { # keep protected net names, keep []'s
+    if ( $tok =~ /%(\[.+?\])%/) { # keep protected net names, with their []'s
+      # insert new ones into class net list, also treat them as "words" for lm
       if ( not defined $classes{$1} ) {
-	print STDERR "tokenize: found $1\n";
 	$classcount++;
+	$classes{$1} = sprintf "C%02d",$classcount;
+	print STDERR "tokenize: found $1 [class: $classes{$1}]\n";
       }
-      $classes{$1} = sprintf "C%02d",$classcount;
       $wordlist{$1} = "c";  # remember type
-#    print STDERR " $1($wordlist{$1})";
-    } elsif ( $tok =~ /^\[.+?\]/ ) { next; }  # other net, ignore
+    } elsif ( $tok =~ /^\[.+?\]/ ) { next; }  # non-class net, ignore
     else {
-      $w = $1; 
+      $w = $1;
       $wordlist{$w} = "w";
-#    print STDERR " {$w}($wordlist{$w})";
     }
   }
-#  print STDERR "\n";
 }
 close(GRA);
 


More information about the TeamTalk-developers mailing list