static public IWordBreaker createBreaker(string lang) { var factory = langToBreakerGuid.TryGetValue(lang, out string guid) ? guidToBreakerFactory[guid] : invariantBreakerFactory; var res = ComHelper.CreateInstance <IWordBreaker>(factory, typeof(IWordBreaker)); bool pfLicense = false; res.Init(true, 1000, out pfLicense); return(res); }
static public IStemmer createStemmer(string lang) { if (!langToStemmerGuid.TryGetValue(lang, out string guid)) { return(null); } var res = ComHelper.CreateInstance <IStemmer>(guidToStemmerFactory[guid], typeof(IStemmer)); bool pfLicense = false; res.Init(1000, out pfLicense); return(res); }