Skip to content

Commit a9f84e1

Browse files
author
Sean Trott
committed
Specializer fixes
1 parent a60b7d6 commit a9f84e1

7 files changed

Lines changed: 7 additions & 5 deletions

File tree

build/compling.core.jar

-2 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
151 Bytes
Binary file not shown.
-25 Bytes
Binary file not shown.

src/main/nluas/language/core_specializer.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,10 @@ def specialize(self, fs):
8080
#else:
8181
#parameters = self.fill_parameters(eventProcess)
8282
#ntuple['parameters'] = [parameters]
83-
#if mood == "wh_question":
84-
# ntuple['return_type'], ntuple['parameters'][0]['specificWh'] = self.get_return_type(parameters)
83+
print(ntuple['eventDescriptor'])
84+
parameters = ntuple['eventDescriptor']['eventProcess']
85+
if mood == "wh_question":
86+
ntuple['return_type'], ntuple['eventDescriptor']['eventProcess']['specificWh'] = self.get_return_type(parameters)
8587

8688
ntuple = self.map_ontologies(ntuple)
8789

@@ -229,7 +231,7 @@ def get_spgValue(self, spg, valueType):
229231
final = {}
230232
value = getattr(spg, valueType)
231233
#goal = spg.goal
232-
if value.type() == "location":
234+
if value.ontological_category.type() == "location":
233235
return {'location': (int(value.xCoord), int(value.xCoord))}
234236
if value.index() == spg.landmark.index():
235237
return {'objectDescriptor': self.get_objectDescriptor(value)}

src/main/nluas/language/user_agent.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,8 @@ def prompt(self):
116116
self.specializer.set_debug()
117117
specialize = False
118118
elif specialize:
119-
if self.check_spelling(msg):
120-
self.process_input(msg)
119+
#if self.check_spelling(msg):
120+
self.process_input(msg)
121121

122122

123123

4 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)