update documentation
This commit is contained in:
parent
49071aefa6
commit
829894d1d0
1 changed files with 29 additions and 21 deletions
34
README.md
34
README.md
|
@ -21,7 +21,8 @@ Functionality is provided by two main driver scripts: encode.py and decode.py. L
|
||||||
### encode.py
|
### encode.py
|
||||||
|
|
||||||
```
|
```
|
||||||
usage: encode.py [-h] [-d N] [-e {std,rmana,rmana_dual,rfields,vec}] [-s] [-v]
|
usage: encode.py [-h] [-e {std,named,noname,rfields,old,norarity,vec,custom}]
|
||||||
|
[-r] [--nolinetrans] [--nolabel] [-s] [-v]
|
||||||
infile [outfile]
|
infile [outfile]
|
||||||
|
|
||||||
positional arguments:
|
positional arguments:
|
||||||
|
@ -30,27 +31,33 @@ positional arguments:
|
||||||
|
|
||||||
optional arguments:
|
optional arguments:
|
||||||
-h, --help show this help message and exit
|
-h, --help show this help message and exit
|
||||||
-d N, --duplicate N number of times to duplicate each card
|
-e {std,named,noname,rfields,old,norarity,vec,custom}, --encoding {std,named,noname,rfields,old,norarity,vec,custom}
|
||||||
-e {std,rmana,rmana_dual,rfields,vec}, --encoding {std,rmana,rmana_dual,rfields,vec}
|
encoding format to use
|
||||||
|
-r, --randomize randomize the order of symbols in mana costs
|
||||||
|
--nolinetrans don't reorder lines of card text
|
||||||
|
--nolabel don't label fields
|
||||||
-s, --stable don't randomize the order of the cards
|
-s, --stable don't randomize the order of the cards
|
||||||
-v, --verbose verbose output
|
-v, --verbose verbose output
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
The supported encodings are:
|
The supported encodings are:
|
||||||
|
|
||||||
Argument | Description
|
Argument | Description
|
||||||
-----------|------------
|
-----------|------------
|
||||||
std | standard format: |name|supertypes|types|loyalty|subtypes|rarity|pt|cost|text|
|
std | Standard format: `|type|supertype|subtype|loyalty|pt|text|cost|rarity|name|`.
|
||||||
rmana | randomized mana: as standard, but symbols in mana costs will be mixed: {^^UUUU} -> {UU^^UU}
|
named | Name first: `|name|type|supertype|subtype|loyalty|pt|text|cost|rarity|`.
|
||||||
rmana_dual | as rmana, but with a second mana cost field after the text field
|
noname | No name field at all: `|type|supertype|subtype|loyalty|pt|text|cost|rarity|`.
|
||||||
rfields | randomize the order of the fields, and use a label to distinguish which field is which
|
rfields | Randomize the order of the fields, using only the label to distinguish which field is which.
|
||||||
vec | produce a content vector for each card; used with [word2vec](https://code.google.com/p/word2vec/)
|
old | Legacy format: `|name|supertype|type|loyalty|subtype|rarity|pt|cost|text|`. No field labels.
|
||||||
|
norarity | Older legacy format: `|name|supertype|type|loyalty|subtype|rarity|pt|cost|text|`. No field labels.
|
||||||
|
vec | Produce a content vector for each card; used with [word2vec](https://code.google.com/p/word2vec/).
|
||||||
|
custom | Blank format slot, inteded to help users add their own formats to the python source.
|
||||||
|
|
||||||
### decode.py
|
### decode.py
|
||||||
|
|
||||||
```
|
```
|
||||||
usage: decode.py [-h] [-g] [-f] [-c] [-d] [--norarity] [-v] [-mse]
|
usage: decode.py [-h] [-e {std,named,noname,rfields,old,norarity,vec,custom}]
|
||||||
|
[-g] [-f] [-c] [-d] [-v] [-mse]
|
||||||
infile [outfile]
|
infile [outfile]
|
||||||
|
|
||||||
positional arguments:
|
positional arguments:
|
||||||
|
@ -59,14 +66,15 @@ positional arguments:
|
||||||
|
|
||||||
optional arguments:
|
optional arguments:
|
||||||
-h, --help show this help message and exit
|
-h, --help show this help message and exit
|
||||||
|
-e {std,named,noname,rfields,old,norarity,vec,custom}, --encoding {std,named,noname,rfields,old,norarity,vec,custom}
|
||||||
|
encoding format to use
|
||||||
-g, --gatherer emulate Gatherer visual spoiler
|
-g, --gatherer emulate Gatherer visual spoiler
|
||||||
-f, --forum use pretty mana encoding for mtgsalvation forum
|
-f, --forum use pretty mana encoding for mtgsalvation forum
|
||||||
-c, --creativity use CBOW fuzzy matching to check creativity of cards
|
-c, --creativity use CBOW fuzzy matching to check creativity of cards
|
||||||
-d, --dump dump out lots of information about invalid cards
|
-d, --dump dump out lots of information about invalid cards
|
||||||
--norarity the card format has no rarity field; use for legacy input
|
|
||||||
-v, --verbose verbose output
|
-v, --verbose verbose output
|
||||||
-mse, --mse use Magic Set Editor 2 encoding; will output as .mse-set
|
-mse, --mse use Magic Set Editor 2 encoding; will output as .mse-
|
||||||
file
|
set file
|
||||||
```
|
```
|
||||||
|
|
||||||
The default output is a text spoiler which modifies the output of the neural net as little as possible while making it human readable. Specifying the -g option will produce a prettier, Gatherer-inspired text spoiler with heavier-weight transformations applied to the text, such as capitalization. The -f option encodes mana symbols in the format used by the mtgsalvation forum; this is useful if you want to cut and paste your spoiler into a post to share it.
|
The default output is a text spoiler which modifies the output of the neural net as little as possible while making it human readable. Specifying the -g option will produce a prettier, Gatherer-inspired text spoiler with heavier-weight transformations applied to the text, such as capitalization. The -f option encodes mana symbols in the format used by the mtgsalvation forum; this is useful if you want to cut and paste your spoiler into a post to share it.
|
||||||
|
|
Loading…
Reference in a new issue