| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
| |||
| |||
| Anyone already done a prolog program which identify the word when i insert the beginning of the word: ?- Example: identify( 'bec',L). ?- L='because' Please send me. Thanks, Diego Passos. |
|
#2
| |||
| |||
| On Thu, 10 Jul 2008 15:10:14 -0700 (PDT), giantpassos <dpsilvaengcomp@gmail.com> wrote: >Anyone already done a prolog program which identify the word when i >insert the beginning of the word: >?- Example: identify( 'bec',L). >?- L='because' > >Please send me. No. This is YOUR homework A.L. |
|
#3
| |||
| |||
| giantpassos a écrit : > Anyone already done a prolog program which identify the word when i > insert the beginning of the word: > ?- Example: identify( 'bec',L). > ?- L='because' > > Please send me. > > Thanks, > > Diego Passos. "because" is a concatenation of "bec" and something else, and is also something known by the program as a "word". Does this reformulation helps? Eusebius |
|
#4
| |||
| |||
| On Thu, 10 Jul 2008 15:10:14 -0700 (PDT) giantpassos <dpsilvaengcomp@gmail.com> wrote: > Anyone already done a prolog program which identify the word when i > insert the beginning of the word: > ?- Example: identify( 'bec',L). > ?- L='because' > > Please send me. > > Thanks, > > Diego Passos. | ?- assertz(identify('bec','because')). Dhu (always willing to provide trivial answers to trite questions;-) |
|
#5
| |||
| |||
| Duncan Patton escreveu: > On Thu, 10 Jul 2008 15:10:14 -0700 (PDT) > giantpassos <dpsilvaengcomp@gmail.com> wrote: > >> Anyone already done a prolog program which identify the word when i >> insert the beginning of the word: >> ?- Example: identify( 'bec',L). >> ?- L='because' >> >> Please send me. >> >> Thanks, >> >> Diego Passos. > > | ?- assertz(identify('bec','because')). > > Dhu (always willing to provide trivial answers to trite questions;-) OK, now we can ask (as an exercise, obviously) :-) why it would be a good idea to create a predicate and not build up a collection of facts, and this was your intention, right? ;-) Regards, |
|
#6
| |||
| |||
| On Jul 10, 6:10*pm, giantpassos <dpsilvaengc...@gmail.com> wrote: > Anyone already done a prolog program which identify the word when i > insert the beginning of the word: > ?- Example: identify( 'bec',L). > ?- L='because' > > Please send me. > > Thanks, > > Diego Passos. Hi, Maybe you can load the Prolog WordNet and check find all words starting with some string.I don't have what you ask for, but I have a spell checker written in Prolog and you can train it on some big text ( http://www.cs.sunysb.edu/~pfodor/spellChecker/ ). This is how it work: ?- correct("surfac",S),writeString(S). surface S = [115, 117, 114, 102, 97, 99, 101] ?- correct("stuc",S),writeString(S). stuck S = [115, 116, 117, 99, 107] Have fun! Paul. |
|
#7
| |||
| |||
| On Fri, 18 Jul 2008 09:35:22 -0300 Cesar Rabak <csrabak@yahoo.com.br> wrote: > Duncan Patton escreveu: > > On Thu, 10 Jul 2008 15:10:14 -0700 (PDT) > > giantpassos <dpsilvaengcomp@gmail.com> wrote: > > > >> Anyone already done a prolog program which identify the word when i > >> insert the beginning of the word: > >> ?- Example: identify( 'bec',L). > >> ?- L='because' > >> > >> Please send me. > >> > >> Thanks, > >> > >> Diego Passos. > > > > | ?- assertz(identify('bec','because')). > > > > Dhu (always willing to provide trivial answers to trite questions;-) > OK, now we can ask (as an exercise, obviously) :-) why it would be a > good idea to create a predicate and not build up a collection of facts, > and this was your intention, right? ;-) > > Regards, Mebbe 'cause to bee or not 2be is not the rite question? Dhu |
![]() |
| Thread Tools | |
| Display Modes | |
In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.