|
81 | 81 | # embeddings are downloaded. The weights are about 300MB, and the embeddings |
82 | 82 | # 950MB. |
83 | 83 |
|
84 | | -python -m deep_reference_parser split --verbose "$(cat references.txt)" |
| 84 | +python -m deep_reference_parser split "$(cat references.txt)" |
85 | 85 |
|
86 | 86 | # For parsing: |
87 | 87 |
|
88 | | -python -m deep_reference_parser parse --verbose "$(cat references.txt)" |
| 88 | +python -m deep_reference_parser parse "$(cat references.txt)" |
89 | 89 | ``` |
90 | 90 |
|
91 | 91 | ## The longer guide |
@@ -157,21 +157,31 @@ parse, split, train |
157 | 157 | For additional help, you can pass a command with the `-h`/`--help` flag: |
158 | 158 |
|
159 | 159 | ``` |
160 | | -$ python -m deep_reference_parser predict --help |
161 | | -Using TensorFlow backend. |
162 | | -usage: deep_reference_parser predict [-h] |
163 | | - [-c] |
164 | | - [-t] [-v] |
165 | | - text |
| 160 | +$ python -m deep_reference_parser split --help |
| 161 | +usage: deep_reference_parser split [-h] |
| 162 | + [-c] |
| 163 | + [-t] [-o None] |
| 164 | + text |
| 165 | +
|
| 166 | + Runs the default splitting model and pretty prints results to console unless |
| 167 | + --outfile is parsed with a path. Can output either tokens (with -t|--tokens) |
| 168 | + or split naively into references based on the b-r tag (default). |
| 169 | +
|
| 170 | + NOTE: that this function is provided for examples only and should not be used |
| 171 | + in production as the model is instantiated each time the command is run. To |
| 172 | + use in a production setting, a more sensible approach would be to replicate |
| 173 | + the split or parse functions within your own logic. |
| 174 | + |
166 | 175 |
|
167 | 176 | positional arguments: |
168 | 177 | text Plaintext from which to extract references |
169 | 178 |
|
170 | 179 | optional arguments: |
171 | 180 | -h, --help show this help message and exit |
172 | | - -c --config-file Path to config file |
| 181 | + -c, --config-file Path to config file |
173 | 182 | -t, --tokens Output tokens instead of complete references |
174 | | - -v, --verbose Output more verbose results |
| 183 | + -o, --outfile Path to json file to which results will be written |
| 184 | +
|
175 | 185 |
|
176 | 186 | ``` |
177 | 187 |
|
|
0 commit comments