/// <summary> /// Construct a request for the online service to annotate or classify a document provided as part of the request. /// </summary> /// <param name="document">the content to process.</param> /// <param name="type">the MIME type that the service should use to parse the document.</param> public ServiceRequest(String document, SupportedMimeType type) { this.Document = document; this.DocumentType = type.ToStringValue(); this.ImageTagging = false; this.ImageCategorization = false; }
/// <summary> /// Construct a request for the online service to annotate or classify a document downloaded directly from a remote URL /// </summary> /// <param name="documentUrl">the URL from which the document should be downloaded</param> /// <param name="type">the MIME type that the service should use to parse the document</param> /// <param name="imageTagging">The boolean flag to allow/deny image tagging of the document</param> /// <param name="imageCategorization">The boolean flag to allow/deny image categorization of the document</param> public ServiceRequest(Uri documentUrl, SupportedMimeType type, bool imageTagging, bool imageCategorization) { this.DocumentUrl = documentUrl.ToString(); this.DocumentType = type.ToStringValue(); this.ImageTagging = imageTagging; this.ImageCategorization = imageCategorization; }
/// <summary> /// Construct a request for the online service to annotate a document /// it downloads directly from a remote URL. /// </summary> /// <param name="documentUrl">the URL from which the document should be /// downloaded. This must be accessible to the service so it /// must not require authentication credentials etc. (but it /// may be, for example, a pre-signed Amazon S3 URL).</param> /// <param name="type">the MIME type that the service should use to parse the /// document.</param> /// <param name="annotationSelectors">annotations to return. Leave as /// <code>null</code> to use the default selectors recommended /// by the pipeline provider.</param> public ServiceRequest(Uri documentUrl, SupportedMimeType type, List <AnnotationSelector> annotationSelectors) { this.documentUrl = documentUrl.ToString(); this.documentType = type.ToStringValue(); if (annotationSelectors != null) { this.annotationSelectors = new List <string>(); foreach (AnnotationSelector aSel in annotationSelectors) { this.annotationSelectors.Add(aSel.ToString()); } } }
/// <summary> /// Construct a request for the online service to annotate a document /// provided as part of the request. /// </summary> /// <param name="document">the content to process.</param> /// <param name="type">the MIME type that the service should use to parse the document.</param> /// <param name="annotationSelectors">annotations to return. Leave as <code>null</code> to use the default selectors recommended by the pipeline provider.</param> public ServiceRequest(String document, SupportedMimeType type, List<AnnotationSelector> annotationSelectors) { this.document = document; this.documentType = type.ToStringValue(); if (annotationSelectors != null) { this.annotationSelectors = new List<String>(); foreach (AnnotationSelector aSel in annotationSelectors) { this.annotationSelectors.Add(aSel.ToString()); } } }
/// <summary> /// Construct a request for the online service to annotate or classify a document downloaded directly from a remote URL /// </summary> /// <param name="documentUrl">the URL from which the document should be /// downloaded. This must be accessible to the service so it /// must not require authentication credentials etc. (but it /// may be, for example, a pre-signed Amazon S3 URL).</param> /// <param name="type">the MIME type that the service should use to parse the /// document.</param> public ServiceRequest(Uri documentUrl, SupportedMimeType type) { this.documentUrl = documentUrl.ToString(); this.documentType = type.ToStringValue(); }
/// <summary> /// Construct a request for the online service to annotate or classify a document provided as part of the request. /// </summary> /// <param name="document">the content to process.</param> /// <param name="type">the MIME type that the service should use to parse the document.</param> public ServiceRequest(String document, SupportedMimeType type) { this.Document = document; this.DocumentType = type.ToStringValue(); }