Exemplo n.º 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();
        }
Exemplo n.º 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;
        }
Exemplo n.º 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);
        }
Exemplo n.º 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();
        }
Exemplo n.º 5
0
 private static async Task Train()
 {
     await Predictor.TrainAsync();
 }
Exemplo n.º 6
0
        private static async Task Main(string[] args)
        {
            await Predictor.TrainAsync();

            await Label();
        }