Fix expression "qual è"

This commit is contained in:
Michele Guerini Rocco 2015-04-27 19:01:16 +02:00
parent 644237cf7d
commit 351c6e4b24

View File

@ -55,7 +55,7 @@ module.exports = (robot) ->
robot.respond /memory-dump/i, (res) ->
res.send JSON.stringify robot.brain.get('memoria')
robot.respond /(?:che )?(?:(?:(?:(?:(cos|qual|quand)\'è)|(?:chi (sono|è)?)))|(?:quali|cosa) sono) ([^?]+)(?:\?)?/i, (res) ->
robot.respond /(?:che )?(?:(?:(?:(?:(cos|qual|quand)(?:\'| )?è)|(?:chi (sono|è)?)))|(?:quali|cosa) sono) ([^?]+)(?:\?)?/i, (res) ->
query = undefined
# Estrazione query (quand,cos,qual,chi...)
if res.match[2] then query = res.match[2] or res.match[1]