package uuseg

  1. Overview
  2. Docs
Unicode text segmentation for OCaml

Install

Dune Dependency

Authors

Maintainers

Sources

uuseg-0.9.0.tbz
md5=186e52fcbd81e35514342dc3bfd10601

Description

Uuseg is an OCaml library for segmenting Unicode text. It implements the locale independent Unicode text segmentation algorithms to detect grapheme cluster, word and sentence boundaries and the Unicode line breaking algorithm to detect line break opportunities.

The library is independent from any IO mechanism or Unicode text data structure and it can process text without a complete in-memory representation.

Uuseg depends on Uucp and optionally on Uutf for support on OCaml UTF-X encoded strings. It is distributed under the BSD3 license.

README

Uuseg — Unicode text segmentation for OCaml

Release 0.9.0

Uuseg is an OCaml library for segmenting Unicode text. It implements the locale independent Unicode text segmentation algorithms to detect grapheme cluster, word and sentence boundaries and the Unicode line breaking algorithm to detect line break opportunities.

The library is independent from any IO mechanism or Unicode text data structure and it can process text without a complete in-memory representation.

Uuseg depends on Uucp and optionally on Uutf for support on OCaml UTF-X encoded strings. It is distributed under the BSD3 license.

Home page: http://erratique.ch/software/uuseg
Contact: Daniel Bünzli <daniel.buenzl i@erratique.ch>

Installation

Uuseg can be installed with opam:

opam install uuseg
opam install uutf uuseg # for support on OCaml UTF-X encoded strings

If you don't use opam consult the opam file for build instructions.

Documentation

The documentation and API reference is automatically generated by ocamldoc from the interfaces. It can be consulted online and there is a generated version in the doc directory of the distribution.

Sample programs

If you installed Uuseg with opam sample programs are located in the directory opam config var uuseg:doc.

In the distribution sample programs are located in the test directory of the distribution. They can be built with:

ocamlbuild -use-ocamlfind test/tests.otarget

The resulting binaries are in _build/test.

  • test.native tests the library, nothing should fail.

  • usegtrip.native inputs Unicode text on stdin and rewrites segments on stdout. Invoke with -help for more information Depends on Uutf and Cmdliner.

Dependencies (4)

  1. ocamlbuild build
  2. uucp >= "1.0.0" & < "2.0.0"
  3. ocamlfind
  4. ocaml >= "4.01.0"

Dev Dependencies

None

Used by (5)

  1. fuzzy_compare
  2. inquire = "0.2.1"
  3. notty < "0.2.0"
  4. slug
  5. zed >= "3.2.0"

Conflicts (1)

  1. uutf != "0.9.4"