🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.prolog
Article #2441

Re: How to parse "I say 'I love you'" to ["I", "say", "'I love you'"]

#2441
From: Weiguang Huang
Date: Tue, 05 Jan 1993 23:35
28 lines
1381 bytes
In article <8085@skye.ed.ac.uk> ken@aiai.ed.ac.uk (Ken Johnson) writes:
>
>In article <1i97a9INN8h@sol.deakin.OZ.AU> huang@deakin.OZ.AU (Weiguang
>Huang) writes:
>
># but how to parse to ["I", "say", "I love you"] ?
>
>The following will do what you want, but I don't think what you describe
>is really what you want to do.  Instead of a list, you should really
>generate a term expressing the structure of the original, so [I, say, I,
>love, you] should really parse to a term such as
>
>   say('I',love('I',you)).

>?-  phrase(report(R),['I',say,'I',love,you]).
>
>     R=[I,say,I,love,you]


	All variables in my program are a string or a list of string, instead
of term nor word nor atom. I want to parse a string "I say 'I love you'" to
a list of string ["I", "say", "'I love you'"].

-? tok("I say 'I love you'", R).

R=["I", "say", "'I love you'"]

	How to do so ?
Technical Details
Message-ID: <1id60fINNprv@sol.deakin.OZ.AU>
Path: arc1-ca.pugleaf.net!sparky!uunet!munnari.oz.au!sol.deakin.OZ.AU!sol.deakin.OZ.AU!not-for-mail
References: <1i97a9INN8h@sol.deakin.OZ.AU> <8085@skye.ed.ac.uk>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!munnari.oz.au!sol.deakin.OZ.AU!sol.deakin.OZ.AU!not-for-mail
From: huang@deakin.OZ.AU (Weiguang Huang)
Newsgroups: comp.lang.prolog
Subject: Re: How to parse "I say 'I love you'" to ["I", "say", "'I love you'"]
Date: 6 Jan 1993 10:35:43 +1100
Organization: Deakin University, Victoria, Australia
Lines: 40
Message-ID: <1id60fINNprv@sol.deakin.OZ.AU>
References: <1i97a9INN8h@sol.deakin.OZ.AU> <8085@skye.ed.ac.uk>
NNTP-Posting-Host: sol.deakin.oz.au