!7 cmodule WatchThisTrickMate > DynPrintLog { record FactCondition(S text, Runnable action) {} start-thread { dm_useLocalMechListCopies(); /*L rules = map wordTokReplacerRuleOnXY(splitAtEmptyLines([[ [heard] you must watch {this trick} => [implied] {this trick} is very good [heard] you must watch {this trick} + [fact] i have watched {this trick} => [say] Thanks, I've seen it already [heard] you must watch {this trick} + [fact] i have not watched {this trick} => [say] Well... I haven't seen it yet, so maybe I should ]]));*/ L rules = ll( WordTokReplacer_es1( "[heard] you must watch {this trick}", "", "[implied] {this trick} is very good"), WordTokReplacer_es1( "[heard] you must watch {this trick}", "", "[say] Thanks, I've seen it already") { run { emit(FactCondition("i have watched {this trick}", r emitOut)); } } ); S s = "you must watch this trick"; pnl(extsToString /*uniquifyMap tok_dropCurlyBrackets*/(iterateHull(func(ExtS s) -> L { listPlusNempties_es( applyAttractors_es(rules, ll(s)), extMap_verbose tok_dropCurlyBrackets(s), extMap_verbose ai_dropFillers1(s), extMap_verbose ai_groupTheAdjectiveNoun(s), extMap_verbose ai_groupSimplestNounPhrases2(s)) }, makeExt(s, type := "heard")))); } }