character recognition

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

character recognition

openslateproj
While poking around today I came across this method:

TextMorph>>recognizerArena

    "Answer the rectangular area, in world coordinates, that the character recognizer should regard as its tablet"

I couldn't find any senders. Anybody working on character recognition?

--
Gary Dunn
Open Slate Project
http://openslate.org/


Reply | Threaded
Open this post in threaded view
|

Re: character recognition

Bob Arning-2
There used to be...

'From Squeak3.2gamma of 15 January 2002 [latest update: #4743] on 21 March 2013 at 7:01:33 pm'!

!TextMorphEditor methodsFor: 'events' stamp: 'sw 12/16/1998 08:55'!
recognizeCharacters
    "Recognize hand-written characters and put them into the receiving pane.  Invokes Alan's character recognizer."

    self recognizeCharactersWhileMouseIn: morph recognizerArena! !


Cheers,
Bob

On 3/21/13 6:16 PM, Open Slate wrote:
While poking around today I came across this method:

TextMorph>>recognizerArena

    "Answer the rectangular area, in world coordinates, that the character recognizer should regard as its tablet"

I couldn't find any senders. Anybody working on character recognition?

--
Gary Dunn
Open Slate Project
http://openslate.org/



    



Reply | Threaded
Open this post in threaded view
|

Re: character recognition

Bert Freudenberg
The recognizer still works in the Etoys image.

- Bert -

On 2013-03-22, at 00:02, Bob Arning <[hidden email]> wrote:

There used to be...

'From Squeak3.2gamma of 15 January 2002 [latest update: #4743] on 21 March 2013 at 7:01:33 pm'!

!TextMorphEditor methodsFor: 'events' stamp: 'sw 12/16/1998 08:55'!
recognizeCharacters
    "Recognize hand-written characters and put them into the receiving pane.  Invokes Alan's character recognizer."

    self recognizeCharactersWhileMouseIn: morph recognizerArena! !


Cheers,
Bob

On 3/21/13 6:16 PM, Open Slate wrote:
While poking around today I came across this method:

TextMorph>>recognizerArena

    "Answer the rectangular area, in world coordinates, that the character recognizer should regard as its tablet"

I couldn't find any senders. Anybody working on character recognition?

--
Gary Dunn
Open Slate Project
http://openslate.org/



    




Reply | Threaded
Open this post in threaded view
|

Re: character recognition

Colin Putney-3



On Thu, Mar 21, 2013 at 4:07 PM, Bert Freudenberg <[hidden email]> wrote:
The recognizer still works in the Etoys image.

Was that Genie, or another system?

It seems like Genie is still available, though it probably doesn't work in modern Squeak:


Colin 


Reply | Threaded
Open this post in threaded view
|

Re: character recognition

Casey Ransberger-2
Wait as in "I can draw a glyph on a graphics tablet?" If so, do want do want do want!

On Mar 21, 2013, at 5:06 PM, Colin Putney <[hidden email]> wrote:




On Thu, Mar 21, 2013 at 4:07 PM, Bert Freudenberg <[hidden email]> wrote:
The recognizer still works in the Etoys image.

Was that Genie, or another system?

It seems like Genie is still available, though it probably doesn't work in modern Squeak:


Colin 



Reply | Threaded
Open this post in threaded view
|

Re: character recognition

Bob Arning-2
In reply to this post by Colin Putney-3
Maybe 5 years before Genie. Here's the ancestor:

recognize | prv cdir result features char r s t dir |

"Alan Kay's recognizer as of 1/31/96.  This version preserved for historical purposes, and also because it's still called by the not-yet-deployed method recogPar.  Within the current image, the recognizer is now called via #recognizeAndDispatch:until:"


"Inits"                (p _ Pen new) defaultNib: 1; down.
    "for points"        pts _ ReadWriteStream on: #().

"Event Loop"   
                    [(Sensor mousePoint x) < 50] whileFalse:

"First-Time"            [pts reset.       
"will hold features"        ftrs _ ''.

                      (Sensor anyButtonPressed) ifTrue:
                        [pts nextPut: (bmin _ bmax _ t _ s _ sts _ Sensor mousePoint).
                        p place: sts. cdir _ nil.

"Each-Time"        [Sensor anyButtonPressed] whileTrue:
                        [
"ink raw input"            p goto: (r _ Sensor mousePoint).
"smooth it"                s _ (0.5*s) + (0.5*r).
"thin the stream"        ((s x - t x) abs > 3 or:[(s y - t y) abs > 3]) ifTrue:
                            [ pts nextPut: t.
"bounding box"            bmin _ bmin min: s. bmax _ bmax max: s.
"get current dir"                dir _ (self fourDirsFrom: t to: s). t _ s.
                            dir ~= ' dot... ' ifTrue: [
"store new dirs"                    cdir ~= dir ifTrue: [ftrs _ ftrs, (cdir _ dir)]].
"for inked t's"             p place: t; go: 1; place: r.
                            ].
 "End Each-Time Loop"    ].

"Last-Time"   

"save last points"        pts nextPut: t; nextPut: r.
"find rest of features"    features _ self extractFeatures.
"find char..."            char _ CharacterDictionary at: features ifAbsent:
"...or get from user"            [ result _ FillInTheBlank request:
                             'Not recognized. type char, or type ~: ', features.
"ignore or..."                result = '~' ifTrue: ['']
"...enter new char"            ifFalse: [CharacterDictionary at: features put: result. result]].

"control the editor"        (char = 'cr' ifTrue: [Transcript cr] ifFalse:
                        [char = 'bs' ifTrue: [Transcript bs] ifFalse:
                        [char = 'tab' ifTrue:[Transcript tab] ifFalse:
                        [Transcript show: char]]]).

"End First-Time Loop"    ].

"End Event-Loop" ].

              
 
On 3/21/13 8:06 PM, Colin Putney wrote:



On Thu, Mar 21, 2013 at 4:07 PM, Bert Freudenberg <[hidden email]> wrote:
The recognizer still works in the Etoys image.

Was that Genie, or another system?

It seems like Genie is still available, though it probably doesn't work in modern Squeak:


Colin