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 35929BC37 for ; Fri, 19 Jun 2009 04:02:48 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AmMDAPCOOkrRVdrPmGdsb2JhbACCJDCVVz8BAQEBAQgJDAcTpR2BGZBGAQMCBIQEBQ X-IronPort-AV: E=Sophos;i="4.42,248,1243807200"; d="scan'208";a="42055053" Received: from mail-bw0-f207.google.com ([209.85.218.207]) by mail4-smtp-sop.national.inria.fr with ESMTP; 19 Jun 2009 04:02:37 +0200 Received: by bwz3 with SMTP id 3so1512619bwz.27 for ; Thu, 18 Jun 2009 19:02:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=5HakWDvc0jHqnyf76CF23EorYekTf1VMLl1wdrkdByM=; b=msQDBwZB5mxfSKilGjw4N5FhtPH7IW34QXsZoxLZKhcp2YFjUqOr42g9A5V9YxA2C8 SCmR48X0pegpetLJXaDLqwB+BnwwMoFF2Cqhr50VNekiBkvnYzn/v8FJrCms9sPs3sXI nODHYDRXBo6KdHMyWTukzPhndqW9X/4LW8vKY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=YaeZIzXsMnuwzLszjKiv6+RFqNbNmxsD7VpNORUEUAn0dIKOS0ZhAgvzRI0H18X/hB srOknR//RCh0oi2MPTXSP5vJAyazWSrO2lX8lyuybt0uWW5MHLW/ME538wfcfUrEzD6O 6ghlf/120D8l1ccqleZ0MFs64YSSkmMeh5dOo= MIME-Version: 1.0 Received: by 10.103.182.3 with SMTP id j3mr1419536mup.115.1245376956821; Thu, 18 Jun 2009 19:02:36 -0700 (PDT) Date: Fri, 19 Jun 2009 03:02:36 +0100 Message-ID: Subject: Inflection lib for ocaml ? From: Conglun Yao To: caml-list@yquem.inria.fr Content-Type: multipart/alternative; boundary=0016363ba65c1f714f046ca9eb16 X-Spam: no; 0.00; inflection:01 lib:01 ocaml:01 ocaml:01 inflection:01 plural:01 cheers:01 plural:01 cheers:01 sourceforge:01 sourceforge:01 library:03 library:03 snapshot:05 snapshot:05 --0016363ba65c1f714f046ca9eb16 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Dear all, 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? I can only find code snapshot in Pleac_ocaml (Printing Correct Plurals) http://pleac.sourceforge.net/pleac_ocaml/numbers.html Cheers, Conglun --0016363ba65c1f714f046ca9eb16 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Dear all,

I'm wondering is there any library in OCaml performing= word inflection between singular and plural, like Lingua-EN-Inflect in per= l. Or someone is already doing the work?

I can only find code snapsh= ot=A0 in Pleac_ocaml (Printing Correct Plurals)

http:= //pleac.sourceforge.net/pleac_ocaml/numbers.html

