Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/richard-degenne/ocaml-textrazor
An OCaml wrapper for the TextRazor API.
https://github.com/richard-degenne/ocaml-textrazor
nlp ocaml textrazor
Last synced: about 2 months ago
JSON representation
An OCaml wrapper for the TextRazor API.
- Host: GitHub
- URL: https://github.com/richard-degenne/ocaml-textrazor
- Owner: Richard-Degenne
- License: other
- Created: 2019-03-15T11:05:07.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2022-06-05T13:26:56.000Z (over 2 years ago)
- Last Synced: 2023-08-08T07:31:31.133Z (over 1 year ago)
- Topics: nlp, ocaml, textrazor
- Language: OCaml
- Homepage: https://cloud.icescrum.com/p/OCTR
- Size: 31.3 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# OCaml TextRazor [![](https://travis-ci.org/Richard-Degenne/ocaml-textrazor.svg?branch=master)](https://travis-ci.org/Richard-Degenne/ocaml-textrazor)
An OCaml wrapper for the TextRazor API.
# Installation
```sh
opam install textrazor
```# Usage
## Configuration```ocaml
open Textrazorlet client = Client.create "api_key"
(* Optional configuration *)
let client = Client.create ~use_eu_endpoint:false ~secure:true "api_key"
```## Analysis
Send either a text or a publicly available URL to the analysis endpoint.
```ocaml
open Textrazor(* Analyze a text *)
let analysis = Analysis.post (`Text "Text to analyze") client(* Analyze a text by public URL *)
let analysis =
Analysis.post (`Uri (Uri.of_string "https://www.example.com/sample.txt")) c
```Use `Analysis.Options` to customize the analysis.
```ocaml
open Textrazorlet analysis =
let options = Analysis.Options.{default with field = value} in
Analysis.post (`Text "Text to analyze") ~options client
```## Account
Get information about your Textrazor account.
```ocaml
open Textrazorlet account = Account.get client
```# 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](https://github.com/Richard-Degenne/ocaml-textrazor/pulls).