def question(commons, original, var): if var == 0 and original[2] is not "like" and original[2] is not "likes": if original[2][-1] == "e": return "Why do you like " + original[2][:-1] + "ing " + original[ 1] + "?" elif original[2][-2:] == "es": return "Why do you like " + original[2][:-2] + "ing " + original[ 1] + "?" else: return "Why do you like " + original[2] + "ing " + original[1] + "?" elif var == 2: return "I know you like " + original[ 1] + ", but what else canyou " + original[2] + "?" elif var == 3: return "Can't you say something else about the " + original[1] + "?" else: rizer = random.randint(0, 3) if rizer == 0: return "oh I found a cool recipe for " + original[ 1] + ". Look at this recipe! " + epi.getFoodLink(original[1]) elif rizer == 1: return "Check out this dish I made with " + original[ 1] + " the other day. " + epi.getFoodLink(original[1]) elif rizer == 2: return "I usually use this recipe with my " + original[ 1] + ". " + epi.getFoodLink( original[1]) + ". You should try it some time." elif rizer == 3: return "I like " + original[ 1] + " too. This is my favorite recipe to go with it! " + epi.getFoodLink( original[1])
def question(commons,original,var): if var == 0 and original[2] is not "like" and original[2] is not "likes": if original[2][-1] == "e": return "Why do you like " + original[2][:-1] + "ing " + original[1] + "?" elif original[2][-2:] == "es": return "Why do you like " + original[2][:-2] + "ing " + original[1] + "?" else: return "Why do you like " + original[2] + "ing " + original[1] + "?" elif var == 2: return "I know you like " + original[1] + ", but what else canyou " + original[2] + "?" elif var == 3: return "Can't you say something else about the " + original[1] + "?" else: rizer = random.randint(0, 3) if rizer == 0: return "oh I found a cool recipe for " + original[1] + ". Look at this recipe! " + epi.getFoodLink(original[1]) elif rizer == 1: return "Check out this dish I made with " + original[1] + " the other day. " + epi.getFoodLink(original[1]) elif rizer == 2: return "I usually use this recipe with my " + original[1] + ". " + epi.getFoodLink(original[1]) + ". You should try it some time." elif rizer == 3: return "I like " + original[1] + " too. This is my favorite recipe to go with it! " + epi.getFoodLink(original[1])
def getSuggestion(sentence): i = random.randint(0,3) if i == 0: return "oh, I found a cool recipe for " + sentence.predicate.core.val + ". Look at this! " + epi.getFoodLink(sentence.predicate.core.val) elif i == 1: return "Check out this dish I made with " + sentence.predicate.core.val + " the other day. " + epi.getFoodLink(sentence.predicate.core.val) elif i == 2: return "I usually use this recipe with my " + sentence.predicate.core.val + ". " + epi.getFoodLink(sentence.predicate.core.val) + ". You should try it some time." elif i == 3: return "I like " + sentence.predicate.core.val + " too. This is my favorite recipe to go with it! " + epi.getFoodLink(sentence.predicate.core.val)
def getSuggestion(sentence): i = random.randint(0, 3) if i == 0: return "oh, I found a cool recipe for " + sentence.predicate.core.val + ". Look at this! " + epi.getFoodLink( sentence.predicate.core.val) elif i == 1: return "Check out this dish I made with " + sentence.predicate.core.val + " the other day. " + epi.getFoodLink( sentence.predicate.core.val) elif i == 2: return "I usually use this recipe with my " + sentence.predicate.core.val + ". " + epi.getFoodLink( sentence.predicate.core.val) + ". You should try it some time." elif i == 3: return "I like " + sentence.predicate.core.val + " too. This is my favorite recipe to go with it! " + epi.getFoodLink( sentence.predicate.core.val)