Braille translator
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- Posts: 4
- Joined: Wed Apr 17, 2013 9:18 pm
Braille translator
i want to make a braille translator app, where a user types in english and braille is shown.
In braille each letter has a corresponding symbol, which i have images for stored on my hard drive.
I made a simple application where it would hide and show images according to what was typed into a text box, however this only worked for
single letter translation. How can i make an app that will translate a sentence or a word?
Please help
In braille each letter has a corresponding symbol, which i have images for stored on my hard drive.
I made a simple application where it would hide and show images according to what was typed into a text box, however this only worked for
single letter translation. How can i make an app that will translate a sentence or a word?
Please help
Re: Braille translator
Interesting project.
Not sure how you are calling up your images and I would have to guess at what your problem really is.
Is it in placing the images?
Is it that the text was pasted into a field?
or is it something else?
Simon
Not sure how you are calling up your images and I would have to guess at what your problem really is.
Is it in placing the images?
Is it that the text was pasted into a field?
or is it something else?
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: Braille translator
Hi.
This sounds like a very interesting project.
But if you were able to display one image when the user types in a letter, why can't you string images together? In other words, you would lay out a virtual grid, and load images into that grid based on the text. This only requires that the images are the same size.
So if I typed in "Hello world", ten images would appear, side by side, spaced as you need. They could appear directly as the text appears. There would be some simple management for line breaks, I guess, and I am not sure how braille handles that, but it does not seem too difficult.
Write back if I am missing something important here...
Craig Newman
This sounds like a very interesting project.
But if you were able to display one image when the user types in a letter, why can't you string images together? In other words, you would lay out a virtual grid, and load images into that grid based on the text. This only requires that the images are the same size.
So if I typed in "Hello world", ten images would appear, side by side, spaced as you need. They could appear directly as the text appears. There would be some simple management for line breaks, I guess, and I am not sure how braille handles that, but it does not seem too difficult.
Write back if I am missing something important here...
Craig Newman
Re: Braille translator
Hi
Good project
Using imagesource in a fld is an other way.
I see two flds. One in english that you can use for textToSpeech and one in Braille.
Do you have a Braille printer ?
Please write back if you need help.
Best regards
Jean-Marc
Good project
Using imagesource in a fld is an other way.
I see two flds. One in english that you can use for textToSpeech and one in Braille.
Do you have a Braille printer ?
Please write back if you need help.
Best regards
Jean-Marc
https://alternatic.ch
Re: Braille translator
Jean Marc.
Great idea.
Craig
Great idea.
Craig
Re: Braille translator
Thanks Craig,
I believe the Braille printers works with postscript file
What about it in LC (entries in the Dictionary are Linux only)
I believe the Braille printers works with postscript file
What about it in LC (entries in the Dictionary are Linux only)
https://alternatic.ch
Re: Braille translator
That's how I'd do it, using a font. There's one here:
http://www.duxburysystems.com/product2. ... level=free
That might take all the fun out of coding it though.
http://www.duxburysystems.com/product2. ... level=free
That might take all the fun out of coding it though.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
-
- Posts: 4
- Joined: Wed Apr 17, 2013 9:18 pm
Re: Braille translator
I was using 26 images overlaid, and hiding and showing them according to whatSimon wrote:Interesting project.
Not sure how you are calling up your images and I would have to guess at what your problem really is.
Is it in placing the images?
Is it that the text was pasted into a field?
or is it something else?
Simon
was typed into the field. I figured that with multiple Images it would take forever
to do this for every single character.
thank you for your help
-
- Posts: 4
- Joined: Wed Apr 17, 2013 9:18 pm
Re: Braille translator
dunbarx wrote:Hi.
This sounds like a very interesting project.
But if you were able to display one image when the user types in a letter, why can't you string images together? In other words, you would lay out a virtual grid, and load images into that grid based on the text. This only requires that the images are the same size.
So if I typed in "Hello world", ten images would appear, side by side, spaced as you need. They could appear directly as the text appears. There would be some simple management for line breaks, I guess, and I am not sure how braille handles that, but it does not seem too difficult.
Write back if I am missing something important here...
Craig Newman
thank you for your suggestion, your idea seems to be perfect.
I made one image appear by;
loading in 26 images all on top of each other then showing and hiding
them according to what was typed into the field.
for example
if field 1 is "a" then show image "braille a.png"
if I had to create 26 images for each character that would take forever, and it
would limit to how many characters the user could translate.
how would I go about doing it your way, as yours seems more logical.
-
- Posts: 4
- Joined: Wed Apr 17, 2013 9:18 pm
Re: Braille translator
yes, I have access to a braille printer five times a weekjmburnod wrote:Hi
Good project
Using imagesource in a fld is an other way.
I see two flds. One in english that you can use for textToSpeech and one in Braille.
Do you have a Braille printer ?
Please write back if you need help.
Best regards
Jean-Marc
could you please explain what you mean by image source in field??
thank you
Re: Braille translator
Hi shubhamgoel145,
As Jacque said and that is probably the best way you can use a Braille font
Best regards
Jean-Marc
you can insert an image like a character in a fldcould you please explain what you mean by image source in field??
Code: Select all
set the imagesource of char 3 of fld "myField" to the short id of image "Img_a"
Best regards
Jean-Marc
https://alternatic.ch
Re: Braille translator
Hi.
The imageSource method notwithstanding, which is very easy to implement, there may be layout or other reasons to use an array of images.
But you do NOT want to store a million images. Store 26 only, name them, and hide them. When you need one, clone it into the appropriate grid location. So if the user types a "B", you would, likely in a keyDown handler, do something like:
Clone invisible ImageB --may not be needed if the master image is hidden. Not tested.
set the loc of the last image to theNextImageLoc --this is the next location in your array
show last image
You can do this easily. You will have to manage the use of the backSpace key, I would think, No? Can you handle that?
Craig Newman
The imageSource method notwithstanding, which is very easy to implement, there may be layout or other reasons to use an array of images.
But you do NOT want to store a million images. Store 26 only, name them, and hide them. When you need one, clone it into the appropriate grid location. So if the user types a "B", you would, likely in a keyDown handler, do something like:
Clone invisible ImageB --may not be needed if the master image is hidden. Not tested.
set the loc of the last image to theNextImageLoc --this is the next location in your array
show last image
You can do this easily. You will have to manage the use of the backSpace key, I would think, No? Can you handle that?
Craig Newman
Re: Braille translator
I think my last choice would be an actual grid of objects, but if I had to do it, I'd use button icons rather than cloning every image multiple times. LiveCode 6 has some new optimizations for icon use and it's very efficient and fast. But using any type of object to represent text is a pretty big headache, with fields all the dirty work is taken care of automatically.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: Braille translator
As Jacques said
Yes but I'm afraid we have to make the dirty work for export and print. Using Braille font should be better for this part.with fields all the dirty work is taken care of automatically.
https://alternatic.ch