!7 static L guessCategories = ll("", ""); p-exp { S word = "GKHJGLF"; S sentence = "What is " + word + "?"; PTElement tree = ai_parseBottomUpToTree(word); print(tree); assertNull(tree); L words = ai_uncategorizedWordsInSentence(sentence); print("Have " + n2(words, "unknown word")); for (L combo : allCombinations(rep(guessCategories, l(words)))) { new AI_BottomUpParser1 parser; parser.wordsToCategories = cloneMap(ai_wordToCategories()); L zipped = zipTwoListsToPairs(words, combo); for (PairS p : zipped) parser.wordsToCategories.put(p.a, p.b); PTElement tree2 = ai_parseBottomUpToTree(word); print(zipped + " => " + tree2); } }