Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
039aad9937
9 changed files with 28 additions and 7 deletions
|
@ -48,7 +48,9 @@ public class NlpUtils {
|
|||
private static final String TYPE_SYSTEM_DESCRIPTOR_PATH = "/speeches/TypeSystem.xml.gz";
|
||||
private static final int MAX_FEATURE_LENGTH = 10000;
|
||||
|
||||
|
||||
/**
|
||||
* implementiert von Valentin
|
||||
*/
|
||||
public static void createNlpData() {
|
||||
duuiInit();
|
||||
runDockerDriver();
|
||||
|
@ -67,6 +69,9 @@ public class NlpUtils {
|
|||
createSentimentInfo();
|
||||
}
|
||||
|
||||
/**
|
||||
* implementiert von Valentin
|
||||
*/
|
||||
private static void duuiInit() {
|
||||
|
||||
DUUILuaContext ctx;
|
||||
|
@ -115,6 +120,7 @@ public class NlpUtils {
|
|||
}
|
||||
|
||||
/**
|
||||
* implementiert von Valentin
|
||||
* Initialization of a sample CAS document
|
||||
* @return JCas object
|
||||
*/
|
||||
|
@ -142,7 +148,9 @@ public class NlpUtils {
|
|||
return pCas;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* implementiert von Valentin
|
||||
*/
|
||||
public static void runDockerDriver() {
|
||||
|
||||
// reset existing pipeline-components
|
||||
|
@ -187,7 +195,9 @@ public class NlpUtils {
|
|||
Logger.info(JCasUtil.selectCovered(org.hucompute.textimager.uima.type.Sentiment.class, sentence).toString());
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* implementiert von Valentin
|
||||
*/
|
||||
private static void casInit() {
|
||||
JCas jcas;
|
||||
try {
|
||||
|
@ -241,6 +251,7 @@ public class NlpUtils {
|
|||
|
||||
|
||||
/**
|
||||
* implementiert von Valentin
|
||||
* Execution of video processing via DUUI using the RemoteDriver
|
||||
* @throws Exception in case of an error
|
||||
*/
|
||||
|
|
|
@ -9,6 +9,7 @@ import java.io.InputStream;
|
|||
import java.util.Properties;
|
||||
|
||||
/**
|
||||
* Datei implementiert von Valentin
|
||||
* Diese Klasse dient der Konfiguruerung von Javalin
|
||||
*/
|
||||
public class JavalinConfig extends Properties {
|
||||
|
|
|
@ -15,6 +15,7 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Datei implementiert von Valentin
|
||||
* Dieser Kontroller zeigt Informationen um den Parlamentariern:
|
||||
* 1. Die Einstiegsseite: eine Filter-fähige Auflistung der Parlamentariern.
|
||||
* Angezeigt werden Vor- und Nachname, Partei sowie ID.
|
||||
|
|
|
@ -15,6 +15,9 @@ import java.io.IOException;
|
|||
import static org.texttechnologylab.project.gruppe_05_1.Main.JAVALIN_STATIC_FILES_DIR;
|
||||
import static org.texttechnologylab.project.gruppe_05_1.Main.JAVALIN_TEMPLATE_DIR;
|
||||
|
||||
/**
|
||||
* Datei implementiert von Valentin
|
||||
*/
|
||||
public class RESTHandler {
|
||||
public void startJavalin() {
|
||||
|
||||
|
|
|
@ -24,6 +24,7 @@ import java.util.stream.Collectors;
|
|||
|
||||
public class SpeechController {
|
||||
/**
|
||||
* Datei implementiert von Valentin
|
||||
* Liste alle Reden eines Parlamentariers an
|
||||
* @param ctx Javalin Context
|
||||
*/
|
||||
|
@ -237,7 +238,6 @@ public class SpeechController {
|
|||
tags = {"Rede"},
|
||||
queryParams = {
|
||||
@OpenApiParam(name = "filter", description = "Full-Text-Filter. Kann Vorname, Nachname oder Partei filtern", required = false),
|
||||
// TODO: Topic Filter
|
||||
},
|
||||
responses = {
|
||||
@OpenApiResponse(status = "200", content = {@OpenApiContent(from = Speech[].class)})
|
||||
|
|
|
@ -17,6 +17,7 @@ public abstract class FileUtils {
|
|||
|
||||
|
||||
/**
|
||||
* Datei implementiert von Valentin
|
||||
* Creates a (possibly nested) directory
|
||||
* @param dir (e.g. "generated" , "level1/level2/level3" etc.
|
||||
*/
|
||||
|
|
|
@ -9,7 +9,7 @@ import java.time.format.DateTimeParseException;
|
|||
public abstract class GeneralUtils {
|
||||
|
||||
/**
|
||||
*
|
||||
* Datei implementiert von Valentin
|
||||
* @param integer the integer to be parsed
|
||||
* @return the parsed integer or null if the integer could not be parsed
|
||||
*/
|
||||
|
|
|
@ -3,7 +3,9 @@ package org.texttechnologylab.project.gruppe_05_1.util;
|
|||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.Properties;
|
||||
|
||||
/**
|
||||
* Datei implementiert von Valentin
|
||||
*/
|
||||
public abstract class PropertiesUtils {
|
||||
|
||||
public static Properties readPropertiesFromResource(String propertiesFileName) {
|
||||
|
|
|
@ -16,6 +16,9 @@ import java.util.HashMap;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.zip.ZipEntry;
|
||||
/**
|
||||
* Datei implementiert von Valentin
|
||||
*/
|
||||
|
||||
public abstract class XmlUtils {
|
||||
|
||||
|
@ -43,7 +46,6 @@ public abstract class XmlUtils {
|
|||
try {
|
||||
document = builder.parse(xmlInputStream);
|
||||
|
||||
// TODO: Error handling...
|
||||
} catch (SAXException e) {
|
||||
throw new RuntimeException(e);
|
||||
} catch (IOException e) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue