public bool IsStopword(string s) { if (_Stopwords == null) { if (_StopwordsStatus == ResourceStatus.NotAvailable) { return(false); } _Stopwords = LoadWordlist(LanguageResourceType.Stopwords); if (_Stopwords != null) { _StopwordsStatus = ResourceStatus.Loaded; } } // TODO case-insensitive lookup etc. return(_Stopwords.Contains(s /*, SearchOption.CaseInsensitive */)); }
public bool IsAbbreviation(string s) { if (_Abbreviations == null) { if (_AbbreviationsStatus == ResourceStatus.NotAvailable) { return(false); } _Abbreviations = LoadWordlist(LanguageResourceType.Abbreviations); if (_Abbreviations != null) { _AbbreviationsStatus = ResourceStatus.Loaded; } } // TODO case-insensitive lookup etc. return(_Abbreviations.Contains(s)); }