Exemplo n.º 1
0
        public TextViewModel(IMediator mediator)
        {
            _mediator             = mediator;
            _sentimentAnalysis    = TextRequestGenerator.Sentiment(Text, Language, TextApiVersion);
            _keyPhrases           = TextRequestGenerator.KeyPhrases(Text, Language, TextApiVersion);
            _entities             = TextRequestGenerator.Entities(Text, Language, TextApiVersion);
            _detectLanguage       = TextRequestGenerator.DetectLanguage(Text, Language, TextApiVersion);
            _entityLinking        = TextRequestGenerator.EntityLinking(Text, Language);
            _entityRecognitionPii = TextRequestGenerator.EntityRecognitionPii(Text, Language);

            Requests.Add(_sentimentAnalysis);
            Requests.Add(_keyPhrases);
            Requests.Add(_entities);
            Requests.Add(_detectLanguage);
        }
Exemplo n.º 2
0
 public async Task KeyPhrasesAnalysis()
 {
     _keyPhrases   = TextRequestGenerator.KeyPhrases(Text, Language, TextApiVersion);
     KeyPhraseJson = await MakeRequest <string>(_keyPhrases).ConfigureAwait(false);
 }