/// <summary> /// It is used to create new Context (e.g. before saving ContextWrapper object to database). /// </summary> public void InitNewContext(string pattern, AbstractPatternParser parser, AbstractMorfDictionary dict, bool shouldWorkWithTermsForms = false, int tokenFormsMaxNumberForAsterix = 30, Dictionary <string, LinkedList <Expression> > extras = null) { this.ExpressionRawStr = pattern; this.Ctx = new Context(pattern, parser, dict, shouldWorkWithTermsForms, tokenFormsMaxNumberForAsterix, extras); this.ExpressionResStr = this.Ctx.Root.ResStringExpression; }
/// <summary> /// It is used to create real Context object using ExpressionStr. /// </summary> /// <param name="parser"></param> public void InitExistingContext(AbstractPatternParser parser) { this.Ctx = new Context(this.ExpressionResStr, parser); }