diff --git a/backend/requirements.in b/backend/requirements.in index c095c88b..59f41045 100644 --- a/backend/requirements.in +++ b/backend/requirements.in @@ -9,4 +9,6 @@ corpus2alpino>=0.3.10 BaseXClient alpino-query>=2.1.10 celery[redis]>=5.2.0 --e git+https://github.com/UUDigitalHumanitieslab/mwe-query@bugfix/tests#egg=mwe-query +mwe-query>=0.0.4 +urllib3<=2.0.0 +psycopg2 \ No newline at end of file diff --git a/backend/requirements.txt b/backend/requirements.txt index 054f02c2..23f11163 100644 --- a/backend/requirements.txt +++ b/backend/requirements.txt @@ -1,51 +1,58 @@ # -# This file is autogenerated by pip-compile with python 3.10 -# To update, run: +# This file is autogenerated by pip-compile with Python 3.8 +# by the following command: # # pip-compile # --e git+https://github.com/UUDigitalHumanitieslab/mwe-query@bugfix/tests#egg=mwe-query - # via -r requirements.in alpino-query==2.1.10 # via # -r requirements.in # mwe-query amqp==5.1.1 # via kombu +annotated-types==0.5.0 + # via pydantic argparse==1.4.0 # via corpus2alpino -asgiref==3.5.2 +asgiref==3.7.2 # via django -async-timeout==4.0.2 +async-timeout==4.0.3 # via redis -attrs==22.1.0 - # via pytest +auchann==0.1.1 + # via sastadev +backports-zoneinfo[tzdata]==0.2.1 + # via + # celery + # django + # kombu basexclient==8.4.4 # via # -r requirements.in # mwe-query -beautifulsoup4==4.11.1 +beautifulsoup4==4.12.2 # via # django-livereload-server # tei-reader -billiard==3.6.4.0 +billiard==4.1.0 # via celery -blis==0.7.8 +blis==0.7.10 # via thinc -catalogue==2.0.8 +catalogue==2.0.9 # via # spacy # srsly # thinc -celery[redis]==5.2.7 +celery[redis]==5.3.1 # via -r requirements.in -certifi==2022.9.24 +certifi==2023.7.22 # via requests -chamd==0.5.8 - # via corpus2alpino -charset-normalizer==2.1.1 +chamd==0.5.11 + # via + # auchann + # corpus2alpino +charset-normalizer==3.2.0 # via requests -click==8.1.3 +click==8.1.6 # via # celery # click-didyoumean @@ -56,20 +63,18 @@ click-didyoumean==0.3.0 # via celery click-plugins==1.1.1 # via celery -click-repl==0.2.0 +click-repl==0.3.0 # via celery -confection==0.0.3 +confection==0.1.1 # via thinc corpus2alpino==0.3.10 # via -r requirements.in -cymem==2.0.6 +cymem==2.0.7 # via # preshed # spacy # thinc -deprecated==1.2.13 - # via redis -django==4.1.2 +django==4.2.4 # via # -r requirements.in # django-livereload-server @@ -81,133 +86,163 @@ django-revproxy==0.10.0 # via -r requirements.in djangorestframework==3.14.0 # via -r requirements.in -execnet==1.9.0 +editdistance==0.6.2 + # via auchann +et-xmlfile==1.1.0 + # via openpyxl +exceptiongroup==1.1.3 + # via pytest +execnet==2.0.2 # via pytest-xdist folia==2.5.8 # via corpus2alpino idna==3.4 # via requests -iniconfig==1.1.1 +iniconfig==2.0.0 # via pytest isodate==0.6.1 # via rdflib jinja2==3.1.2 # via spacy -kombu==5.2.4 +kombu==5.3.1 # via celery langcodes==3.3.0 # via spacy -lxml==4.9.1 +lxml==4.9.3 # via # alpino-query # folia + # sastadev # tei-reader -markupsafe==2.1.1 +markupsafe==2.1.3 # via jinja2 -murmurhash==1.0.8 +murmurhash==1.0.9 # via # preshed # spacy # thinc -numpy==1.23.3 +mwe-query==0.0.4 + # via -r requirements.in +numpy==1.24.4 # via + # blis # spacy # thinc -packaging==21.3 +openpyxl==3.1.2 + # via sastadev +packaging==23.1 # via # pytest - # redis # spacy -pathy==0.6.2 + # thinc +pathy==0.10.2 # via spacy -pluggy==1.0.0 +pluggy==1.2.0 # via pytest -preshed==3.0.7 +preshed==3.0.8 # via # spacy # thinc -prompt-toolkit==3.0.31 +prompt-toolkit==3.0.39 # via click-repl -py==1.11.0 - # via - # pytest - # pytest-forked -pydantic==1.9.2 +psycopg2==2.9.7 + # via -r requirements.in +pydantic==2.1.1 # via + # confection # spacy # thinc -pyparsing==3.0.9 - # via - # packaging - # rdflib -pytest==7.1.3 +pydantic-core==2.4.0 + # via pydantic +pyparsing==3.1.1 + # via rdflib +pytest==7.4.0 # via # -r requirements.in # pytest-django - # pytest-forked # pytest-xdist pytest-django==4.5.2 # via -r requirements.in -pytest-forked==1.4.0 - # via pytest-xdist -pytest-xdist==2.5.0 +pytest-xdist==3.3.1 # via -r requirements.in -pytz==2022.4 - # via - # celery - # djangorestframework -rdflib==6.2.0 +python-dateutil==2.8.2 + # via celery +pytz==2023.3 + # via djangorestframework +pyyaml==6.0.1 + # via pyyaml-include +pyyaml-include==1.3.1 + # via auchann +rdflib==7.0.0 # via folia -redis==4.3.4 +redis==5.0.0 # via celery -requests==2.28.1 +requests==2.31.0 # via # alpino-query # folia # mwe-query # spacy -sastadev==0.0.3 - # via mwe-query +sastadev==0.1.1 + # via + # auchann + # mwe-query six==1.16.0 # via - # click-repl # django-livereload-server -smart-open==5.2.1 - # via pathy -soupsieve==2.3.2.post1 + # isodate + # python-dateutil +smart-open==6.3.0 + # via + # pathy + # spacy +soupsieve==2.4.1 # via beautifulsoup4 -spacy==3.4.1 +spacy==3.6.1 # via corpus2alpino -spacy-legacy==3.0.10 +spacy-legacy==3.0.12 # via spacy -spacy-loggers==1.0.3 +spacy-loggers==1.0.4 # via spacy -sqlparse==0.4.3 +sqlparse==0.4.4 # via django -srsly==2.4.4 +srsly==2.4.7 # via + # confection # spacy # thinc tei-reader==0.0.17 # via corpus2alpino -thinc==8.1.3 +thinc==8.1.12 # via spacy tomli==2.0.1 # via pytest -tornado==6.2 +tornado==6.3.3 # via django-livereload-server -tqdm==4.64.1 +tqdm==4.66.1 # via # corpus2alpino # spacy -typer==0.4.2 +typer==0.9.0 # via # pathy # spacy -typing-extensions==4.4.0 - # via pydantic -urllib3==1.26.12 +typing-extensions==4.7.1 # via + # annotated-types + # asgiref + # kombu + # pydantic + # pydantic-core + # sastadev + # typer +tzdata==2023.3 + # via + # backports-zoneinfo + # celery +urllib3==1.26.16 + # via + # -r requirements.in # django-revproxy # requests vine==5.0.0 @@ -215,15 +250,14 @@ vine==5.0.0 # amqp # celery # kombu -wasabi==0.10.1 +wasabi==1.1.2 # via # spacy - # spacy-loggers # thinc -wcwidth==0.2.5 +wcwidth==0.2.6 # via prompt-toolkit -wrapt==1.14.1 - # via deprecated +xlsxwriter==3.1.2 + # via sastadev # The following packages are considered to be unsafe in a requirements file: # setuptools diff --git a/backend/search/models.py b/backend/search/models.py index f231c81c..f27e5e9b 100644 --- a/backend/search/models.py +++ b/backend/search/models.py @@ -390,14 +390,14 @@ def perform_search(self) -> None: # completed yet, and starting with those that have not started yet # (because those for which search has already started may finish # early). - result_objs = self.results.filter(search_completed__isnull=True) + result_objs_query = self.results.filter(search_completed__isnull=True) # add failed result objects (with errors and no results) - result_objs |= self.results.filter(number_of_results=0).exclude(errors=None).exclude(errors='') + result_objs_query |= self.results.filter(number_of_results=0).exclude(errors=None).exclude(errors='') - result_objs = result_objs.order_by(F('completed_part').desc(nulls_first=True), - 'component__slug') + result_objs_query = result_objs_query.order_by(F('completed_part').desc(nulls_first=True), + 'component__slug') - result_objs = list(result_objs) + result_objs = list(result_objs_query) # append results that should be complete but can't be read result_objs += [r for r in self.results.filter(search_completed__isnull=False) if not r.check_results()] diff --git a/web-ui/src/app/app-routing/links.ts b/web-ui/src/app/app-routing/links.ts index 07245b55..de648ab9 100644 --- a/web-ui/src/app/app-routing/links.ts +++ b/web-ui/src/app/app-routing/links.ts @@ -28,6 +28,11 @@ const links: Link[] = [ link: '/mwe-search', proxy: false, }, + { + name: 'About', + link: '/about', + proxy: false, + }, { name: 'Documentation', link: '/documentation', @@ -42,6 +47,7 @@ const mainLinksName = [ 'Example-based Search', 'XPath Search', 'Multiword Expressions', + 'About', 'Documentation' ]; diff --git a/web-ui/src/app/app-routing/routes.ts b/web-ui/src/app/app-routing/routes.ts index 18c27a25..32d11cc4 100644 --- a/web-ui/src/app/app-routing/routes.ts +++ b/web-ui/src/app/app-routing/routes.ts @@ -2,8 +2,10 @@ * All the routes of the main pages */ -import { HomePageComponent } from '../pages/home-page/home-page.component'; import { Routes } from '@angular/router'; + +import { AboutPageComponent } from '../pages/about-page/about-page.component'; +import { HomePageComponent } from '../pages/home-page/home-page.component'; import { DocumentationComponent } from '../pages/documentation/documentation.component'; import { XpathSearchComponent } from '../pages/xpath-search/xpath-search.component'; import { MultiWordExpressionsComponent } from '../pages/multi-word-expressions/multi-word-expressions.component'; @@ -12,35 +14,39 @@ import { ExternalTreeVisualizerComponent } from '../components/tree-visualizer/e const routes: Routes = [ - { - path: 'home', - component: HomePageComponent, - }, - { - path: 'example-based-search', - component: ExampleBasedSearchComponent, - }, - { - path: 'xpath-search', - component: XpathSearchComponent, - }, - { - path: 'mwe-search', - component: MultiWordExpressionsComponent, - }, - { - path: 'documentation', - component: DocumentationComponent, - }, - { - path: 'tree', - component: ExternalTreeVisualizerComponent, - }, - { - path: '', - redirectTo: '/home', - pathMatch: 'full' - } + { + path: 'home', + component: HomePageComponent, + }, + { + path: 'example-based-search', + component: ExampleBasedSearchComponent, + }, + { + path: 'xpath-search', + component: XpathSearchComponent, + }, + { + path: 'mwe-search', + component: MultiWordExpressionsComponent, + }, + { + path: 'about', + component: AboutPageComponent, + }, + { + path: 'documentation', + component: DocumentationComponent, + }, + { + path: 'tree', + component: ExternalTreeVisualizerComponent, + }, + { + path: '', + redirectTo: '/home', + pathMatch: 'full' + } ]; export { routes }; diff --git a/web-ui/src/app/app.module.ts b/web-ui/src/app/app.module.ts index fa784bf8..05f3c98b 100644 --- a/web-ui/src/app/app.module.ts +++ b/web-ui/src/app/app.module.ts @@ -19,6 +19,8 @@ import { LassyXPathModule } from 'lassy-xpath'; import { ClipboardModule } from 'ngx-clipboard'; import { AppComponent } from './app.component'; +import { AboutContentComponent } from './pages/about-page/about-content.component'; +import { AboutPageComponent } from './pages/about-page/about-page.component'; import { HomePageComponent } from './pages/home-page/home-page.component'; import { HomeContentComponent } from './pages/home-page/home-content/home-content.component'; import { AppRoutingModule } from './app-routing/app-routing.module'; @@ -106,6 +108,8 @@ export const declarations: any[] = [ HighlightPipe, HighlightMatchPipe, TransitionNumbersPipe, + AboutContentComponent, + AboutPageComponent, HomeContentComponent, HomePageComponent, LoginStatusComponent, diff --git a/web-ui/src/app/pages/about-page/about-content.component.html b/web-ui/src/app/pages/about-page/about-content.component.html new file mode 100644 index 00000000..69a31152 --- /dev/null +++ b/web-ui/src/app/pages/about-page/about-content.component.html @@ -0,0 +1,53 @@ +
+

