Skip to content

Commit

Permalink
Quartz sync: Dec 5, 2024, 8:07 PM
Browse files Browse the repository at this point in the history
  • Loading branch information
elymatos committed Dec 5, 2024
1 parent 22ee51f commit 9da2c15
Show file tree
Hide file tree
Showing 41 changed files with 932 additions and 13 deletions.
4 changes: 2 additions & 2 deletions content/index.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
title: FNBr Database
title: FNBr database
---

[[webtool-4.0]]
Binary file added content/models/construction/construction.mwb
Binary file not shown.
Binary file added content/models/construction/construction.mwb.bak
Binary file not shown.
Binary file added content/models/construction/construction.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added content/models/daisy/daisy_db.mwb
Binary file not shown.
Binary file added content/models/daisy/daisy_db.mwb.bak
Binary file not shown.
Binary file added content/models/poetisa/poetisa_db.mwb
Binary file not shown.
Binary file added content/models/poetisa/poetisa_db.mwb.bak
Binary file not shown.
Binary file added content/models/rnt/rnt.mwb
Binary file not shown.
Binary file added content/models/rnt/rnt.mwb.bak
Binary file not shown.
Binary file added content/models/soul/soul-0.1.mwb
Binary file not shown.
Binary file added content/models/soul/soul-0.1.mwb.bak
Binary file not shown.
Binary file added content/models/soul/soul-0.2.mwb
Binary file not shown.
Binary file added content/models/soul/soul-0.2.mwb.bak
Binary file not shown.
24 changes: 24 additions & 0 deletions content/models/webtool/README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
Esta pasta contem os scripts para atualização do banco para a versão 4.0.

Esta versão é de julho/2024, com os principais objetivos:

- Reunificar as tabelas usadas nos projetos de multimodalidade.
- Elevar SENTENCE para entity para permitir relacionamentos diversos.
- Criar tabelas que atendam ao processo de tokenização.
- Criar a estrutura para projetos e datasets.
- Criar a estrutura para tarefas do usuário.
- Registrar cada anotação no contexto de um projeto/tarefa.
- Incrementar o uso de views para facilitar as consultas ao banco.
- Criar uma estrutura de mensagens para o usuário.
- Remover tabelas que não estão sendo usadas: Property, Translation, C5Node, C5Link, Form*, Log, Person, SubCorpus, Template, Transaction, WordSegment.


- Projetos de Multimodalidade

. Unificar as estruturas para os tipos de anotação multimodal
. Remover o sufixo MM
. Tabelas para Sentence, Image, Video, Sound
. Objetos visuais (VisualObject) compostode de uma ou mais BoundingBox


- Criar uma tabela sentence_translatiopn_temp temporaria, para a reorganização da sentence_translation;
Binary file added content/models/webtool/fnbr-3.7.mwb
Binary file not shown.
Binary file added content/models/webtool/fnbr-3.7.mwb.bak
Binary file not shown.
Binary file added content/models/webtool/fnbr-3.8.mwb
Binary file not shown.
Binary file added content/models/webtool/fnbr-3.8.mwb.bak
Binary file not shown.
Binary file added content/models/webtool/fnbr-4.0.mwb
Binary file not shown.
Binary file added content/models/webtool/fnbr-4.0.mwb.bak
Binary file not shown.
449 changes: 449 additions & 0 deletions content/models/webtool/migration.sql

Large diffs are not rendered by default.

21 changes: 21 additions & 0 deletions content/models/webtool/migration_project.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
--
-- script para criação da estrtura default de project
-- para webtool40
--
-- Project: Default
-- Dataset: Default
-- Task: Default

insert into project(name, description) values ('Default Project', 'Default Project');
insert into dataset(name,description,idProject) values ('Default Dataset', 'Default Dataset', (select idProject from project where name = 'Default Project'));
insert into task(size,isActive,type,createdAt,name,description,idDataset) values
(0,1,'Annotation',now(),'Default Task','Default Task',(select idDataset from dataset where name = 'Default Dataset'));

-- associa todos os corpus existentes ao Dataset Default, até que sejam criados os projetos corretos.

select idDataset into @idDataset from dataset where name = 'Default Dataset';
update corpus set idDataset = @idDataset where idCorpus > 0;
delete from dataset_corpus where idCorpus > 0;
insert into dataset_corpus (idDataset, idCorpus)
select idDataset,idCorpus from corpus;

297 changes: 297 additions & 0 deletions content/models/webtool/migration_project_update_4.01.txt

Large diffs are not rendered by default.

26 changes: 26 additions & 0 deletions content/models/webtool/tqr2.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
insert into qualiarelation(name,direct,inverse) values ('Causation','causes','caused_by');
insert into qualiarelation(name,direct,inverse) values ('Action','acts_on','object_of');
insert into qualiarelation(name,direct,inverse) values ('Result','results','result_from');
insert into qualiarelation(name,direct,inverse) values ('Affect','affects','affected_by');
insert into qualiarelation(name,direct,inverse) values ('Creation','creates','created_by');
insert into qualiarelation(name,direct,inverse) values ('Transfer','transfers','transfered_by');
insert into qualiarelation(name,direct,inverse) values ('Use','uses','used_by');
insert into qualiarelation(name,direct,inverse) values ('Membership','member_of','has_member');
insert into qualiarelation(name,direct,inverse) values ('Activity','activity_of','has_actor');
insert into qualiarelation(name,direct,inverse) values ('Quality','quality_of','has_quality');
insert into qualiarelation(name,direct,inverse) values ('Containment','contains','contained_in');
insert into qualiarelation(name,direct,inverse) values ('Part_whole','part_of','has_part');
insert into qualiarelation(name,direct,inverse) values ('Location','location_of','located_in');
insert into qualiarelation(name,direct,inverse) values ('Inclusion','includes','included_at');
insert into qualiarelation(name,direct,inverse) values ('Material','material_of','has_material');
insert into qualiarelation(name,direct,inverse) values ('Relation','related_to','related_to');
insert into qualiarelation(name,direct,inverse) values ('Origin','origin_of','has_origin');
insert into qualiarelation(name,direct,inverse) values ('Production','produces','product_of');
insert into qualiarelation(name,direct,inverse) values ('Feeling','feels','feeling_of');
insert into qualiarelation(name,direct,inverse) values ('Use_as','used_as','use_of');
insert into qualiarelation(name,direct,inverse) values ('Use_against','used_againsts','telic_of');
insert into qualiarelation(name,direct,inverse) values ('Use_for','used_for','telic_of');
insert into qualiarelation(name,direct,inverse) values ('Change_to','changes_to','changes_from');
insert into qualiarelation(name,direct,inverse) values ('Change_from','changes_from','changes_to');
insert into qualiarelation(name,direct,inverse) values ('Type','type_of','has_type');
insert into qualiarelation(name,direct,inverse) values ('Exemplar','exemplar_of','has_exemplar');
Binary file added content/models/webtool/webtool-3.5.mwb
Binary file not shown.
Binary file added content/models/webtool/webtool-3.6.mwb
Binary file not shown.
Binary file added content/models/webtool/webtool-3.7.mwb
Binary file not shown.
Binary file added content/models/webtool/webtool-3.7.mwb.bak
Binary file not shown.
102 changes: 102 additions & 0 deletions content/models/webtool/webtool-4.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
# webtool-4.0


## Nova estrutura para projetos

- Tabelas: Project, Dataset, Task, UserTask

### Tabela AnnotationObject

- todos os objetos que podem ser anotados
- equivale ao ENTITY para as tabelas da estrutura
- tipos de objetos:

- SEN Sentence
- SOB Static Object
- DOB Dynamic Object
- TXS Text Span
- IMG Image
- DOC Document
- VID Video
- BBX BoundingBox


### Tabelas de Objetos

- boundingbox: usado nas anotaçãoes estática e dinâmica
- dynamicobject: Usado na anotação dinâmica; um DynamicObject pode ter várias BBoxes
- staticobject: Usado na anotação dinâmica; equivale às Entities do Flickr30k; pode ter várias BBoxes
- video: informações sobre os videos da anotação dinâmica
- image: informações sobre as imagens (atualmente apenas do Flickr30k)
- token: texto (token) e posição do token em uma sentença
- sentence: texto de uma sentença (associada a um ou mais documentos)
- textspan: startchar/endchar (substitui o label na notação de texto); usado também na anotação estática
- timespan: startTime/endTime usados na anotação dinâmica
- document: documentos (associados a sentenças)

### Relações entre objetos

- as relações entre objetos são registradas na tabela AnnotationObjectRelation

- rel_translation: sentence/sentence
- rel_description: image/sentence
- rel_video_sentence: video/sentence
- rel_video_dynobj: video/dynamicobject
- rel_image_staobj: image/staticobject
- rel_image_sentence: image/sentence
- rel_dynobj_bbox: dynamicobject/boundingbox
- rel_staobj_bbox: staticobject/boundingbox
- rel_sentence_time: sentence/timespan - anotação dinâmica
- rel_sentence_textspan: sentence/textspan - anotação estática
- rel_textspan_bbox: textspan/boundingbox
- rel_document_sentence: document/sentence
- rel_document_video: document/video

### Anotação

- uma anotação é a relação entre um AnnotationObject e uma Entity, no contexto de uma UserTask
- relationtype: rel_annotation

## Atualização de Entity.type para 3 chars

