//----------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------- public IStringPartManager Filter(IStringPartManager RawManager) { var parts = RawManager.RawDataParts; bool containsVowel = false; char c; for (int i = 0; i < parts.Count(); i++) { string part = parts[i]; if (1 < part.Length || part.Length < 5) { // kontrolliere ob konsonanten enthalten sind containsVowel = false; for (int j = 0; j < part.Length; j++) { c = part[j]; if ( (c > 47 && c < 58) || vowels.Contains(c) ) { containsVowel = true; break; } } if (!containsVowel) { parts.RemoveAt(i); i--; } } } RawManager.RawDataParts = parts; return RawManager; }
public IStringPartManager Filter(IStringPartManager ToFilter) { for (int i = 0; i < ToFilter.RawDataParts.Count; i++) { if (Blacklist.Contains(ToFilter.RawDataParts[i])) { ToFilter.RawDataParts.RemoveAt(i); i--; } } return ToFilter; }
//----------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------- public IStringPartManager Filter(IStringPartManager RawManager) { var parts = RawManager.RawDataParts; for (int i = 0; i < parts.Count; i++) { if (Regex.IsMatch(parts[i], isInternetstuff, RegexOptions.IgnoreCase)) { parts.RemoveAt(i); i--; } } RawManager.RawDataParts = parts; RawManager.SplitByDot = true; return RawManager; }
public IStringPartManager Filter(IStringPartManager ToFilter) { string rawdata = ToFilter.Join(' '); int pos = 0; foreach (string clean in StepUp) { pos = rawdata.IndexOf(clean); if (pos >= 0) { rawdata = rawdata.Remove(pos, clean.Length); } } ToFilter.RawDataParts = ToFilter.Split(rawdata); return ToFilter; }