public SampleController(INlpRepository <Model> repo, IModelRepository <Model> modelrepo, ISummarizer summarizer, IStemmer stemmer) { _repo = repo ?? throw new NlpException(HttpStatusCode.InternalServerError, nameof(repo)); _modelrepo = modelrepo ?? throw new NlpException(HttpStatusCode.InternalServerError, nameof(modelrepo)); _summarizer = summarizer ?? throw new NlpException(HttpStatusCode.InternalServerError, nameof(summarizer)); _stemmer = stemmer ?? throw new NlpException(HttpStatusCode.InternalServerError, nameof(stemmer)); }
public NlpQuery(INlpRepository <VanguardModel> repo) { Field <VanguardModelType>( "vanguard_model", resolve: context => repo.model ); Field <ListGraphType <CategoryType> >( "categorize", arguments: new QueryArguments( new QueryArgument <IdGraphType> { Name = "content" } ), resolve: context => { var content = context.GetArgument <string>("content"); return(repo.Categorize(content)); }); }
public NlpController(INlpRepository <Model> repo, IModelRepository <Model> modelrepo) { _repo = repo ?? throw new NlpException(HttpStatusCode.InternalServerError, nameof(repo)); _modelrepo = modelrepo ?? throw new NlpException(HttpStatusCode.InternalServerError, nameof(modelrepo)); }
public NlpRepositoryModelTests() { _repo = new Helper <INlpRepository <Model> >().GetService(); }
public TestController(INlpRepository <TestModel> repo) { _repo = repo ?? throw new NlpException(HttpStatusCode.InternalServerError, nameof(repo)); }
public NlpRepositoryTests() { this.repo = new NlpRepository <TestModel>(GetTestModel(), new NullLogger <NlpRepository <TestModel> >()); }
public VanguardController(INlpRepository <VanguardModel> repo) { this.repo = repo; }