예제 #1
0
        //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;
            }
        }
예제 #2
0
 public Seeder(SmartHackDbContext dbContext)
 {
     _context = dbContext;
 }
예제 #3
0
 public ValuesController(SmartHackDbContext context)
 {
     _context = context;
 }
예제 #4
0
 public CompaniesController(SmartHackDbContext context)
 {
     _context = context;
 }
예제 #5
0
 public NewsController(SmartHackDbContext context)
 {
     _context = context;
 }