Page 2 of 2

Re: Magic Grammar

PostPosted: 27 Oct 2011, 08:39
by Arch
I'm not sure what data source I'm using. I just grabbed the current data I had at that point in time.

The real/user/sys is the output from the *nix time program. You would use it like: time java -jar ... and it would run the program and output the stats. Real is the real-world time it took to execute the program. User + sys is the time it took for the computer to run it. (Since I have 4 cores the user + sys is around 4 times the real time.)

Based on the values here your setup is something like 100 to 1000 times faster than mine.

Re: Magic Grammar

PostPosted: 31 Oct 2011, 05:34
by Max mtg
silly freak wrote:Anyway, I've put together a blog post about my accomplishment so far. Do you (all) have anything to look at? It would be very inspirational!
It has not changed much since the beginning of month, but there's what I have.

Need VS2010 or Visual C# 2010 Express to build.
After opening the project make sure that the paths set up in App.config are correct for your system

Re: Magic Grammar

PostPosted: 31 Oct 2011, 06:27
by MageKing17
silly freak wrote:I use Magic Data 2011/10/01, and after filtering that, it seems to contain 11889 unique abilities.
Allow me to ignore most of the conversational thread and focus on one thing you said: by "unique abilities", is that counting "Darksteel Colossus is indestructible." and "Blightsteel Colossus is indestructible." as two separate abilities, or one unique ability?

Re: Magic Grammar

PostPosted: 02 Nov 2011, 08:22
by silly freak
MageKing17 wrote:
silly freak wrote:I use Magic Data 2011/10/01, and after filtering that, it seems to contain 11889 unique abilities.
Allow me to ignore most of the conversational thread and focus on one thing you said: by "unique abilities", is that counting "Darksteel Colossus is indestructible." and "Blightsteel Colossus is indestructible." as two separate abilities, or one unique ability?
good question! I didn't really put thought into that... I read individual abilities from Magic Data, stripped the name and put it into a set, thus ignoring duplicates. so the string "~ is indestructible" is unique in my file.

Re: Magic Grammar

PostPosted: 03 Nov 2011, 16:12
by MageKing17
silly freak wrote:
MageKing17 wrote:
silly freak wrote:I use Magic Data 2011/10/01, and after filtering that, it seems to contain 11889 unique abilities.
Allow me to ignore most of the conversational thread and focus on one thing you said: by "unique abilities", is that counting "Darksteel Colossus is indestructible." and "Blightsteel Colossus is indestructible." as two separate abilities, or one unique ability?
good question! I didn't really put thought into that... I read individual abilities from Magic Data, stripped the name and put it into a set, thus ignoring duplicates. so the string "~ is indestructible" is unique in my file.
Fascinating. 11889 truly unique abilities... my overly-simplistic parser feels woefully inadequate for some reason.

Re: Magic Grammar

PostPosted: 11 Nov 2011, 11:26
by silly freak
Update: after searching for the truncated card names, too (like "Akroma" in "Akroma, Angel of Wrath") it's only 11879 any more. I only splitted at the first comma, I don't know if other such cases exist...

Here's my most recent stats. I've rewritten some code; the timing is now more strictly only parsing, no output processing any more, and my data source now contains enough information to calculate unique abilities, duplicate abilities and complete cards. (it's here for anyone in need of a data source)

Code: Select all
Abilities: 11879; Successful:  1222, Failed: 10657 (10.3%)
With dups: 19710; Successful:  6079, Failed: 13631 (30.8%)
Cards:     12237; Successful:  1600, Failed: 10637 (13.1%)

2.2 s for 11879 abilities (181487 ns per ability)

Re: Magic Grammar

PostPosted: 13 Nov 2011, 20:01
by MageKing17
silly freak wrote:Update: after searching for the truncated card names, too (like "Akroma" in "Akroma, Angel of Wrath") it's only 11879 any more. I only splitted at the first comma, I don't know if other such cases exist...
IIRC, there are three possible "Legendname" formats: "<Name>, <Title>", "<Name> of <Whatever>", and "<Name> the <Title>". If you make your search (after full CARDNAME replacements, of course) look for the name but with the regexp "(, | of | the ).*" stripped out, it should grab all such instances.

Re: Magic Grammar

PostPosted: 14 Nov 2011, 08:17
by silly freak
MageKing17 wrote:
silly freak wrote:Update: after searching for the truncated card names, too (like "Akroma" in "Akroma, Angel of Wrath") it's only 11879 any more. I only splitted at the first comma, I don't know if other such cases exist...
IIRC, there are three possible "Legendname" formats: "<Name>, <Title>", "<Name> of <Whatever>", and "<Name> the <Title>". If you make your search (after full CARDNAME replacements, of course) look for the name but with the regexp "(, | of | the ).*" stripped out, it should grab all such instances.
Thanks for your tip! I tried that, but there are unfortunately false positives with that: Flash of Defiance and Tuktuk the Explorer for example. The second is especially nasty because it's even a legendary creature, so being legendary is not enough to see whether nicknames are appropriate. It's logged in my mind now, I'm sure there's a way.

Re: Magic Grammar

PostPosted: 14 Nov 2011, 09:37
by MageKing17
silly freak wrote:Thanks for your tip! I tried that, but there are unfortunately false positives with that: Flash of Defiance and Tuktuk the Explorer for example. The second is especially nasty because it's even a legendary creature, so being legendary is not enough to see whether nicknames are appropriate. It's logged in my mind now, I'm sure there's a way.
Oh man, I did not think of Tuktuk the Explorer. On the other hand, I'm pretty sure anything appearing after the word "named" should be treated specially, because you don't want to do ~-substitution for, say, Brothers Yamazaki. It would interact strangely with Sakashima the Impostor, for one thing.