//public static SmartHackDbContext _context; public static async Task ExecuteAsync(SmartHackDbContext _context) { var companies = await _context.Companies.Include(x => x.Newses).ToListAsync(); foreach (var company in companies) { var news = company.Newses.OrderByDescending(x => x.Time).FirstOrDefault(); if (news != null) { var newsType = ClassifierLearner.Clasify(news.Content); AppNaiveBayes.learnNaiveBayes(company.Percent, newsType, company.Id); } var result = AppNaiveBayes.getNaiveBayesResult("Positive", companies.FirstOrDefault().Id); var result2 = result; } }
public Seeder(SmartHackDbContext dbContext) { _context = dbContext; }
public ValuesController(SmartHackDbContext context) { _context = context; }
public CompaniesController(SmartHackDbContext context) { _context = context; }
public NewsController(SmartHackDbContext context) { _context = context; }