PDA

View Full Version : Equibase Charts Parser Released!


GameTheory
03-03-2002, 06:41 AM
Ok,

I finally did it. I actually sent it out.

I think I sent it to everyone I was supposed to, so if you didn't get it, and were expecting it, let me know.

Or if you want it, but hadn't requested it before, let me know.


Now we'll see if anyone can manage to wade through the morass of implementation notes I made and actually use it for some useful purpose... good luck.


Andy Serpa (GameTheory)
renegade@earthling.net

GameTheory
03-05-2002, 10:32 PM
Well,


Several of you, at least, did manage to successfully digest my voluminous notes and get the parser up and running. And we did find a few bugs already, mostly very minor, or only in the documentation.

The most serious is that it seems the "beaten lengths" field is screwed up under certain circumstances, so like I said in the docs, DON'T TRUST THE OUTPUT (yet).

Future versions I'm going to put up on the web somewhere so you can just download them. Watch this space and your mailbox if you're on my list.

Thanks to everyone who is helping me to track down errors...


-- GT

stuball
03-06-2002, 09:17 PM
Hi GT

I have been playing around with the parser and see a lot of potential for it...I have a problem with the Quotation marks in character fields. How do I get rid of them ? Is there an option to output without them ? I think the reason for them is so commas are not recognized as end of field markers if they are inside the quotes. Am I right on that? Well my foxpro still reads them as an end of field..Is it possible to change commas inside a character file be changed to ; maybe. There may be another reason for the quote marks that I don't know about..also is there and option to insert a 0 into blank fields ? I may have missed it in the text files if it's there...
Help please..Thank You

Stuball

Have a nice day !!!!!!!!!!

Some_One
03-06-2002, 09:35 PM
In the template file use [dlm]=[;] at the end of the file.

GameTheory
03-06-2002, 09:48 PM
Yeah, the quotes are one the minor bugs. That'll be fixed very shortly.

I'm not aware of commas inside of a character field causing problems, as long as the whole thing is enclosed in quotes -- I'll have to look into that.

To have an empty field set to zero, put:

[blank]=[0]

at the bottom of your template with the options (see xrd.tpl)...

GameTheory
03-06-2002, 10:19 PM
Originally posted by Some_One
In the template file use [dlm]=[;] at the end of the file.


This will change the delimiter between fields to a semi-colon, but won't change any commas that appear inside of a text field. The "scratches" field, for instance, might have list of horses in it, separated by commas. There is currently no way to change them to anything else.

Stuball, you might be able to change Foxpro to recognize something other than comma as a delimiter (maybe a tab, which you can do with [dlm]=[\t]). I think it is strange that your database has this problem. It would be kind of lame if you could NEVER use a comma, even in quotes. Does anyone know anything about this?

stuball
03-07-2002, 02:45 PM
Hi All

Thanks for the help. It takes a lot of adjusting to get Foxpro to accept the data but I did it..first I set my delimiter to ,, as that is what I get when I use Infotran then I used Wordpad to insert a character into all blank character fields as [blank] = [0] which only inserts a 0 into numeric fields.which is fine.
I used replace all function on Wordpad. Replace all "" with "z". Then I replace all " with nothing
which takes out all " marks. Then I replace all
, (that's comma space) with ; (that's semicolon space) that changes all commas in a comments field with a semicolon. I haven't run a lot of files yet to figure out if this will cover all the situations. (I',m sure it won't) Foxpro can be a b--ch but I am mariied to it as I know how to write programs to get out what I want.
Oh well upward and onward...Thanks to GT for writing this program. It already is great as I can see that I can make it work...

Stuball

Have a nice day !!!!!! :D

stuball
03-07-2002, 03:26 PM
Hi GT

small bug to report that you probably know about beaten lengths at stretch call is incorrect which seems to be a small prog change..maybe im wrong?? Hmmmmm !!!

I'm making a little progress here..

Stuball

Have a nice day !!!!!!!!:confused:

