CentreForDigitalHumanities / CentreForDigitalHumanities/Textcavator
Corpus form: JSON definition workflow
- Dominant language
- Python
- Stars
- 12
- Forks
- 3
- Avg merge
- 3d 3m
- Merged PRs (30d)
- 9
Description
The proposed workout for #1795 would mean that the corpus form requires that you upload CSV data as the basis for the corpus, before you can continue with further steps.
This is kind of at odds with the option to base your corpus on a JSON definition. Technically, you could still do that: create the corpus from the JSON file, upload an image in the metadata form (but leave the rest untouched), upload compatible CSV data, skip the field configuration, index the corpus. But this is not very intuitive or clear.
One problem is that the JSON does not contain an image or CSV data, so in the step-based form, later steps are blocked. At the same time, if you are using a JSON definition as a basis, most of the form can be ignored, yet it's not clear the user what is required at this point.
Another problem is that uploading CSV data will normally generate a list of fields which can be further configured in the next step, but if the user is starting with a definition file, they have already specified exactly what fields they want. Yet they won't be able to verify that these fields were imported correctly before uploading a CSV file, which may overwrite the fields.
### Solution 1: dual workflow
This would mean there is a different "mode" for JSON-based corpus creation (which will probably reuse many of the same components). Here the steps would be:
- Upload JSON file and image
- Upload CSV data and verify compatibility with the corpus definition
- Index/publish
By contrast, the form-based corpus creation would be:
- Fill in metadata and upload image
- Upload CSV data, which generates fields
- Tweak generated fields
- Index/publish
That said, the primary purpose for the JSON option is to allow back-ups, transferring corpora between servers, etc.: I don't imagine any end-users would prefer editing a corpus this way.
### Solution 2: upload everything up front
Another solution is that the "import" option requires that the user upload the JSON, image, and CSV in a single form, so they are submitted (and validated) together. Once everything is uploaded, the corpus is created and the user is taken to the step-based form. All steps are now unlocked as if the user has gone through the full form, and the user can go straight to indexing.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.