static PTElement ai_parseToTreeWithGuessing(S input) { L words = ai_uncategorizedWordsInSentence(input); //print("Have " + n2(words, "unknown word")); new AI_BottomUpParser1 parser; parser.wordsToCategories = DerivedMap(ai_wordToCategories()); Map> guessMap = new HashMap; temp tempSetThreadLocal(ai_getWordToCategoryWeight_map, guessMap); for (S word : words) { Map map = ai_guessCategoriesForUnknownWord_weighted(word); guessMap.put(word, map); parser.wordsToCategories.put(word, keys(map)); } ret ai_parseBottomUpToTree(parser, input); }