From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: ** X-Spam-Status: No, score=2.5 required=5.0 tests=AWL,DNS_FROM_RFC_POST, HTML_MESSAGE,SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id D16ABBC37 for ; Fri, 19 Jun 2009 17:03:06 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtUCAPtFO0rRVdzZmGdsb2JhbACCJDCVVz8BAQEBAQgJDAcTpHeBGZA1AQMCBIQFBQ X-IronPort-AV: E=Sophos;i="4.42,254,1243807200"; d="scan'208";a="42099454" Received: from mail-fx0-f217.google.com ([209.85.220.217]) by mail4-smtp-sop.national.inria.fr with ESMTP; 19 Jun 2009 17:03:06 +0200 Received: by fxm17 with SMTP id 17so1865464fxm.27 for ; Fri, 19 Jun 2009 08:03:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=u7DZN+uXwJr64mUZjMQeFYhq2rw79ap3EkLFOY4p/pA=; b=d1mDTL7zY3DPvQIfo+c1CINQM1UQjz9uLaa3BDl+1DwGLC80+JRN+xJ8TB4tw+FURM 8UMWIxtQwCIkWrDK1uCm16avCa4B32kBmPOUk7FFtZ1V3WGcsopNqmYjcFYz1a4GZVEp 0hMOXmusSPbK6IbYD4mJiQ9Bjjx9JvMyBOaVE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=fOYEcTptii0Kr3baQkYtKhQr/KnxLXmqevf97IgKRKxnMtiWhuSkHm5/uvp7lf3zQV G6xGZ4MHn/MB2qKTAP4To3sc3iF+fVV3McEWVuQBUI0Hw3PJhAC/vwbaJ9i8LIYeM+JP mm88UtFpEwMmSBzVoYHqgVnyZmCRFwkJEd2jI= MIME-Version: 1.0 Received: by 10.103.218.9 with SMTP id v9mr1851998muq.109.1245423784820; Fri, 19 Jun 2009 08:03:04 -0700 (PDT) In-Reply-To: <20090619095258.GA22125@annexia.org> References: <20090619095258.GA22125@annexia.org> Date: Fri, 19 Jun 2009 16:03:04 +0100 Message-ID: Subject: Re: [Caml-list] Inflection lib for ocaml ? From: Conglun Yao To: Richard Jones Cc: caml-list@yquem.inria.fr Content-Type: multipart/alternative; boundary=00163641695d49ffbc046cb4d290 X-Spam: no; 0.00; inflection:01 lib:01 ocaml:01 gettext:01 plural:01 inflection:01 plural:01 0100,:01 ocaml:01 gettext:01 0100,:01 lingua:98 2009:98 2009:98 W29:98 --00163641695d49ffbc046cb4d290 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Thanks for all of your quick responses. Gettext seems a bit more complex than what I want. It would be better to have a simple function to implement the plural and singular conversion like the one in Ruby on Rails. Like Inflection.plural "some_word" Inflection.singular "some_word" Inflection module defines the conversion roles. http://www.csse.monash.edu.au/~damian/papers/HTML/Plurals.html May be I should have a try with perl4caml + Lingua-En-Inflect, but Lingua only does conversion from singular to plural, how to do the opposite conversion (plural to singular) Thanks. Conglun On Fri, Jun 19, 2009 at 10:52 AM, Richard Jones wrote: > On Fri, Jun 19, 2009 at 03:02:36AM +0100, Conglun Yao wrote: > > I'm wondering is there any library in OCaml performing word inflection > > between singular and plural, like Lingua-EN-Inflect in perl. Or someone > is > > already doing the work? > > You should be able to call the perl module directly using > perl4caml. > > Rich. > > -- > Richard Jones > Red Hat > --00163641695d49ffbc046cb4d290 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Thanks for all of your quick responses.

Gettext seems a bit more com= plex than what I want. It would be better to have a simple function to impl= ement the plural and singular conversion like the one in Ruby on Rails.

Like
=A0=A0 Inflection.plural "some_word"=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 =A0=A0 Inflection.singular "some_word"

Inflection module= defines the conversion roles.=A0 http://www.csse.monash.edu.au/~damian/pap= ers/HTML/Plurals.html

May be I should have a try with perl4caml + Lingua-En-Inflect,=A0 but L= ingua only does conversion from singular to plural,=A0 how to do the opposi= te conversion (plural to singular)

Thanks.

Conglun


On Fri, Jun 19, 2009 at 10:52 AM, Richard Jo= nes <rich@annexia.= org> wrote:
On Fri, Jun 19, 2009 at 03:02:36AM +0100, Conglun Yao wro= te:
> I'm wondering is there any library in OCaml performing word inflec= tion
> between singular and plural, like Lingua-EN-Inflect in perl. Or someon= e is
> already doing the work?

You should be able to call the perl module directly using
perl4caml.

Rich.

--
Richard Jones
Red Hat

--00163641695d49ffbc046cb4d290--