Re: [racket-users] generate sentences

2017-03-01 Thread Nguyen Linh Chi
Sorry but can i just ask this question, because this is out of my thinking
capacity (i have very little knowledge of computer stuff)

The program of lab 7 is to generate pseudo-natural sentences. It's not
interactive in the sense that i cannot talk to it. I can only tell it to
say-something and it says something based on its data history.

I was wondering, in which way i can make a program that response to what i
say. like a chatbot. what is the simplest version of a chat bot.

should i give it conversations, telling which sentence is the initiator,
which is the responder?
then storing the sentences by breaking them down using the same structure
as a writing style (so a sentence is the smallest unit of a writing style).

when i say something, the program will try to comprehend my sentence by
comparing it with its database. if it finds a roughly similar sentence, it
get the responder sentence to respond to me.

i dont know. just asking, if anyone has any idea or simple solution for
beginner?





On Feb 26, 2017 21:47, "Nguyen Linh Chi"  wrote:

Oh my goodness, it is real.

I was really thinking that if i truly tried to generate such a paper,
probably they would not notice.

On Feb 26, 2017 02:01, "Matthew Butterick"  wrote:

>
> On Feb 25, 2017, at 1:33 PM, Linh Chi Nguyen 
> wrote:
>
> anyway, when being asked to say-something, the machine generates quite
> good sentences. i have this secret hope [0] that if i feed it enough game
> theory literature, somehow it can generate something of value for my phd
> thesis =)) because i'm so stuck.
>
>
>
> The champion in this category is SCIgen [1], which AFAIK has not been
> ported to Racket. [2]
>
>
> [1] https://pdos.csail.mit.edu/archive/scigen/
>
> [2] https://github.com/strib/scigen
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


generate novels Re: [racket-users] generate sentences

2017-03-01 Thread Hendrik Boom
nanogenmo is the annual challenge of writing a computer program that 
generates a novel.  It's kind of like nanowrimo only instead of 
writing a novel yourself, you write a computer program that does so.

You might find it interesting to google nanogenmo and look through 
their annual websites.  There's some interesting stuff being done 
there.

https://nanogenmo.github.io/

and their off-season mailing list:

https://groups.google.com/forum/#!forum/generativetext

It isn't about generating sentences per se, but it is definitey a 
related subject.  Some of them are sampling online databases of text 
with various algorithms, but the ones closest to your interests are 
using formal logic to develop plots and generating sentences hased on 
these deductions.

-- hendrik

On Wed, Mar 01, 2017 at 10:24:02AM +0100, 
Nguyen Linh Chi wrote:
> Sorry but can i just ask this question, because this is out of my thinking
> capacity (i have very little knowledge of computer stuff)
> 
> The program of lab 7 is to generate pseudo-natural sentences. It's not
> interactive in the sense that i cannot talk to it. I can only tell it to
> say-something and it says something based on its data history.
> 
> I was wondering, in which way i can make a program that response to what i
> say. like a chatbot. what is the simplest version of a chat bot.
> 
> should i give it conversations, telling which sentence is the initiator,
> which is the responder?
> then storing the sentences by breaking them down using the same structure
> as a writing style (so a sentence is the smallest unit of a writing style).
> 
> when i say something, the program will try to comprehend my sentence by
> comparing it with its database. if it finds a roughly similar sentence, it
> get the responder sentence to respond to me.
> 
> i dont know. just asking, if anyone has any idea or simple solution for
> beginner?
> 
> 
> 
> 
> 
> On Feb 26, 2017 21:47, "Nguyen Linh Chi"  wrote:
> 
> Oh my goodness, it is real.
> 
> I was really thinking that if i truly tried to generate such a paper,
> probably they would not notice.
> 
> On Feb 26, 2017 02:01, "Matthew Butterick"  wrote:
> 
> >
> > On Feb 25, 2017, at 1:33 PM, Linh Chi Nguyen 
> > wrote:
> >
> > anyway, when being asked to say-something, the machine generates quite
> > good sentences. i have this secret hope [0] that if i feed it enough game
> > theory literature, somehow it can generate something of value for my phd
> > thesis =)) because i'm so stuck.
> >
> >
> >
> > The champion in this category is SCIgen [1], which AFAIK has not been
> > ported to Racket. [2]
> >
> >
> > [1] https://pdos.csail.mit.edu/archive/scigen/
> >
> > [2] https://github.com/strib/scigen
> >
> >
> >
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to racket-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] generate sentences

2017-03-01 Thread Nguyen Linh Chi
Thanks for pointing me to ELIZA.
https://en.m.wikipedia.org/wiki/ELIZA

It's interesting.
^^ i dont doubt that people would develop sentiments toward a chatbot that
just simply speak random.

Not to say that, if i'm the one that makes the program, i would have
affection toward it also.

It's a puzzling emotion. But we have it, so.

Also, it can be irrational, but if it helps in psychological treatment,
then it helps. It's just that these methods (placebo, nocebo, hynotise,
telepathy..) are in the minority (such as some surreal deviations of born
autistic individuals). So it wont work on the majority.


On Mar 1, 2017 10:24, "Nguyen Linh Chi"  wrote:

Sorry but can i just ask this question, because this is out of my thinking
capacity (i have very little knowledge of computer stuff)

