package camomile

  1. Overview
  2. Docs
A Unicode library

Install

Dune Dependency

Authors

Maintainers

Sources

camomile-1.0.2.tbz
sha256=f0a419b0affc36500f83b086ffaa36c545560cee5d57e84b729e8f851b3d1632
sha512=7586422e68779476206027c6ebbe19b677fbe459153221f7c952c7fae374c5c8232249cb76fdb1f482069707aa1580be827cd39693906142988268b7f0e7f6d0

Description

Camomile is a Unicode library for OCaml. Camomile provides Unicode character type, UTF-8, UTF-16, UTF-32 strings, conversion to/from about 200 encodings, collation and locale-sensitive case mappings, and more. The library is currently designed for Unicode Standard 3.2.

Published: 12 Aug 2019

README

Camomile

This is the version 1.0.1 release of Camomile library package. Camomile is a Unicode library for ocaml. Camomile provides Unicode character type, UTF-8, UTF-16, UTF-32 strings, conversion to/from about 200 encodings, collation and locale-sensitive case mappings, and more.

The library is licensed under LGPL-2 with the common linking exception given to OCaml packages. See LICENSE.md

Installation

To build and install Camomile, you need OCaml >= 4.02.3 dune >= 1.0.0

To build the library, on the top directory do

$ dune build
$ dune install

Data files are put under /usr/local/share/camomile by default. The default can be overridden by running

$ ocaml configure.ml --share=XXXX

then data files are placed under XXXX/camomile.

You can uninstall the library by

$ dune uninstall

Using libraries

Wrapping

camomile.cma contains three top-level modules CamomileLibrary, CamomileLibraryDefault, CamomileLibraryDyn. Difference of three modules is explained below.

camomileLibrary.cma contains CamomileLibrary alone. It is useful if you want to dynamically load Camomile, since loading CamomileLibraryDefault, CamomileLibraryDyn causes side effects such as loading data files which could fail.

Configuration

Camomile requires runtime configuration. Currently, you have to pass the location of data files to Camomile. In the future, more configuration variables would be required.

Camomile's idea of configuration is "configuration by functors". Modules which require configuration become functors parametrized by a module which contains configuration variables. CamomileLibrary.ConfigInt.Type specifies the module type of configuration parameters. You can pass the configuration module to individual modules' Make (as UCol.Make) or Configure functors (as CharEncoding.Configure), or pass it to the whole-in-one functor CamomileLibrary.Make and obtain configured modules.

Camomile provides two top-level modules CamomileLibraryDefault and CamomileLibraryDyn which contains modules already configured. CamomileLibraryDefault is configured by default values determined by configure. Therefore it is suitable to use if you are using Camomile locally installed from the source. CamomileLibraryDyn is deprecated and just an alias to CamomileLibraryDefault.

Individual modules.

See CamomileLibrary.mli file.

Development

See https://github.com/yoriyuki/Camomile

Author

You can contact the author by yoriyuki.y@gmail.com

Acknowledgment

So many people are contributed to Camomile. See https://github.com/yoriyuki/Camomile/graphs/contributors

Before GitHub becomes into existence...

  • Peter Jolly provided CP932 conversion table.

  • Kawakami Shigenobu contributed findlib support.

  • Pierre Chambart contributed StringPrep module.

  • Stanisław T. Findeisen pointed out the balancing bug of AVL-trees.

  • Sylvain Le Gall provided dynamic configuration module ConfigDyn.ml.

Many people contributed bug fixes.

Dependencies (2)

  1. ocaml >= "4.02.3" & < "5.0"
  2. dune >= "1.11"

Dev Dependencies

None

Used by (20)

  1. batteries < "2.0.0"
  2. catala >= "0.3.0" & < "0.7.0"
  3. charInfo_width < "2.0.0"
  4. gasoline
  5. gettext < "0.4.1"
  6. gettext-camomile
  7. gufo
  8. headache >= "1.04" & < "1.07"
  9. javalib >= "2.3.5" & < "3.1"
  10. lambda-term >= "1.12.0" & < "3.3.0"
  11. liquidsoap >= "1.3.3" & < "2.2.0"
  12. mecab
  13. mmseg < "transition"
  14. patoline < "0.2"
  15. skkserv-lite
  16. sociaml-vcard
  17. soupault >= "4.0.1" & < "4.5.0"
  18. utop >= "2.0.2" & < "2.10.0"
  19. wseg
  20. zed < "3.2.0"

Conflicts

None

OCaml

Innovation. Community. Security.