Skip to content

Instantly share code, notes, and snippets.

@egonelbre
Last active July 2, 2019 11:35
Show Gist options
  • Save egonelbre/a5208750ebd1825b19eb3e95d44a09db to your computer and use it in GitHub Desktop.
Save egonelbre/a5208750ebd1825b19eb3e95d44a09db to your computer and use it in GitHub Desktop.
spexs2 example for baseball predictions

Run with:

$ spexs2 --conf conf.json success=h10.success failure=h10.failure
Pat?()          Matches(success)        Matches(failure)
gf              5       0
eddeasffa
edssfdgea
sdsadsd
ggssfd
fesafsgae
sssfggf
fgff
desgffgdssa
segfedgsge
ggfssgasfg
{
"Dataset": {
"success" : { "File" : "$success$" },
"failure" : { "File" : "$failure$" }
},
"Reader" : {
"Method" : "Delimited",
"Separator" : "",
"CountSeparator": ""
},
"Extension": {
"Method": "Simple",
"Groups" : {},
"Extendable": {
"PatLength()" : {"max" : 7},
"PatGroups()" : {"max" : 3},
"MatchesProp(success)" : {"min" : 1},
},
"Outputtable" : {
"PatLength()" : {"min" : 2},
"Matches(failure)" : {"max" : 0},
"NoEndingGroup()" : {}
}
},
"Output": {
"SortBy": ["Matches(success)", "-Matches(failure)", "PatLength()"],
"Count": 10
},
"Printer" : {
"Method" : "Formatted",
"ShowHeader": true,
"Reverse": true,
"Header": "",
"Format": "Pat?()\t\tMatches(success)\tMatches(failure)\n"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment