An OCaml wrapper for the TextRazor API.
opam install textrazoropen Textrazor
let client = Client.create "api_key"You can set additional options using Configuration:
open Textrazor
let client =
let configuration =
Configuration.create ~use_eu_endpoint:true ~secure:false ()
in
Client.create ~configuration "api_key"Send either a text or a publicly available URL to the analysis endpoint.
open Textrazor
(* Analyze a text *)
let result = Client.analyze (`Text "Text to analyze") client
(* Analyze a text by URL *)
let result =
Client.analyze (`Uri (Uri.of_string "https://www.example.com/sample.txt")) cUse Analysis.Options to customize the analysis.
open Textrazor
let result =
let options = Analysis.Options.{default with field = value} in
Client.analyze (`Text "Text to analyze") ~options clientGet information about your Textrazor account.
open Textrazor
let result = Client.account cgit checkout -b my-new-feature);git commit -am 'Add some feature');git push origin my-new-feature);