From f.hocaoglu@usa.net  Thu Aug 17 19:07:47 2000
Received: from nwcst293.netaddress.usa.net (nwcst293.netaddress.usa.net [204.68.23.38])
	by swi.psy.uva.nl (8.9.3/8.9.3) with SMTP id TAA23228
	for <prolog@swi.psy.uva.nl>; Thu, 17 Aug 2000 19:07:46 +0200 (MET DST)
Received: (qmail 29612 invoked by uid 60001); 17 Aug 2000 17:07:59 -0000
Message-ID: <20000817170759.29611.qmail@nwcst293.netaddress.usa.net>
Received: from 204.68.23.38 by nwcst293 for [128.196.125.226] via web-mailer(34FM0700.1.03) on Thu Aug 17 17:07:59 GMT 2000
Date: 17 Aug 00 11:07:59 MDT
From: Fatih Hocaoglu <f.hocaoglu@usa.net>
To: prolog@swi.psy.uva.nl
Subject: Re: [replace Capital letters]
X-Mailer: USANET web-mailer (34FM0700.1.03)
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by swi.psy.uva.nl id TAA23228

that's the answer;

to_small(X,Y):- name(X,L),
  change(L,Lx),
  name(Y,Lx).


change([],[]).
change([X|M],[Y|MM]):-(X>64, X<91),!,
        Y is X+32,
   change(M,MM);
   Y is X,
  change(M,MM).

try this,

?- to_small('FaTIH hoCAOgLU',X).
   X = 'fatih hocaoglu'

fatih



"A. Obdeijn" <aobdeijn@wins.uva.nl> wrote:
Can anyone tell me if there's a simple way to replace CAPITAL LETTERS by
small letters, in a list of words?

the case is the following:
i ask for a sentence, the user writes a sentence, including capital
letters, and then i want to parse this sentence,
which is not possible, since the capitals are seen as variables. So what
i want to do is replace the capitals by normal letters.

Arnold



----------------
* To UNSUBSCRIBE, please use the HTML form at

    http://www.swi.psy.uva.nl/projects/SWI-Prolog/index.html#mailinglist

or send mail to prolog-request@swi.psy.uva.nl using the Subject:
"unsubscribe"
(without the quotes) and *no* message body.

** An ARCHIVE of this list is maintained at

    http://www.swi.psy.uva.nl/projects/SWI-Prolog/mailinglist/archive/


____________________________________________________________________
Get free email and a permanent address at http://www.netaddress.com/?N=1