GameTheory
03-07-2002, 08:24 PM
I am checking to the beaten lengths. I must have messed something up at some point. I think it was working better in an earlier pre-release version...

stuball
03-10-2002, 09:56 PM
hi GT

First a problem -- I cannot get the program to output 1 big file from numerous input files..It only creates 1 file for 1 input file..I tried
[fbreak]=[none] and [fbreak]=[card] and it won't work. Also a suggestion can you set the beaten lengths for the leading horse and the winner at the lengths the horse is in front...(much easier to do a query of contested races and/or easy leads. What do you think of that idea?

Have a nice day !!!!!!

Stuball

GameTheory
03-11-2002, 04:32 AM
I'll have a new version ready today -- the [fbreak] stuff does work, but it is confusing, and I actually realized it is completely unnecessary for the user to set that. The key is the output filename -- if you have it set to a filename that has the track or date in it, then it changes every input file anyway, and essentially the fbreak option doesn't do anything then.

To make one big file, do something like this:


[fnf]=[*myfilename*] ' note the asterisks to create literal name
[ext]=[csv] ' sets the file extension
[fbreak]=[none] ' doesn't break between input files


That will put everything in a file called "myfilename.csv" for A SINGLE RUN OF THE PROGRAM, which could be any number of input files. But if you run it again on a different set it will overwrite it. So add:

[append]=[yes]

And now it will just keep adding on to the end of that file. You just have to be careful not to process the same files twice or they'll end up in the results twice.

But in the next version, you won't have the fbreak option at all, only the append. It is not needed, because the sensible way to set it is always determined by the filename settings. So if you set the filename to trackcode-date, you will get a new file for every input; if you set it to trackcode only, you will get separate files for each track; if you set it to a literal, like above, you will get one file only, etc. You then only have to set the append to determine if you want to overwrite previous results or not.

As far as lengths ahead for the leader: I'm not going to change that, because beaten lengths = 0 is actually correct, and it is confusing to set it otherwise. But I will add another field for "lengths ahead" which will just have the chart values for lengths ahead of the next horse, and you can use the field substitution feature to put that value in there if you want, with something like this:

x:bl:fin | x:al:fin ' will substitute "ahead lengths" field if bl = 0

(Has anyone tested this substitution feature much? I think it works.)
If you do that for all the beaten lengths fields, it will substitute the lengths ahead if that horse is leading.


Other bug fixes include:

-- Double-quotes in the input are converted to single quotes so they don't mess up the output
-- The beaten lengths at the stretch call were fixed. They were simply not being processed at all at the stretch, and were always the raw values in the chart.
-- Some documentation errors.
-- Using *.* to pick files didn't work, now it does.
-- The "favorite flag" field didn't work, now it does.
-- You can set neck, head & nose values yourself.

I'm going to put it on my website for download; I'll post the location later today...

punchsaw
03-11-2002, 07:47 PM
This program is great!
I like the idea of incorporating stretch call beaten
lengths into my formulas, so I eagerly anticipate
your next release. I understand it will have that
glitch taken care of. Is it coming out today?
If not, I'll prepare my spreadsheets without stretch
call references.
Thanks again, keep up the great work.
Punchsaw
www.thoroughbred.tk
p.s. if my profiling leads to any big strikes, I'll remember
your paypal address.

GameTheory
03-11-2002, 07:56 PM
I'm just preparing it now. I need to re-do some of the documentation. The fixes I described above are all finished. I'll be putting it up sometime tonight, but could be quite late....

Zaf
05-14-2002, 01:29 AM
These programs are great , what a useful tool.

I am off to Atlantic City for a 4 day gambling bender. I was able to create a pace analysis (position/beaten length) report for 7 tracks in less than a half hour. Maybe this will help me a bit when I make my assault on the Race Books.

The old way would of taken me hours. I am only using the program for 2 days and have not yet even contemplated its potential power.

Thanks to Andy for the great work.