package textrazor

  1. Overview
  2. Docs
type t = {
  1. api_key : string;
  2. configuration : Configuration.t;
}

Data structure for clients.

val create : ?configuration:Configuration.t -> string -> t

Creates a new client from its API key.

By default, uses Configuration.create () as its configuration.

val account : t -> (Account.t, string) Stdlib.result

Fetches information about the client's TextRazor account.

val analyze : [ `Text of string | `Uri of Uri.t ] -> ?options:Analysis.Options.t -> t -> (Analysis.t, string) Stdlib.result

Analyzes a text using TextRazor.

Use (`Text "text") to send TextRazor raw text, or (`Uri uri) to send a publicly available URL containing the document to be analyzed.

By default, uses Analysis.Options.default as analysis options.

OCaml

Innovation. Community. Security.