Exemplo n.º 1
0
        public static string[] GetWords(string word)
        {
            if (string.IsNullOrEmpty(word))
            {
                return(null);
            }
            word = FixNumbers.Fix(word);
            var words   = new List <string>();
            var matches = regex.Matches(word);

            foreach (Match m in matches)
            {
                words.Add(m.Value);
            }
            return(words.ToArray());
        }
Exemplo n.º 2
0
        public static string[] GetWords()
        {
            //TODO: raqamlarni va qisqartirilgan so'zlar bilan ishlash, masalan BMT
            if (string.IsNullOrEmpty(Text))
            {
                return(null);
            }
            Text = Text.Replace("-", " ").Replace("«", "").Replace("»", "");
            Text = FixNumbers.Fix(Text);
            var words   = new List <string>();
            var matches = regex.Matches(Text);

            foreach (Match m in matches)
            {
                words.Add(m.Value);
            }
            return(words.ToArray());
        }