Cheers,
Cong= lun
--0016363ba65c1f714f046ca9eb16-- 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.8 required=5.0 tests=DNS_FROM_RFC_POST,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 mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id 08E2BBC37 for ; Fri, 19 Jun 2009 08:55:49 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AoMCAOfSOkrRVdvVmGdsb2JhbACYKT8BAQEBAQgJDAcTpE6QRgEDAgSEBQWHIw X-IronPort-AV: E=Sophos;i="4.42,250,1243807200"; d="scan'208";a="28368052" Received: from mail-ew0-f213.google.com ([209.85.219.213]) by mail2-smtp-roc.national.inria.fr with ESMTP; 19 Jun 2009 08:55:48 +0200 Received: by ewy9 with SMTP id 9so1876374ewy.27 for ; Thu, 18 Jun 2009 23:55:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type:content-transfer-encoding; bh=r58vQwHvYIm5rRp5pBZ0M93quEvdCStYfOm4focrInY=; b=tVqMSJjU3L7Tbc/GgEbObjzBB+ysMpjAgu9rr6FoWOqLA20gdA9sKWf/V/Uw7y+ldO OIC10+jP8XDDDecvRrv8saSQ6QyP7DB6nmr06F+3pv8IAH5t2YrShDoannMP7Zj5QPvY RsL6KrdQN4eR0g3Jdd/Qhf93YBV+MI+DrCER8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=QJ62GWmO0KHloD8UEDw6gNMCUVwFlXa20Gti0OmpjVHoEIxLtOhfg2lIBRSO4C6Omx iHUi1pX89Z7+1XceOKeU+fnu5hUokT7fV8nNs+vGAZ9f9IyRmi9dsQYq7HtlQcwEulCu Qg7F8K210H8iydvRqsJFWxGAEmsZ2argf6RE8= MIME-Version: 1.0 Sender: pascal.rigaux@gmail.com Received: by 10.216.3.79 with SMTP id 57mr889455weg.166.1245394548534; Thu, 18 Jun 2009 23:55:48 -0700 (PDT) In-Reply-To: References: Date: Fri, 19 Jun 2009 08:55:48 +0200 X-Google-Sender-Auth: 857ebe6b7d666981 Message-ID: <9abb4a670906182355l4c797dc3x2317e8c0dcd03fbe@mail.gmail.com> Subject: Re: [Caml-list] Inflection lib for ocaml ? From: Pascal Rigaux To: Conglun Yao Cc: caml-list@yquem.inria.fr Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam: no; 0.00; inflection:01 lib:01 ocaml:01 ocaml:01 inflection:01 plural:01 gettext:01 2009:98 caml-list:01 gnu:03 library:03 singular:06 manual:06 pascal:06 pascal:06 2009/6/19 Conglun Yao : > 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? not really comparable to Lingua-EN-Inflect, but if you want one day to have i18n and you are under linux, ngettext is quite powerful. cf http://www.gnu.org/software/hello/manual/gettext/Plural-forms.html 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=1.0 required=5.0 tests=AWL,SPF_FAIL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 93DA0BC37 for ; Fri, 19 Jun 2009 09:59:59 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AhICAOfhOkpQW+UCe2dsb2JhbACYaAEBFiQEtHyECQU X-IronPort-AV: E=Sophos;i="4.42,250,1243807200"; d="scan'208";a="31558734" Received: from main.gmane.org (HELO ciao.gmane.org) ([80.91.229.2]) by mail1-smtp-roc.national.inria.fr with ESMTP/TLS/AES256-SHA; 19 Jun 2009 09:59:59 +0200 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1MHZ0v-00009N-32 for caml-list@inria.fr; Fri, 19 Jun 2009 07:59:57 +0000 Received: from ks300734.kimsufi.com ([91.121.65.225]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 19 Jun 2009 07:59:57 +0000 Received: from sylvain by ks300734.kimsufi.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 19 Jun 2009 07:59:57 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: caml-list@inria.fr From: Sylvain Le Gall Subject: Re: Inflection lib for ocaml ? Date: Fri, 19 Jun 2009 07:59:42 +0000 (UTC) Message-ID: References: <9abb4a670906182355l4c797dc3x2317e8c0dcd03fbe@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: ks300734.kimsufi.com User-Agent: slrn/pre1.0.0-2 (Linux) Sender: news X-Spam: no; 0.00; le-gall:01 inflection:01 lib:01 ocaml:01 ocaml:01 inflection:01 plural:01 gettext:01 plural:01 le-gall:01 2009:98 wrote:01 fyi:02 gnu:03 library:03 On 19-06-2009, Pascal Rigaux wrote: > 2009/6/19 Conglun Yao : > >> 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? > > not really comparable to Lingua-EN-Inflect, but if you want one day to > have i18n and you are under linux, ngettext is quite powerful. > cf http://www.gnu.org/software/hello/manual/gettext/Plural-forms.html > FYI, a pure OCaml implementation of ngettext, with plural support, can be found in ocaml-gettext: http://le-gall.net/sylvain+violaine/ocaml-gettext.html Regards, Sylvain Le Gall 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=0.8 required=5.0 tests=AWL,SPF_FAIL 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 126C5BC37 for ; Fri, 19 Jun 2009 11:53:02 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: At4DABz9OkpQRFuwX2dsb2JhbACYXhcLChq1E4QJBQ X-IronPort-AV: E=Sophos;i="4.42,251,1243807200"; d="scan'208";a="42080269" Received: from furbychan.cocan.org ([80.68.91.176]) by mail4-smtp-sop.national.inria.fr with ESMTP; 19 Jun 2009 11:53:01 +0200 Received: from rich by furbychan.cocan.org with local (Exim 4.63) (envelope-from ) id 1MHamI-0005ng-PU; Fri, 19 Jun 2009 10:52:58 +0100 Date: Fri, 19 Jun 2009 10:52:58 +0100 To: Conglun Yao Cc: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Inflection lib for ocaml ? Message-ID: <20090619095258.GA22125@annexia.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.13 (2006-08-11) From: Richard Jones X-Spam: no; 0.00; inflection:01 lib:01 ocaml:01 0100,:01 ocaml:01 inflection:01 plural:01 2009:98 wrote:01 caml-list:01 caml:02 module:03 library:03 fri:05 singular:06 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 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--