The program of lab 7 is to generate pseudo-natural sentences. It's not
interactive in the sense that i cannot talk to it. I can only tell it to
say-something and it says something based on its data history.

I was wondering, in which way i can make a program that response to what i
say. like a chatbot. what is the simplest version of a chat bot.

should i give it conversations, telling which sentence is the initiator,
which is the responder?
then storing the sentences by breaking them down using the same structure
as a writing style (so a sentence is the smallest unit of a writing style).

when i say something, the program will try to comprehend my sentence by
comparing it with its database. if it finds a roughly similar sentence, it
get the responder sentence to respond to me.

i dont know. just asking, if anyone has any idea or simple solution for
beginner?





On Feb 26, 2017 21:47, "Nguyen Linh Chi"  wrote:

Oh my goodness, it is real.

I was really thinking that if i truly tried to generate such a paper,
probably they would not notice.

On Feb 26, 2017 02:01, "Matthew Butterick"  wrote:

>
> On Feb 25, 2017, at 1:33 PM, Linh Chi Nguyen 
> wrote:
>
> anyway, when being asked to say-something, the machine generates quite
> good sentences. i have this secret hope [0] that if i feed it enough game
> theory literature, somehow it can generate something of value for my phd
> thesis =)) because i'm so stuck.
>
>
>
> The champion in this category is SCIgen [1], which AFAIK has not been
> ported to Racket. [2]
>
>
> [1] https://pdos.csail.mit.edu/archive/scigen/
>
> [2] https://github.com/strib/scigen
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] Re: Scrolling in racket/gui

2017-03-01 Thread Alex Harsanyi
On Thursday, March 2, 2017 at 10:56:30 AM UTC+8, Philip McGrath wrote:
> Almost — thanks! (I'm sure I read over that page of the docs, but I somehow 
> missed 'vscroll.)
> 
> 
> The one thing that isn't working is scrolling with the mouse/trackpad. It 
> seems like I might need to override on-subwindow-char to listen for 'wheel-up 
> and 'wheel-down, which I can do, but I'm not finding how to change the 
> scrolling position of the panel if I do catch one of those events. (Or maybe 
> there's a way to do it without implementing it myself?)
> 

I don't think you will be able to update the scroll-bar positions.  The scroll 
functionality that is implemented for panel objects is limited to automatic 
scrolling and the racket GUI code would have to be updated to allow changing it 
programmatically.

BTW, I am looking forward to being proven wrong on this, as I could use the 
functionality myself :-)

Alex.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] Re: Scrolling in racket/gui

2017-03-01 Thread Philip McGrath
Almost — thanks! (I'm sure I read over that page of the docs, but I somehow
missed 'vscroll.)

The one thing that isn't working is scrolling with the mouse/trackpad. It
seems like I might need to override on-subwindow-char to listen for
'wheel-up and 'wheel-down, which I can do, but I'm not finding how to
change the scrolling position of the panel if I do catch one of those
events. (Or maybe there's a way to do it without implementing it myself?)

-Philip

On Wed, Mar 1, 2017 at 5:39 PM, Alex Harsanyi 
wrote:

> On Thursday, March 2, 2017 at 4:16:47 AM UTC+8, Philip McGrath wrote:
> > This seems like it should be a simple question, but I can't figure out
> how to get a scroll bar in a gui application like this one:
> >
> >
> > #lang racket/gui
> > (define frame
> >   (new frame% [label "Example"]))
> > (for ([letter '("A" "B" "C" "D")])
> >   (define grp
> > (new group-box-panel%
> >  [parent frame]
> >  [label letter]))
> >   (for ([i (in-range 0 10)])
> > (new button%
> >  [parent grp]
> >  [label (number->string i)])))
> > (send frame show #t)
> >
> >
> > I can see something like what I have in mind in Dr. Racket's
> "Colors">"Color Schemes" preferences tab (at least on Mac OS), but I can't
> figure out how to do it.
> >
> >
> > Thanks,
> > Philip
>
> Does this do what you want?
>
> #lang racket/gui
>
> (define frame
>   (new frame% [label "Example"] [height 300]))
> (for ([letter '("A" "B" "C" "D")])
>   (define grp
> (new group-box-panel%
>  [parent frame]
>  [min-height 100]
>  [label letter]))
>   (define panel
> (new vertical-panel%
>  [parent grp]
>  [style '(vscroll)]
>  [alignment '(left top)]))
>   (for ([i (in-range 0 10)])
> (new button%
>  [parent panel]
>  [label (number->string i)])))
> (send frame show #t)
>
> Best Regards,
> Alex.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to racket-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Scrolling in racket/gui

2017-03-01 Thread Philip McGrath
This seems like it should be a simple question, but I can't figure out how
to get a scroll bar in a gui application like this one:

#lang racket/gui
> (define frame
>   (new frame% [label "Example"]))
> (for ([letter '("A" "B" "C" "D")])
>   (define grp
> (new group-box-panel%
>  [parent frame]
>  [label letter]))
>   (for ([i (in-range 0 10)])
> (new button%
>  [parent grp]
>  [label (number->string i)])))
> (send frame show #t)


I can see something like what I have in mind in Dr. Racket's
"Colors">"Color Schemes" preferences tab (at least on Mac OS), but I can't
figure out how to do it.

Thanks,
Philip

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.