+ GrETEL is a web application that enables researchers to search for grammatical constructions in text corpora + based + on an example of the construction. This makes it possible for a user to search for grammatical constructions + without + having to know the full details of the syntactic structures used in GrETEL or a query language. +

+

+ Versions 1 through 3 of GrETEL were created by KU Leuven [Augustinus et al. 2012], Utrecht University´s Centre + for + Digital Humanities (Research Software Lab) has + continued the development with versions 4 (gretel.hum.uu.nl) and 5 (gretel5.hum.uu.nl). In version 4 the UU Centre for Digital Humanities + added + a component to analyse the search results and a component for users to upload their own text corpus [Odijk et + al. + 2018]. In version 5, which is still under development, a component has been added to enable search for flexible + multiword expressions based on an example. [Odijk et al., to appear]. Further works on GreTEL include + [Augustinus et + al. 2017, Broeder & Odijk 2022, Odijk 2020a, Odijk 2022b, Odijk 2023] +

+

+ GrETEL has been used for a wide variety of linguistic research, resulting in multiple Ph.D. theses and + scientific + articles. These include [Augustinus & van Eynde 2012, 2015, 2017], [Augustinus 2015], [Bloem 2021], [Van Tuyl & + Coopmans 2021], [Odijk 2015, 2016, 2020b, 2022a], [Van Eynde 2014], [Van Eynde et al. 2016]. And it is currently + being used by a range of researchers, including Martin Kroon (UL, UU), Marijana Marelj (UU), F. Groothoff (UU), + Floris Roelofsen (UvA), and the applicant, Aleksei Nazarov. It has also been used to enrich the Dutch + Taalportaal + with links to data in actual corpora [Bouma et al. 2015, Van der Wouden 2016, 2017] +

