home *** CD-ROM | disk | FTP | other *** search
- Path: 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
-
- 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 ?
-
-
-
-
-
-
-
-
-
-
-
-
-