Git Product home page Git Product logo

ocaml-textrazor's Introduction

OCaml TextRazor  

An OCaml wrapper for the TextRazor API.

Installation

opam install textrazor

Usage

Configuration

open Textrazor

let 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.

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.

open Textrazor

let 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.

open Textrazor

let 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.

ocaml-textrazor's People

Contributors

leonidas-from-xiv avatar richard-degenne avatar

Watchers

 avatar  avatar

ocaml-textrazor's Issues

Add support for the dictionary API

Here is TextRazor's documentation for the dictionary API endpoints.

  • Dictionary listing
  • Dictionary creation
  • Dictionary deletion
  • Dictionary entry creation
  • Dictionary entry deletion
  • Dictionary entry listing
    • Pagination
  • Dictionary support in the analysis endpoint

Set up unit tests

Alcotest is set up as a test dependency but no tests have been written so far.

Add support for the Classifier API

Here is TextRazor's documentation for the classifier API endpoints.

  • Classifier creation
    • CSV upload
  • Classifier deletion
  • Category deletion
  • Category listing
    • Pagination

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.