internal static void Get(ref string text, string recognizeText, Dictionary <string, string> dictionary, ObservableCollection <DictionaryPasswordElement> obserColl) { var e = RecognizeMeaningWord.Get(recognizeText, dictionary); WriteText.Write(recognizeText, e, obserColl); text = text.Remove(0, recognizeText.Length + 1); }
internal static void Get(ref string text, Dictionary <string, string> dictionary, ObservableCollection <DictionaryPasswordElement> obserColl) { //wykrycie odwołania i nadanie opisu var regex = new Regex(@"\/+ \w+|\/+\w+"); var match = regex.Match(text); if (match.Success) { var e = RecognizeMeaningWord.Get(match.Value, dictionary); WriteText.Write(match.Value, e, obserColl); text = text.Remove(0, match.Length + 1); } }
internal static void Get(string text, Dictionary <string, string> dictionary, ObservableCollection <DictionaryPasswordElement> obserColl) { text = text.Replace('«', ' ').TrimEnd(); var regex = new Regex(@"odm. jak \D "); var match = regex.Match(text); var splitText = text.Split(' '); for (var i = 0; i < splitText.Length; i++) { switch (splitText[i]) { case "": case ":": case ".": case "'": break; case "odm.": { i = +3; var e = RecognizeMeaningWord.Get(match.Value.Trim() , dictionary); WriteText.Write(match.Value.Trim(), e, obserColl); break; } case "–": case "-": WriteText.Write(splitText[i] + " " + splitText[i + 1] , "definiendum", obserColl); i += 1; break; default: { var e = RecognizeMeaningWord.Get(splitText[i].Replace(",", ""), dictionary); WriteText.Write(splitText[i].Replace(",", ""), e, obserColl); break; } } } }