예제 #1
0
        private static async Task Main(string[] args)
        {
            var builder = new ConfigurationBuilder()
                          .SetBasePath(Directory.GetCurrentDirectory())
                          .AddJsonFile("appsettings.json");

            Configuration = builder.Build();

            Predictor.Train();

            await Label();
        }
예제 #2
0
        private string PredictLabel(Issue issue)
        {
            var corefxIssue = new GitHubIssue
            {
                ID = issue.Number.ToString(),
                Title = issue.Title,
                Description = issue.Body
            };

            var predictedLabel = Predictor.Predict(corefxIssue);

            return predictedLabel;
        }
예제 #3
0
        private async Task <string> PredictLabel(Issue issue)
        {
            var corefxIssue = new GitHubIssue
            {
                ID          = issue.Number.ToString(),
                Title       = issue.Title,
                Description = issue.Body
            };

            var predictedLabel = await Predictor.PredictAsync(corefxIssue);

            return(predictedLabel);
        }
예제 #4
0
        static void Main(string[] args)
        {
            Predictor.Train();

            // Consider only issues with ID older tham minId. To look at all issues in the repo, set minId = 1.
            const int minId   = 1;
            var       labeler = new Labeler(GitHubUserName, GitHubRepoName, GitHubToken);

            labeler.LabelAllNewIssues(minId);

            Console.WriteLine("Labeling completed");
            Console.ReadLine();
        }
예제 #5
0
 private static async Task Train()
 {
     await Predictor.TrainAsync();
 }
예제 #6
0
        private static async Task Main(string[] args)
        {
            await Predictor.TrainAsync();

            await Label();
        }