package textrazor
An OCaml wrapper for the TextRazor API
Install
Dune Dependency
Authors
Maintainers
Sources
0.1.tar.gz
md5=7a76066f5199329446361a179f680778
sha512=a6659feb34710030e4c51e6028146e795bdd305a7861144b35ef6d1c6669812bff9c8979d2604fd971d631acdddc45ea5664f7a49961cd689a6919c84a1e7704
Description
An OCaml wrapper for the TextRazor API
Published: 19 Mar 2019
README
OCaml TextRazor
An OCaml wrapper for the TextRazor API.
Installation
opam install textrazor
Usage
Configuration
open 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"
Analysis
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")) c
Use 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 client
Account
Get information about your Textrazor account.
open Textrazor
let result = Client.account c
Contributing
Fork the project;
Create your feature branch (
git checkout -b my-new-feature
);Commit your changes (
git commit -am 'Add some feature'
);Push to the branch (
git push origin my-new-feature
);Create a new pull request.
Dependencies (8)
-
dune
>= "1.6"
- ppx_deriving_yojson
-
yojson
< "2.0.0"
- cohttp-lwt-unix
- lwt_ppx
- lwt_ssl
- uri
-
ocaml
>= "4.04.0"
Used by
None
Conflicts
None
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page