From aa21b2e6c22e4b644ce54a64e7634c333832b2ca Mon Sep 17 00:00:00 2001 From: berndmoos Date: Mon, 25 Nov 2024 09:41:47 +0100 Subject: [PATCH 1/8] #215 --- .../implementations/ISOTEIKWICSnippetCreator.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/zumult/query/implementations/ISOTEIKWICSnippetCreator.java b/src/main/java/org/zumult/query/implementations/ISOTEIKWICSnippetCreator.java index f8c9239..d9ddbc8 100644 --- a/src/main/java/org/zumult/query/implementations/ISOTEIKWICSnippetCreator.java +++ b/src/main/java/org/zumult/query/implementations/ISOTEIKWICSnippetCreator.java @@ -95,8 +95,13 @@ public DefaultKWICSnippet apply(Document transcriptDoc, //Node firstAnnotationBlock = (Element) xPath.evaluate(xpathString, TranscriptDoc, XPathConstants.NODE); //Node firstAnnotationBlock = (Node) xPath.compile(xpathString).evaluate(transcriptDoc, XPathConstants.NODE); //Node firstAnnotationBlock = (Node) firstElem.getParentNode().getParentNode().getParentNode(); - Element firstAnnotationBlockElem = (Element) firstElem.getParentNode().getParentNode().getParentNode(); + // This is wrong if we have nested s + //Element firstAnnotationBlockElem = (Element) firstElem.getParentNode().getParentNode().getParentNode(); + + String xpathString = "ancestor::tei:"+ Constants.ELEMENT_NAME_ANNOTATION_BLOCK + "[1]"; + Element firstAnnotationBlockElem = (Element) xPath.evaluate(xpathString, firstElem, XPathConstants.NODE); String speaker = firstAnnotationBlockElem.getAttribute(Constants.ATTRIBUTE_NAME_WHO); + //System.out.println("Speaker is " + speaker); speaker = getSpeakerInitials(speaker, transcriptDoc); // get left context int index = 0; @@ -192,10 +197,13 @@ public DefaultKWICSnippet apply(Document transcriptDoc, private String getSpeakerInitials(String speaker, Document transcriptDoc){ + String xpathString = "//tei:person[@xml:id='" + speaker + "']"; + //System.out.println("Looking for " + speaker); + //Node personNode = null; try { // /tei:TEI/tei:teiHeader[1]/tei:profileDesc[1]/tei:particDesc[1]/tei:person[1] - String xpathString = "/tei:TEI/tei:teiHeader[1]/tei:profileDesc[1]/tei:particDesc[1]/tei:person[@xml:id='" + speaker + "']"; + //String xpathString = "/tei:TEI/tei:teiHeader[1]/tei:profileDesc[1]/tei:particDesc[1]/tei:person[@xml:id='" + speaker + "']"; Element personElement = (Element) xPath.compile(xpathString).evaluate(transcriptDoc, XPathConstants.NODE); if (personElement!=null){ return personElement.getAttribute("n"); From 4f86f7954576291cf40d647e153ee3b445aa9ece Mon Sep 17 00:00:00 2001 From: berndmoos Date: Thu, 28 Nov 2024 15:48:24 +0100 Subject: [PATCH 2/8] #216 --- src/main/java/org/zumult/io/isotei2html_table.xsl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/zumult/io/isotei2html_table.xsl b/src/main/java/org/zumult/io/isotei2html_table.xsl index fc7e28d..c274478 100644 --- a/src/main/java/org/zumult/io/isotei2html_table.xsl +++ b/src/main/java/org/zumult/io/isotei2html_table.xsl @@ -173,8 +173,10 @@ - - + + + From 415936519fd42d1c7b23caabca94cd84cd40f275 Mon Sep 17 00:00:00 2001 From: berndmoos Date: Thu, 28 Nov 2024 17:34:11 +0100 Subject: [PATCH 3/8] #217 --- .../org/zumult/backend/implementations/COMAFileSystem.java | 3 ++- .../org/zumult/backend/implementations/TestCOMABackend.java | 3 ++- .../org/zumult/objects/implementations/COMACommunication.java | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/zumult/backend/implementations/COMAFileSystem.java b/src/main/java/org/zumult/backend/implementations/COMAFileSystem.java index 167ca3f..6dc62d3 100644 --- a/src/main/java/org/zumult/backend/implementations/COMAFileSystem.java +++ b/src/main/java/org/zumult/backend/implementations/COMAFileSystem.java @@ -359,8 +359,9 @@ public IDList getTranscripts4SpeechEvent(String speechEventID) throws IOExceptio /*NodeList allTranscripts = (NodeList) xPath.evaluate("//Transcription[substring(Filename, string-length(Filename)-3)='.exb' or substring(Filename, string-length(Filename)-3)='.EXB']", communication.getDocument().getDocumentElement(), XPathConstants.NODESET);*/ + String xpath = "//Transcription[substring(Filename, string-length(Filename)-3)='.xml' or substring(Filename, string-length(Filename)-3)='.XML']"; NodeList allTranscripts = - (NodeList) xPath.evaluate("//Transcription[substring(Filename, string-length(Filename)-3)='.xml' or substring(Filename, string-length(Filename)-3)='.XML']", + (NodeList) xPath.evaluate(xpath, communication.getDocument().getDocumentElement(), XPathConstants.NODESET); for (int i=0; i getTopics() { public IDList getTranscripts() { IDList result = new IDList("transcript"); try { - String xPathString = "descendant::Transcription"; + //String xPathString = "descendant::Transcription"; + String xPathString = "descendant::Transcription[substring(Filename, string-length(Filename)-3)='.xml' or substring(Filename, string-length(Filename)-3)='.XML']"; NodeList transcriptionNodeList = (NodeList) xPath.evaluate(xPathString, getDocument().getDocumentElement(), XPathConstants.NODESET); for (int i=0; i Date: Thu, 28 Nov 2024 17:34:21 +0100 Subject: [PATCH 4/8] #217 --- web/index.jsp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/web/index.jsp b/web/index.jsp index 00bb548..9d03eb9 100644 --- a/web/index.jsp +++ b/web/index.jsp @@ -8,6 +8,11 @@ <%@page import="java.util.Locale"%> <%@page import="java.util.ResourceBundle"%> +<%@page import="org.zumult.objects.IDList"%> +<%@page import="org.zumult.backend.BackendInterfaceFactory"%> +<%@page import="org.zumult.backend.BackendInterface"%> + + @@ -36,7 +41,6 @@ - <%@include file="WEB-INF/jspf/matomoTracking.jspf" %> @@ -69,9 +69,9 @@ - <% String pageTitle = "Korpusübersicht Archiv für Gesprochenes Deutsch"; + <% String pageTitle = "Korpusübersicht"; if ("en".equals(language)) { - pageTitle = "Corpus overview Archive for Spoken German"; + pageTitle = "Corpus overview"; } String pageName = "ZuMult"; %> @@ -83,13 +83,12 @@