+

+ An educational package for GrETEL was developed in 2014 [Augustinus et al, 2014], and more recently a tutorial + was + given on GrETEL 4. This tutorial was recorded and is online available, together with the tutorial materials + [Odijk + 2022c]. +

+

+ The development of GrETEL at UU has also given rise to a spin-off application called SASTA (Semi-Automatic + Annotation of Spontaneous Language), which enables the automatic analysis of spontaneous language transcripts of + young children with suspected language development delays or disorders or of patients with aphasia in accordance + with a variety of established methods in this domain. [Odijk 2021]. +

+

+ The GrETEL web application is hosted on servers of the UU DH-LAB, but also on the servers of the recognized + CLARIN + Type B Centre Instituut voor de Nederlandse Taal in order to ensure long term availability of this application + to + the research community. (gretel.ivdnt.org) +

+
diff --git a/web-ui/src/app/pages/about-page/about-content.component.scss b/web-ui/src/app/pages/about-page/about-content.component.scss new file mode 100644 index 00000000..e69de29b diff --git a/web-ui/src/app/pages/about-page/about-content.component.spec.ts b/web-ui/src/app/pages/about-page/about-content.component.spec.ts new file mode 100644 index 00000000..9560793a --- /dev/null +++ b/web-ui/src/app/pages/about-page/about-content.component.spec.ts @@ -0,0 +1,23 @@ +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; + +import { AboutContentComponent } from './about-content.component'; +import { commonTestBed } from '../../common-test-bed'; + +describe('AboutContentComponent', () => { + let component: AboutContentComponent; + let fixture: ComponentFixture; + + beforeEach(waitForAsync(() => { + commonTestBed().testingModule.compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(AboutContentComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/web-ui/src/app/pages/about-page/about-content.component.ts b/web-ui/src/app/pages/about-page/about-content.component.ts new file mode 100644 index 00000000..ac208a83 --- /dev/null +++ b/web-ui/src/app/pages/about-page/about-content.component.ts @@ -0,0 +1,9 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'grt-about-content', + templateUrl: './about-content.component.html', + styleUrls: ['./about-content.component.scss'] +}) +export class AboutContentComponent { +} diff --git a/web-ui/src/app/pages/about-page/about-page.component.html b/web-ui/src/app/pages/about-page/about-page.component.html new file mode 100644 index 00000000..5e72fbbb --- /dev/null +++ b/web-ui/src/app/pages/about-page/about-page.component.html @@ -0,0 +1,8 @@ +
+
+ About GrETEL +
+
+ +
+
diff --git a/web-ui/src/app/pages/about-page/about-page.component.scss b/web-ui/src/app/pages/about-page/about-page.component.scss new file mode 100644 index 00000000..e69de29b diff --git a/web-ui/src/app/pages/about-page/about-page.component.spec.ts b/web-ui/src/app/pages/about-page/about-page.component.spec.ts new file mode 100644 index 00000000..1459497a --- /dev/null +++ b/web-ui/src/app/pages/about-page/about-page.component.spec.ts @@ -0,0 +1,23 @@ +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; + +import { AboutPageComponent } from './about-page.component'; +import { commonTestBed } from '../../common-test-bed'; + +describe('AboutPageComponent', () => { + let component: AboutPageComponent; + let fixture: ComponentFixture; + + beforeEach(waitForAsync(() => { + commonTestBed().testingModule.compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(AboutPageComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/web-ui/src/app/pages/about-page/about-page.component.ts b/web-ui/src/app/pages/about-page/about-page.component.ts new file mode 100644 index 00000000..81d51d2e --- /dev/null +++ b/web-ui/src/app/pages/about-page/about-page.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'grt-about-page', + templateUrl: './about-page.component.html', + styleUrls: ['./about-page.component.scss'] +}) +export class AboutPageComponent implements OnInit { + + constructor() { } + + ngOnInit() { + } + +} diff --git a/web-ui/src/app/pages/home-page/home-content/home-content.component.html b/web-ui/src/app/pages/home-page/home-content/home-content.component.html index f85b4bc9..b2c183b8 100644 --- a/web-ui/src/app/pages/home-page/home-content/home-content.component.html +++ b/web-ui/src/app/pages/home-page/home-content/home-content.component.html @@ -27,6 +27,16 @@ treebanks. If you are new to GrETEL we recommend you to take a look at the documentation.

+

+ + + About GrETEL + + + + + +