Beispiel #1
0
 private void ResetAll()
 {
     SegTagItems.Clear();
     NamedEntityItems.Clear();
     chartItems.Clear();
     sliderClassify.Value = sliderTencentClassify.Value = 0;
     textSummary.Text     = "";
     KeywordsItems.Clear();
     SuggestItems.Clear();
 }
Beispiel #2
0
        private async Task OnKeywords()
        {
            List <string> list = await BosonAIHelper.GetKeywords(textInput.Text.Trim());

            if (list != null && list.Count > 0)
            {
                var brush = (SolidColorBrush)Application.Current.Resources["SystemControlHighlightListAccentLowBrush"];

                for (int i = 0; i <= list.Count - 1; i++)
                {
                    string[] arr    = list[i].Split(',');
                    int      weight = Convert.ToInt32(Convert.ToDouble(arr[0]) * 100);

                    NLPWord nlp = new NLPWord
                    {
                        word = arr[1] + " (" + weight + ")",
                        //width = resBosonSegTag.word[i].Length * 20,
                        bgcolor = "#FFCB99"//brush.Color.ToString()
                    };
                    KeywordsItems.Add(nlp);
                }
            }
        }