- AST AnnotationStatus (tabela TypeInstance)
- C5 C5
- CE Construction Element
- CON Constraint
- CPT Concept
- CRP Corpus
- CTY Core Type
- CXN Construction
- DOC Document
- FE FrameElement
- FRM Frame
- GLB GenericLabel
- GEN Genre
- GTY GenreType
- ITY Instantiation Type
- LEM Lemma
- LTY LayerType
- LU LU
- LEX Lexeme
- CNT Constraint Type
- POS POS
- CTY Concept Type
- QLA Qualia
- QLR Qualia relation
- RTG Relation Group
- RTY Relation Type
- STY Semantic Type
- TYP Type
- UDF UD Feature
- UDP UD POS
- UDR UD Relation
- WFM WordForm

### Novos tipos

- PRJ Project
- DTS Dataset
- TSK Task



Binary file added content/models/webtool/webtool-4.0.mwb
Binary file not shown.
Binary file added content/models/webtool/webtool-4.0.mwb.bak
Binary file not shown.
Binary file added content/models/webtool/webtool-4.0.mwb.beforefix
Binary file not shown.
Binary file added content/models/webtool/webtool-4.01.mwb
Binary file not shown.
Binary file added content/models/webtool/webtool-4.01.mwb.bak
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/features/breadcrumbs.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Component.Breadcrumbs({
spacerSymbol: "", // symbol between crumbs
rootName: "Home", // name of first/root element
resolveFrontmatterTitle: true, // whether to resolve folder names through frontmatter titles
hideOnRoot: true, // whether to hide breadcrumbs on root `index.md` page
hideOnRoot: true, // whether to hide breadcrumbs on root `_index.md` page
showCurrentPage: true, // whether to display the current page in the breadcrumbs
})
```
Expand Down
2 changes: 1 addition & 1 deletion quartz/cli/handlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ export async function handleCreate(argv) {
}
} else if (setupStrategy === "new") {
await fs.promises.writeFile(
path.join(contentFolder, "index.md"),
path.join(contentFolder, "_index.md"),
`---
title: Welcome to Quartz
---
Expand Down
2 changes: 1 addition & 1 deletion quartz/components/Breadcrumbs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ interface BreadcrumbOptions {
*/
resolveFrontmatterTitle: boolean
/**
* Whether to display breadcrumbs on root `index.md`
* Whether to display breadcrumbs on root `_index.md`
*/
hideOnRoot: boolean
/**
Expand Down
2 changes: 1 addition & 1 deletion quartz/components/ExplorerNode.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export class FileNode {
// base case, insert here
if (fileData.path.length === 1) {
if (nextSegment === "") {
// index case (we are the root and we just found index.md), set our data appropriately
// index case (we are the root and we just found _index.md), set our data appropriately
const title = fileData.file.frontmatter?.title
if (title && title !== "index") {
this.displayName = title
Expand Down
12 changes: 6 additions & 6 deletions quartz/util/path.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ describe("typeguards", () => {
assert(!path.isSimpleSlug("abc/index"))
assert(!path.isSimpleSlug("abc#anchor"))
assert(!path.isSimpleSlug("abc?query=1"))
assert(!path.isSimpleSlug("index.md"))
assert(!path.isSimpleSlug("_index.md"))
assert(!path.isSimpleSlug("index.html"))
})

Expand Down Expand Up @@ -53,7 +53,7 @@ describe("typeguards", () => {
})

test("isFilePath", () => {
assert(path.isFilePath("content/index.md"))
assert(path.isFilePath("content/_index.md"))
assert(path.isFilePath("content/test.png"))
assert(!path.isFilePath("../test.pdf"))
assert(!path.isFilePath("content/test"))
Expand Down Expand Up @@ -97,12 +97,12 @@ describe("transforms", () => {
test("slugifyFilePath", () => {
asserts(
[
["content/index.md", "content/index"],
["content/_index.md", "content/index"],
["content/index.html", "content/index"],
["content/_index.md", "content/index"],
["/content/index.md", "content/index"],
["/content/_index.md", "content/index"],
["content/cool.png", "content/cool.png"],
["index.md", "index"],
["_index.md", "index"],
["test.mp4", "test.mp4"],
["note with spaces.md", "note-with-spaces"],
["notes.with.dots.md", "notes.with.dots"],
Expand All @@ -125,7 +125,7 @@ describe("transforms", () => {
["./index", "./"],
["./index#abc", "./#abc"],
["./index.html", "./"],
["./index.md", "./"],
["./_index.md", "./"],
["./index.css", "./index.css"],
["content", "./content"],
["content/test.md", "./content/test"],
Expand Down
2 changes: 1 addition & 1 deletion quartz/util/path.ts
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ function isFolderPath(fplike: string): boolean {
return (
fplike.endsWith("/") ||
endsWith(fplike, "index") ||
endsWith(fplike, "index.md") ||
endsWith(fplike, "_index.md") ||
endsWith(fplike, "index.html")
)
}
Expand Down

0 comments on commit 9da2c15

Please sign in to comment.