... | ... | @@ -23,9 +23,14 @@ They lie in app/apps/, they can be imported directly from anywhere because they |
|
|
|
|
|
1) core
|
|
|
It is the main application, it contains most models and business logic. The main models are:
|
|
|
* `Document`, which represents a working directory (for the user it could be a single doc, an related ensemble, an entire corpus).
|
|
|
Note: there will probably be a 'directory' level on top of this one for organisation purposes.
|
|
|
* DocumentPart, which basically represents an Image and its
|
|
|
* `Document`, which represents a working directory (for the user it could be a single doc, a related ensemble, an entire corpus..).
|
|
|
* `DocumentPart` represents an image which is usualy the scan of a page or a double page.
|
|
|
* `Block` and `Line` contains segmentation data.
|
|
|
* A `Transcription` is one representation of the text. It is unbound from the segmentation.
|
|
|
Which means one DocumentPart can only have one segmentation but many transcriptions.
|
|
|
* `LineTranscription` makes the link between the segmentation and the content.
|
|
|
It is also versionned to keep an history of modifications.
|
|
|
* `OcrModel` stores segmentation & recognition models.
|
|
|
|
|
|
2) api
|
|
|
Doesn't contain any models, it only defines `django-rest-framework` endpoints for __internal and external__ communication.
|
... | ... | @@ -37,7 +42,9 @@ Historicaly Missleading name, it deals with both importing and exporting data. |
|
|
* versioning defines an abstract model to keep the history of a model instance
|
|
|
* users stores everything related to users but unrelated to the business logic;
|
|
|
* bootstrap is just a display layer to automate generating bootstrap css frontend forms.
|
|
|
|
|
|
|
|
|
> Warning: It is very important to import one way only, from the more general to the more specific (to the business model).
|
|
|
> Not only does it protects against circular imports but it's also good design to have your data flow one way only.
|
|
|
|
|
|
## Frontend apps
|
|
|
The frontend code is mostly vanilla JS and some JQuery, we are considering using views.js, but since we are mostly backend devs we didn't jump in yet.
|
... | ... | |