|
Posted: Jul 24, 2010 |
[ # 16 ]
|
|
Administrator
Total posts: 3111
Joined: Jun 14, 2010
|
Actually, I can do you one better, if you like. I can save the file in UTF8 or Unicode (your choice) and toss it into a tarball, and host the file in the downloads section of my website. I can also, if desired, prepare a zip file for Windows users. These are trivial matters, taking little time or effort. Just let me know.
|
|
|
|
|
Posted: Jul 24, 2010 |
[ # 17 ]
|
|
Senior member
Total posts: 974
Joined: Oct 21, 2009
|
Ok, I emailed you the 2 files.
@Chuck - do not bother trying to copy and paste from the posting here - the quote marks are all messed up. Dave is going to host them on his site and provide us a URL or what to click on from GeekCaveCreations.
@Erwin - we need a download section !!
|
|
|
|
|
Posted: Jul 24, 2010 |
[ # 18 ]
|
|
Administrator
Total posts: 3111
Joined: Jun 14, 2010
|
I got your 2 emails, Victor, but I just got up, and haven’t had my coffee yet. Give me a couple, and I’ll zip them up, and post a link. Do you have any licensing information in the files? And if not, would you like me to add some? I generally use the GNU General Public License with my published source files, myself.
|
|
|
|
|
Posted: Jul 24, 2010 |
[ # 19 ]
|
|
Senior member
Total posts: 974
Joined: Oct 21, 2009
|
Did someone say COFFEE ?!!! nice.. think I’ll have some….
Sure, the GNU GPL is good - feel free to fix a bit of indenting, and any updates you want. The one script only goes up to 999 thousand, you may want to update it so it goes to millions, billions, trillions,etc
|
|
|
|
|
Posted: Jul 24, 2010 |
[ # 20 ]
|
|
Administrator
Total posts: 3111
Joined: Jun 14, 2010
|
Ok, I’ve added copyright and licensing information to the files, and archived them into a zip file for Windows users, and a tarball for *nix users. I know that there are means for each to use the other, but I’m nothing if not accommodating.
The files can be found on my Downloads page.
|
|
|
|
|
Posted: Jul 24, 2010 |
[ # 21 ]
|
|
Senior member
Total posts: 974
Joined: Oct 21, 2009
|
Cool .. . I took out my postings which listed all the code inline and just put the URL to your page… I put that right in the first post of this thread.
|
|
|
|
|
Posted: Jul 24, 2010 |
[ # 22 ]
|
|
Administrator
Total posts: 3111
Joined: Jun 14, 2010
|
I think, Victor, that perhaps it would have been best to have left the code on place. But the decision is wholly yours.
|
|
|
|
|
Posted: Jul 27, 2010 |
[ # 23 ]
|
|
Experienced member
Total posts: 42
Joined: Oct 16, 2009
|
Victor Shulist - Jul 23, 2010:
This example is a tool to convert numbers (integers only) between 0 and 999,999 into words. Example, “593” returns “five hundred ninty three”.
Ah…
So something similar to the 6 year old Num2Word code from PetaMem?
http://search.cpan.org/~rvasicek/Lingua-Num2Word-0.07/Num2Word.pm
Albeit that old framework is multilingual.
But as you point out the really interesting stuff is the inverse Word2Num framework:
User: how much is twenty seven divided by nine
Bot: The result is 3.
Uses a wrapper to catch the multilinguality and Parse::RecDescent for the input in every single supported language. (AFR CES DEU ENG EUS FRA IND ITA JAP NLD NOR POL POR RUS SPA SWE ZHO)
Richard
|
|
|
|
|
Posted: Jul 27, 2010 |
[ # 24 ]
|
|
Administrator
Total posts: 3111
Joined: Jun 14, 2010
|
lol, I’m not sure about Victor, but I know I never claimed these were original ideas. I, for one, am well known by some for “re-inventing the wheel”.
|
|
|
|
|
Posted: Jul 27, 2010 |
[ # 25 ]
|
|
Experienced member
Total posts: 42
Joined: Oct 16, 2009
|
Dave Morton - Jul 27, 2010: lol, I’m not sure about Victor, but I know I never claimed these were original ideas. I, for one, am well known by some for “re-inventing the wheel”.
The PetaMem code is actually “re-inventing the wheel”. One such wheel (and I’m pretty sure I wasn’t the first one) I crafted back in the late 80ies in GFA-BASIC on my ATARI ST.
My fathers company needed to print out checks and they had a field for the numeric value (amount) and a line to print out that value in words. All was in German back then, so
427 = “vierhundertsiebenundzwanzig”
After some hard days of work I did it. But it took me about 20 years to be able to do it the reverse way - in arbitrary languages.
Richard
PS: And yes, I do it in Perl.
|
|
|
|
|
Posted: Jul 27, 2010 |
[ # 26 ]
|
|
Administrator
Total posts: 3111
Joined: Jun 14, 2010
|
That’s more or less the reason why I had written the function I posted, as well. I wrote a management application for the cab company here that was web browser based, and managed every aspect of the company, including printing checks and cash receipts. The first function I posted came from that application.
|
|
|
|
|
Posted: Jul 27, 2010 |
[ # 27 ]
|
|
Senior member
Total posts: 974
Joined: Oct 21, 2009
|
Original ideas? lol.. no no.. I just had a bit of extra time and felt like coding something…. it was a cool little thing to write up quick
|
|
|
|
|
Posted: Jul 27, 2010 |
[ # 28 ]
|
|
Administrator
Total posts: 3111
Joined: Jun 14, 2010
|
Morning, Victor.
Yup. That’s the reason for the second function. Well, that, and it being good practice.
|
|
|
|
|
Posted: Jul 27, 2010 |
[ # 29 ]
|
|
Senior member
Total posts: 974
Joined: Oct 21, 2009
|
HI Dave
Good practice also, yes, exactly. As for re-inventing wheels, I do it from time to time, because the wheel I invent may work and integrate better with my system, also no legal issues, dependancies, etc…..
When they made the first shopping cart, I don’t think they minded redesignng a wheel for it, even though wheels were already designed for cars, trucks, tractors, wheelbarrows ,etc
|
|
|
|
|
Posted: Jul 28, 2010 |
[ # 30 ]
|
|
Senior member
Total posts: 257
Joined: Jan 2, 2010
|
Richard,
GFA Basic? That was my first high level programming language in ‘86. I had a blast with GEM (Graphics Environment Manager). Remember the documentation?? There wasn’t much…was there? Those were the days before ‘Google’. =)
I did write an electrical drawing program in GFA Basic. Used the mouse to draw resistors and batteries…connecting them with wire. The program calculated current and voltage drops in a series circuit. That was my first ‘awesome’ program…and then I traded the ATARI for some scuba equipment so I could dive off the coast of beautiful southern California. It was a tough trade though.
Thanks for the link.
Regards,
Chuck
|
|
|
|