Commit a35649b0 authored by Julia Fischer's avatar Julia Fischer

Blatt6 Testerei

parent 0fd27624
Pipeline #2328 skipped
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>Ueb6</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
</projectDescription>
eclipse.preferences.version=1
encoding//src/main/java=UTF-8
encoding//src/test/java=UTF-8
encoding/<project>=UTF-8
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=ignore
org.eclipse.jdt.core.compiler.problem.enumIdentifier=ignore
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.8
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1
log4j.rootLogger=WARN,A1
# A1 is set to be a ConsoleAppender.
log4j.appender.A1=org.apache.log4j.ConsoleAppender
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=%d{ISO8601} [%t] %-5p %c %x - %m%n
\ No newline at end of file
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>Test</groupId>
<artifactId>Test2</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Test1</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.7.6</version>
</dependency>
<dependency>
<groupId>org.apache.jena</groupId>
<artifactId>jena-arq</artifactId>
<version>3.0.1</version>
</dependency>
<dependency>
<groupId>edu.stanford.nlp</groupId>
<artifactId>stanford-corenlp</artifactId>
<version>3.5.2</version>
</dependency>
<dependency>
<groupId>edu.stanford.nlp</groupId>
<artifactId>stanford-corenlp</artifactId>
<version>3.5.2</version>
<classifier>models</classifier> <!-- English models -->
</dependency>
<dependency>
<groupId>edu.stanford.nlp</groupId>
<artifactId>stanford-corenlp</artifactId>
<version>3.5.2</version>
<classifier>models-german</classifier> <!-- German models -->
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<!-- Used to set JRE version; will be used by IDEs like Eclipse as the
target JRE (default is 1.5) -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>com.zenjava</groupId>
<artifactId>javafx-maven-plugin</artifactId>
<version>8.4.0</version>
<configuration>
<mainClass>your.package.with.Launcher</mainClass>
</configuration>
</plugin>
</plugins>
</build>
</project>
package Ueb6;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import edu.stanford.nlp.ling.CoreLabel;
import edu.stanford.nlp.process.CoreLabelTokenFactory;
import edu.stanford.nlp.process.PTBTokenizer;
import edu.stanford.nlp.tagger.maxent.MaxentTagger;
public class MedReportReader {
public static void main(String[] args) throws IOException {
// Pfad zu Arztbriefen
String file = "C:/Users/Julia/Desktop/ueb6_alternative/UEB06_A1_alternativ/src/ueb06/Arztbrief1.txt";
String zeile;
// Tagger initialisieren
MaxentTagger tagger = new MaxentTagger("tagger/german-hgc.tagger");
FileReader fr;
File taggedOutput = new File("temp.txt");
FileWriter outFileWriter = new FileWriter(taggedOutput);
try {
fr = new FileReader(file);
BufferedReader br = new BufferedReader(fr);
while ((zeile = br.readLine()) != null) {
// Der getaggte String
String tagged = tagger.tagString(zeile);
// Den getaggten String in temp-Datei schreiben
// System.out.println(tagged);
outFileWriter.write(tagged);
}
outFileWriter.flush();
outFileWriter.close();
// Getaggten File einlesen
FileReader inFileReader = new FileReader(taggedOutput);
// Token erstellen
PTBTokenizer<CoreLabel> ptbt = new PTBTokenizer<>(inFileReader, new CoreLabelTokenFactory(), "");
while (ptbt.hasNext()) {
CoreLabel label = ptbt.next();
System.out.println(label);
}
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
## tagger training invoked at Tue Jul 08 16:25:43 PDT 2014 with arguments:
model = german-fast.tagger
arch = words(-2,2),order(1),prefix(1),suffix(10)
wordFunction =
trainFile = format=TREES,trf=edu.stanford.nlp.trees.international.negra.NegraPennTreeReaderFactory,/u/nlp/data/GermanACL08/negra/negra_1.mrg
closedClassTags =
closedClassTagThreshold = 40
curWordMinFeatureThresh = 2
debug = false
debugPrefix =
tagSeparator = _
encoding = iso-8859-1
iterations = 100
lang = german
learnClosedClassTags = false
minFeatureThresh = 2
openClassTags =
rareWordMinFeatureThresh = 10
rareWordThresh = 5
search = owlqn
sgml = false
sigmaSquared = 0.0
regL1 = 0.75
tagInside =
tokenize = true
tokenizerFactory =
tokenizerOptions = asciiQuotes
verbose = false
verboseResults = true
veryCommonWordThresh = 250
xmlInput = null
outputFile =
outputFormat = slashTags
outputFormatOptions =
nthreads = 1
## tagger training invoked at Tue Jul 08 16:56:46 PDT 2014 with arguments:
model = german-hgc.tagger
arch = left3words,naacl2003unknowns,unicodeshapes(-2,2),distsim(/u/nlp/data/german/ner/hgc_175m_600,-1,1),distsimconjunction(/u/nlp/data/german/ner/hgc_175m_600,-1,1),unicodeshapeconjunction(-1,1)
wordFunction =
trainFile = format=TREES,trf=edu.stanford.nlp.trees.international.negra.NegraPennTreeReaderFactory,/u/nlp/data/GermanACL08/negra/negra_1.mrg
closedClassTags =
closedClassTagThreshold = 40
curWordMinFeatureThresh = 2
debug = false
debugPrefix =
tagSeparator = _
encoding = iso-8859-1
iterations = 100
lang = german
learnClosedClassTags = false
minFeatureThresh = 2
openClassTags =
rareWordMinFeatureThresh = 10
rareWordThresh = 5
search = owlqn
sgml = false
sigmaSquared = 0.0
regL1 = 0.75
tagInside =
tokenize = true
tokenizerFactory =
tokenizerOptions = asciiQuotes
verbose = false
verboseResults = true
veryCommonWordThresh = 250
xmlInput = null
outputFile =
outputFormat = slashTags
outputFormatOptions =
nthreads = 1
package Ueb3.fin;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
/**
* Unit test for simple App.
*/
public class AppTest
extends TestCase
{
/**
* Create the test case
*
* @param testName name of the test case
*/
public AppTest( String testName )
{
super( testName );
}
/**
* @return the suite of tests being tested
*/
public static Test suite()
{
return new TestSuite( AppTest.class );
}
/**
* Rigourous Test :-)
*/
public void testApp()
{
assertTrue( true );
}
}
Sehr_ADV geehrter_ADJA Herr_NN Kollege_NN ,_$, ich_PPER berichte_VVFIN über_APPR o._NE g._ADJA Patienten_NN ,_$, der_PRELS sich_PRF am_APPRART 28.11.2013_CARD in_APPR meiner_PPOSAT Behandlung_NN befand_VVFIN ._$. Diagnose_NN :_$. Dysthymia_NE -LCB-_TRUNC F34_NN .1_CARD G_XY -RCB-_TRUNC Soziale_ADJA Phobie_NN -LCB-_TRUNC F40_NN .1_CARD G_XY -RCB-_TRUNC Migräne_NN ohne_APPR Aura_NN -LSB-_TRUNC gewöhnliche_ADJA Migräne_NN -RSB-_TRUNC -LCB-_TRUNC G43_XY .0_CARD G_NN -RCB-_TRUNC Anamnese_NN :_$. Der_ART Patient_NN berichtet_VVPP ,_$, dass_KOUS er_PPER seit_APPR vielen_PIDAT Jahren_NN ,_$, eigentlich_ADV schon_ADV seit_APPR der_ART Kindheit_NN unter_APPR Migräne_NN leide_VVFIN ._$. Bei_APPR Migräne_NN habe_VAFIN er_PPER meist_ADV einen_ART extremen_ADJA Druck_NN im_APPRART Kopf_NN ,_$, dabei_PROAV habe_VAFIN er_PPER vor_APPR allem_PIS über_APPR dem_ART rechten_ADJA Auge_NN Schmerzen_NN in_APPR Form_NN eines_ART Stechens_NN ,_$, dabei_PROAV in_APPR der_ART Regel_NN Übelkeit_NN ,_$, nur_ADV selten_ADJD aber_ADV Erbrechen_NN ._$. Im_APPRART weiteren_ADJA Lichtempfindlichkeit_NN ,_$, Geräuschempfindlichkeit_NN ,_$, zeitweise_ADV Flimmerskotome_NN rechts_ADV ._$. Dauer_NN bis_APPR zu_APPR einem_ART Tag_NN ,_$, Häufigkeit_NN in_APPR der_ART letzten_ADJA Zeit_NN relativ_ADJD hoch_ADJD ,_$, bis_KOUS zu_PTKVZ zweimal_ADV in_APPR der_ART Woche_NN ._$. In_APPR der_ART Migräne_NN Attacken_NN nehme_VVFIN er_PPER derzeit_ADV Novaminsulfon_NN ,_$, aber_KON in_APPR letzter_ADJA Zeit_NN ohne_APPR wesentlichen_ADJA Effekt_NN ._$. Meist_ADV mache_VVFIN er_PPER alles_PIS dunkel_ADJD und_KON versuche_VVFIN sich_PRF schlafen_VVINF zu_PTKZU legen_VVINF ._$. Er_PPER leide_VVFIN unter_APPR Schlafstörungen_NN ,_$, oft_ADV könne_VMFIN er_PPER sich_PRF nicht_PTKNEG konzentrieren_VVINF ,_$, ärgere_VVFIN sich_PRF dann_ADV darüber_PROAV ,_$, die_ART Stimmung_NN sei_VAFIN eher_ADV schlecht_ADJD ._$. Er_PPER neige_VVFIN sehr_ADV zum_APPRART Grübeln_NN ._$. Er_PPER sei_VAFIN auch_ADV sehr_ADV schüchtern_ADJD ,_$, könne_VMFIN nicht_PTKNEG gut_ADJD auf_APPR Leute_NN zugehen_VVINF ._$. Keine_PIAT anderen_ADJA Krankheiten_NN bekannt_ADJD ._$. Sonst_ADV keine_PIAT Einnahme_NN von_APPR Medikamenten_NN ._$. Ein_ART Zwillingsbruder_NN leide_VVFIN auch_ADV unter_APPR Migräne_NN ,_$, sonst_ADV keine_PIAT Nervenleiden_NN in_APPR der_ART Familie_NN bekannt_ADJD ._$. Neurologischer_ADJA Befund_NN :_$. Bewusstsein_NN klar_ADJD ,_$, vollständig_ADJD orientiert_VVPP ._$. Hirnnervenverbund_NN unauffällig_ADJD ._$. Muskeleigenreflexe_NN seitengleich_ADJD mittellebhaft_ADJD ._$. Keine_PIAT manifesten_ADJA oder_KON latenten_ADJA Paresen_NN ._$. Trophik_NN und_KON Tonus_NN regelrecht_ADJD ,_$, Gang_NN und_KON Stand_NN unauffällig_ADJD ,_$, Koordination_NN ungestört_ADJD ._$. Sensibilität_NN intakt_ADJD ._$. Psychischer_ADJA Befund_NN :_$. Freundlich_ADJD zugewandt_VVPP ,_$, Affekt_NN mäßig_ADJD schwingungsfähig_ADJD ,_$, Insuffizienzdenken_NN ,_$, irritierbar_ADJD und_KON selbstunsicher_ADJD ,_$, rasch_ADJD erschöpft_VVPP ,_$, schwunglos_ADJD ,_$, oft_ADV angespannt_ADJD ._$. Schlafstörung_NN ._$. Tagesperiodik_NN ,_$, keine_PIAT Suizidalität_NN ._$. Epikritische_ADJA Beurteilung_NN /_$[ Therapie_NN :_$. In_APPR psychischer_ADJA Hinsicht_NN besteht_VVFIN bei_APPR dem_ART Patienten_NN eine_ART mäßige_ADJA depressive_ADJA Verstimmung_NN vor_APPR dem_ART Hintergrund_NN einer_ART ausgeprägten_ADJA sozialen_ADJA Phobie_NN ._$. Ich_PPER habe_VAFIN dem_ART Patienten_NN ausführlich_ADJD beraten_VVPP und_KON zunächst_ADV eine_ART angstlösende_ADJA und_KON antidepressive_ADJA Behandlung_NN mit_APPR Venlafaxin_NN eingeleitet_VVPP ,_$, Beginn_NN mit_APPR 37,5_CARD mg_NN ,_$, im_APPRART Weiteren_ADJA auf_APPR 150_CARD mg_NN morgens_ADV zu_PTKZU erhöhen_VVINF ._$. Zusätzlich_ADJD wäre_VAFIN eine_ART Psychotherapie_NN anzuraten_VVIZU ._$. In_APPR Bezug_NN auf_APPR die_ART Migräne_NN habe_VAFIN ich_PPER für_APPR die_ART akute_ADJA Attacke_NN Sumatriptan_NN 50_CARD mg_NN verordnet_VVPP ,_$, im_APPRART Weiteren_NN wäre_VAFIN wahrscheinlich_ADJD auch_ADV eine_ART Prophylaxe_NN sinnvoll_ADJD ,_$, dies_PDS wird_VAFIN jedoch_ADV vom_APPRART weiteren_ADJA Verlauf_NN abhängen_VVINF ._$. Mit_APPR freundlichen_ADJA Grüssen_NN Dr._NN med_NE ._$. Direkt-Fax_NN ohne_APPR Unterschrift_NN
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment