!752 !include #1004810 // Concepts etc. sclass UserBelief extends Concept { S beliefText; // Text renderding of belief new Ref beliefConcept; // Concept of belief new Ref userLine; // When he said that bool negative; // User does NOT believe this bool invalidated; // true = we rejected this stuff later *() {} *(UserLine ul) { userLine.set(ul); } } p { persistConcepts(); action(); } static void processNewUserLine(UserLine ul) { S s = ul.text(); UserBelief belief = findBackRef(ul, UserBelief.class); if (belief == null) parseBeliefUtterance(ul); } static void parseBeliefUtterance(UserLine ul) { S s = ul.s(); new Matches m; if (jmatchStart("I think that", s, m)) { UserBelief ub = new UserBelief(ul); ub.beliefText = m.rest(); } else if (jmatchStart("I don't think that", s, m)) { UserBelief ub = new UserBelief(ul); ub.negative = true; ub.beliefText = m.rest(); } } static void dbActions { }