private async Task <Example> ExtractFileFeatures(Document document, ExternalArgumentsDataset externalArgumentsDataset) { (_, Example example) = await externalArgumentsDataset.AddExample(document); example.SourcePath = document.FilePath; example.Features = example.Features.Trim(); return(example); }
private async Task <Example> ExtractFileFeatures(string filePath, ExternalArgumentsDataset externalArgumentsDataset) { string fileContent = File.ReadAllText(filePath); (_, Example example) = await externalArgumentsDataset.AddExample("", false, fileContent); example.SourcePath = filePath; example.Features = example.Features.Trim(); return(example); }
public async Task <Example> ScanFile(string filePath) { string fileContent = File.ReadAllText(filePath); (_, var example) = await externalArgumentsDataset.AddExample("", false, fileContent); example.SourcePath = filePath; example.Features = example.Features.Trim(); await ClassifyFile(example); return(example); }