Exemplo n.º 1
0
 public CognitiveLaunchController(
     IVisionService visionService,
     IAutoSuggestService autoSuggestService,
     IImageSearchService imageSearchService,
     ISpellCheckService spellCheckService,
     IWebSearchService webSearchService,
     INewsSearchService newsSearchService,
     IVideoSearchService videoSearchService,
     IVideoService videoService,
     IEmotionService emotionService,
     IFaceService faceService,
     ILinguisticService linguisticService,
     ISentimentService sentimentService,
     IEntityLinkingService entityLinkingService,
     ILanguageService languageService)
 {
     VisionService        = visionService;
     AutoSuggestService   = autoSuggestService;
     ImageSearchService   = imageSearchService;
     SpellCheckService    = spellCheckService;
     WebSearchService     = webSearchService;
     NewsSearchService    = newsSearchService;
     VideoSearchService   = videoSearchService;
     VideoService         = videoService;
     EmotionService       = emotionService;
     FaceService          = faceService;
     LinguisticService    = linguisticService;
     SentimentService     = sentimentService;
     EntityLinkingService = entityLinkingService;
     LanguageService      = languageService;
 }
Exemplo n.º 2
0
 public Bot(ISentimentService sentimentService, StatisticWrapper statisticWrapper, string token)
 {
     this.sentimentService = sentimentService;
     this.statisticWrapper = statisticWrapper;
     botClient             = new TelegramBotClient(token);
     botClient.OnMessage  += BotOnMessage;
     botClient.OnUpdate   += BotOnUpdate;
 }
Exemplo n.º 3
0
 public StatisticsService(
     ITwitterAdapter twitterAdapter,
     IGeneralizationService generalizationService,
     ISentimentService sentimentService,
     IMemoryCache cache)
 {
     _twitterAdapter        = twitterAdapter;
     _generalizationService = generalizationService;
     _sentimentService      = sentimentService;
     _cache = cache;
 }
        public TwitterService(
            ILogger <TwitterService <T> > logger,
            IHubContext <T, ITwitterClient> hubContext,
            ISentimentService sentimentService,
            IFilteredStream filteredStream)
        {
            _logger           = logger;
            _hubContext       = hubContext;
            _sentimentService = sentimentService;
            _filteredStream   = filteredStream;

            InitializeStream();
        }
Exemplo n.º 5
0
        public Task <float> Get(string message, [FromServices] ISentimentService sentimentService)
        {
            var cacheKey = GetHash(message);
            var value    = _cache.Get(cacheKey);

            if (value != null)
            {
                var data = Encoding.UTF8.GetString(value);
                if (!string.IsNullOrEmpty(data))
                {
                    return(Task.FromResult(float.Parse(data)));
                }
            }

            return(sentimentService.GetSentiment(message));
        }
Exemplo n.º 6
0
 public PostCreationService(
     IUnitOfWorkFactory unitOfWorkFactory,
     IFileCreationService fileCreationService,
     IUserService userService,
     IScoreService scoreService,
     IApiResultService apiResultService,
     IMapper mapper,
     ISentimentService sentimentService)
 {
     this.unitOfWorkFactory   = unitOfWorkFactory;
     this.fileCreationService = fileCreationService;
     this.userService         = userService;
     this.scoreService        = scoreService;
     this.apiResultService    = apiResultService;
     this.mapper           = mapper;
     this.sentimentService = sentimentService;
 }
        public TwitterService(
            ILogger <TwitterService <T> > logger,
            IHubContext <T, IBTwitterClient> hubContext,
            ISentimentService sentimentService,
            IFilteredStream filteredStream,
            IConfiguration configuration)
        {
            _logger           = logger;
            _hubContext       = hubContext;
            _sentimentService = sentimentService;
            _filteredStream   = filteredStream;

            if (!string.IsNullOrEmpty(configuration["Twitter:Tracks"]))
            {
                _tracks.UnionWith(configuration["Twitter:Tracks"].Split(";", StringSplitOptions.RemoveEmptyEntries));
            }

            InitializeStream();

            AddTracks(_tracks);
        }
Exemplo n.º 8
0
 public Bot(ISentimentService sentimentService, string token)
 {
     this.sentimentService     = sentimentService;
     this.botClient            = new TelegramBotClient(token);
     this.botClient.OnMessage += this.BotOnMessage;
 }
Exemplo n.º 9
0
 public Sentiment([NotNull] Configuration config, DiscordSocketClient client, ISentimentService sentiment)
 {
     _client    = client;
     _sentiment = sentiment;
     _config    = config.SentimentReactions;
 }
Exemplo n.º 10
0
 public TwitterService(ISentimentService sentimentService,
                       ICommandDispatcher commandDispatcher)
 {
     _sentimentService  = sentimentService;
     _commandDispatcher = commandDispatcher;
 }
Exemplo n.º 11
0
 public FunRetroSentimentService(ISentimentService sentimentService)
 {
     _sentimentService      = sentimentService;
     _retroBoardCsvProvider = new RetroBoardCsvProvider();
 }
 public SentimentRequestHandler(ISentimentService <SourceData, Prediction> sentimentService)
 {
     _sentimentService = sentimentService;
 }
Exemplo n.º 13
0
 public FileUploadApiController(IHostingEnvironment hostingEnvironment, ISentimentService sentimentService)
 {
     _hostingEnvironment = hostingEnvironment;
     _sentimentService   = sentimentService;
 }
 public SentimentController(ISentimentService sentimentService)
 {
     _setimentService = sentimentService;
 }