<% if ("en".equals(language)) { %> - This page gives an overview of the <%= corpora.size() %> spoken language corpora of the - Archive for Spoken German - which are available online. + This page gives an overview of the <%= corpora.size() %> corpora available in this + ZuMult instance. <% } else { %> - Diese Seite gibt einen Überblick über die <%= corpora.size() %> mündlichen Korpora des - Archiv für Gesprochenes Deutsch, - die online zugänglich sind. + Diese Seite gibt einen Überblick über die <%= corpora.size() %> Korpora, die in dieser + ZuMult-Instanz + zugänglich sind. <% } %>

@@ -112,7 +111,7 @@
- ... + ... <% if (IMAGE_COPYRIGHT_MAP.containsKey(corpusID)) { %>
© <%= IMAGE_COPYRIGHT_MAP.get(corpusID) %>
<% } %> @@ -123,14 +122,6 @@
<%=acronym%>
<%=name%>

<%=description%>

- - <%= backendInterface.getEvents4Corpus(corpusID).size() %> - <% if ("en".equals(language)) { %> - Events - <% } else { %> - Ereignisse - <% } %> - <%= backendInterface.getSpeechEvents4Corpus(corpusID).size() %> <% if ("en".equals(language)) { %> diff --git a/web/jsp/testvideo.jsp b/web/jsp/testvideo.jsp deleted file mode 100644 index 72c68fd..0000000 --- a/web/jsp/testvideo.jsp +++ /dev/null @@ -1,32 +0,0 @@ -<%-- - Document : testvideo - Created on : 16.05.2018, 11:10:43 - Author : Thomas_Schmidt ---%> - -<%@page import="org.zumult.objects.Media"%> -<%@page import="org.zumult.backend.BackendInterfaceFactory"%> -<%@page import="org.zumult.backend.BackendInterface"%> -<%@page contentType="text/html" pageEncoding="UTF-8"%> - -<% - response.setHeader("Access-Control-Allow-Origin", "*"); - %> - - - - - JSP Page - - - <% - BackendInterface backendInterface = BackendInterfaceFactory.newBackendInterface(); - Media someVideo = backendInterface.getMedia("BETV_E_00001_SE_01_V_01"); - String videoURL = someVideo.getURL(); - %> -

Hello World!

- - - From f02a1cc5f08d38ea631b48c4a5a4222d584801a0 Mon Sep 17 00:00:00 2001 From: berndmoos Date: Wed, 4 Dec 2024 08:42:30 +0100 Subject: [PATCH 7/8] Some cosmetics --- src/main/resources/resources/MessageBundle.properties | 4 ++-- src/main/resources/resources/MessageBundle_de_DE.properties | 4 ++-- web/jsp/speecheventstable.jsp | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/main/resources/resources/MessageBundle.properties b/src/main/resources/resources/MessageBundle.properties index ff43b83..a974e23 100644 --- a/src/main/resources/resources/MessageBundle.properties +++ b/src/main/resources/resources/MessageBundle.properties @@ -14,7 +14,7 @@ DocumentsPerPage=Documents per Page Download=Download DownloadOptions=Download Options DownloadKWIC=Download KWIC -EnterYourCQP=Please enter your CQP query and choose between different search modes +EnterYourCQP=Please enter your CQP query Examples=Examples SearchInputFieldPlaceholder=Find... First=First @@ -89,7 +89,7 @@ ViewHitsAsLemmaTable=View hits as lemma table ViewHitsAsKWICOnTheQueryTab=View hits as KWIC on the Query-Tab Vocabulary=Lemma and Query Lists WordTokens=word tokens -ZuRechtSubtitle=CQP queries to the AGD corpora, using a Lucene index via MTAS +ZuRechtSubtitle=CQP queries corpora, using a Lucene index via MTAS ReferenceWordlist=Reference wordlist RefWordlist=Ref wordlist WaitWordlistLoading=Please wait -- wordlist is loading. diff --git a/src/main/resources/resources/MessageBundle_de_DE.properties b/src/main/resources/resources/MessageBundle_de_DE.properties index 672ebd8..08fd33a 100644 --- a/src/main/resources/resources/MessageBundle_de_DE.properties +++ b/src/main/resources/resources/MessageBundle_de_DE.properties @@ -2,7 +2,7 @@ Project=Projekt Home=Startseite Logout=Ausloggen -ZuRechtSubtitle=CQP-Suchanfragen in den Korpora des AGD +ZuRechtSubtitle=CQP-Suchanfragen in Korpora AvailableCorpora=Korpora Cancel=Abbrechen InPreparation=in Vorbereitung @@ -32,7 +32,7 @@ SearchBtn=Suche starten OpenPanelWithSearchOptions=Suchoptionen \u00f6ffnen IgnorePunctuation=Satzzeichen ignorieren NumberOfHitsForDownload=Anzahl der Treffer f\u00fcr Download -EnterYourCQP=Bitte geben Sie Ihren CQP-Suchausdruck ein und w\u00e4hlen Sie den Suchmodus (Transkript- vs. Sprecher-basiert) +EnterYourCQP=Bitte geben Sie Ihren CQP-Suchausdruck ein OpenHelp=Hilfe anzeigen Loading=wird geladen... LoadingPage=Bitte warten Sie. Die Seite wird geladen... diff --git a/web/jsp/speecheventstable.jsp b/web/jsp/speecheventstable.jsp index f68c72e..77b0c46 100644 --- a/web/jsp/speecheventstable.jsp +++ b/web/jsp/speecheventstable.jsp @@ -106,9 +106,10 @@ // Long dur = System.currentTimeMillis() - time; // time = System.currentTimeMillis(); SpeechEvent speechEvent = backendInterface.getSpeechEvent(speechEventID); + String firstTranscriptID = speechEvent.getTranscripts().get(0); %> - <%=speechEventID%> +
<%=speechEventID%> <% for (MetadataKey metadataKey : metadataKeys){ String metadataValue = speechEvent.getMetadataValue(metadataKey); From 9bb4388b5494be402fdee7e7c29e887f2f74c642 Mon Sep 17 00:00:00 2001 From: berndmoos Date: Fri, 6 Dec 2024 11:51:07 +0100 Subject: [PATCH 8/8] #214 --- pom.xml | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/pom.xml b/pom.xml index c2a98ce..bbf5296 100644 --- a/pom.xml +++ b/pom.xml @@ -5,12 +5,19 @@ org.zumult ProtoZumult 1.0 - - jar + war + ZuMultMVN - https://zumult.org/ + + + + + github-manual + https://raw.githubusercontent.com/Exmaralda-Org/exmaralda/master/src/build/webjar/ + + https://zumult.org/ - ${project.artifactId} + ${project.artifactId} src/main/resources @@ -20,8 +27,12 @@ src/main/java + + /data/corpora/** + /data/indices/** + - + org.apache.maven.plugins @@ -68,10 +79,11 @@ ojdbc6 11.2.0.4 --> + org.exmaralda - EXMARaLDA - Preview-20220623 + EXMARaLDA_WEB + 1.0.0 jar