Skip to content

Commit b7981e8

Browse files
committed
better splitter
1 parent f35cd7b commit b7981e8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+468
-44
lines changed

.DS_Store

4 KB
Binary file not shown.

longtext.txt

+71-34
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,87 @@
1-
Modul B.Inf.1206 - Version 3
1+
Modul B.Inf.1247 - Version 1
22
Georg-August-Universität Göttingen
3-
Modul B.Inf.1206: Datenbanken
4-
English title: Databases5 C
3+
Modul B.Inf.1247: Introduction to Information Retrieval and Natural
4+
Language Processing
5+
English title: Introduction to Information Retrieval and Natural Language Processing6 C
56
4 SWS
67
Lernziele/Kompetenzen:
7-
Die Studierenden kennen die theoretischen Grundlagen sowie technischen Konzepte
8-
von Datenbanksystemen. Mit den erworbenen Kenntnissen in konzeptueller
9-
Modellierung und praktischen Grundkenntnissen in der am weitesten verbreiteten
10-
Anfragesprache "SQL" können sie einfache Datenbankprojekte durchführen. Sie wissen,
11-
welche grundlegende Funktionalität ihnen ein Datenbanksystem dabei bietet und
12-
können diese nutzen. Sie können sich ggf. auf der Basis dieser Kenntnisse mit Hilfe
13-
der üblichen Dokumentation in diesem Bereich selbständig weitergehend einarbeiten.
14-
Die Studierenden verstehen den Nutzen eines fundierten mathematisch-theoretischen
15-
Hintergrundes auch im Bereich praktischer Informatik.Arbeitsaufwand:
8+
After successfully completing the course, students should be able to:
9+
•Summarize major IR and NLP applications
10+
•Explain important IR and NLP algorithms and data structures
11+
•Determine the conceptual requirements of specific IR and NLP problems
12+
•Compare the suitability of algorithms and data structures for specific tasks
13+
•Devise solutions for complex IR and NLP tasks by implementing and adapting
14+
suitable algorithms and data structures
15+
•Evaluate IR and NLP methods and systems quantitatively and qualitativelyArbeitsaufwand:
1616
Präsenzzeit:
1717
56 Stunden
1818
Selbststudium:
19-
94 Stunden
20-
Lehrveranstaltung: Datenbanken (Vorlesung, Übung)
19+
124 Stunden
20+
Lehrveranstaltung: Lecture Introduction to Information Retrieval and Natural
21+
Language Processing (Vorlesung)
2122
Inhalte:
22-
Konzeptuelle Modellierung (ER-Modell), relationales Modell, relationale Algebra
23-
(als theoretische Grundlage der Anfragekonzepte), SQL-Anfragen, -Updates und
24-
Schemaerzeugung, Transaktionen, Normalisierungstheorie.
25-
Literatur: R. Elmasri, S.B. Navathe: Grundlagen von Datenbanksystemen - Ausgabe
26-
Grundstudium (dt. Übers.), Pearson Studium (nach Praxisrelevanz ausgewählte
27-
Themen).4 SWS
28-
Prüfung: Klausur (120 Min.) oder mündliche Prüfung (ca. 20 Min.) 5 C
23+
The lecture will cover the following topics:
24+
•Basics: Background, Text Preprocessing, Documents, Terms, Vocabulary, Inverted
25+
Index
26+
•Boolean Retrieval, Positional Retrieval, Tolerant Retrieval
27+
•Efficient Index Construction, Index Compression
28+
•Term Weighting, Relevance Scoring, Ranked Retrieval
29+
•Semantic Text Analysis, Link Analysis
30+
•Complete Retrieval Systems
31+
•Results Visualization and Exploration
32+
•Evaluation of Retrieval Systems
33+
Please visit www.gipplab.org/teaching for details on this course.2 SWS
34+
Prüfung: Written test (90 min.) or oral exam (approx. 20 min.)
35+
Prüfungsvorleistungen:
36+
Successful completion of the examination in the practical course component of this
37+
module.
2938
Prüfungsanforderungen:
30-
Nachweis über aufgebaute weiterführende Kompetenzen in den folgenden Bereichen:
31-
theoretische Grundlagen sowie technische Konzepte von Datenbanksystemen,
32-
konzeptuelle Modellierung und praktische Grundkenntnisse in der am weitesten
33-
verbreiteten Anfragesprache "SQL" in ihrer Anwendung auf einfache Datenbankprojekte,
34-
Nutzung grundlegender Funktionalitäten von Datenbanksystem, mathematisch-
35-
theoretischer Hintergründe in der praktischen Informatik. Fähigkeit, die vorstehenden
36-
Kompetenzen weiter zu vertiefen.
39+
•Knowledge of major IR and NLP applications
40+
•Ability to explain important IR and NLP algorithms and data structures
41+
•Ability to analyze the conceptual requirements of specific IR and NLP problems
42+
•Ability to compare the suitability of algorithms and data structures for specific tasks
43+
•Ability to evaluate IR and NLP methods and systems quantitatively and
44+
qualitatively2 C
45+
Lehrveranstaltung: Practical Course Introduction to Information Retrieval and
46+
Natural Language Processing (Laborpraktikum)
47+
Inhalte:2 SWS
48+
Amtliche Mitteilungen II der Georg-August-Universität Göttingen vom 11.10.2022/Nr. 9 V7-WiSe22/23 Seite 10996Modul B.Inf.1247 - Version 1
49+
In the practical course, students work on applied research projects (teamwork is
50+
possible) that address complex information retrieval tasks. Using the programming
51+
language Python and presenting the intermediate and final results of the projects is
52+
mandatory.
53+
Please visit www.gipplab.org/teaching for details on this course.
54+
Prüfung: Präsentation (ca. 20 Minuten)
55+
Prüfungsvorleistungen:
56+
Successful completion of an applied research project including at least one intermediate
57+
milestone or presentation.
58+
Prüfungsanforderungen:
59+
•Ability to analyze the conceptual requirements of specific IR and NLP problems
60+
•Ability to compare the suitability of algorithms and data structures for specific tasks
61+
•Ability to determine the conceptual requirements of specific IR and NLP problems
62+
•Ability to devise solutions for complex IR and NLP tasks by implementing and
63+
adapting suitable algorithms
64+
•Ability to evaluate IR and NLP methods and systems quantitatively and
65+
qualitatively4 C
3766
Zugangsvoraussetzungen:
3867
keineEmpfohlene Vorkenntnisse:
39-
B.Inf.1101
68+
Knowledge of at least one object-oriented
69+
programming language, preferably Python, is
70+
required to complete the course. Python is used as
71+
part of the exercise sessions. For participants who
72+
are unfamiliar with Python, a fast-paced introduction
73+
into the essentials of the language will be provided.
4074
Sprache:
41-
DeutschModulverantwortliche[r]:
42-
Prof. Dr. Wolfgang May
75+
EnglischModulverantwortliche[r]:
76+
Prof. Dr. Bela Gipp
4377
Angebotshäufigkeit:
44-
jährlichDauer:
78+
irregularDauer:
4579
1 Semester
4680
Wiederholbarkeit:
4781
zweimaligEmpfohlenes Fachsemester:
4882
Maximale Studierendenzahl:
49-
100
50-
Amtliche Mitteilungen II der Georg-August-Universität Göttingen vom 11.10.2022/Nr. 9 V7-WiSe22/23 Seite 10985
83+
30
84+
Bemerkungen:
85+
This course provides a good foundation for a bachelor's or master's thesis in our
86+
group. Visit www.gipplab.org/students-corner/graduation-projects for our current theses proposals.
87+
Amtliche Mitteilungen II der Georg-August-Universität Göttingen vom 11.10.2022/Nr. 9 V7-WiSe22/23 Seite 10997
1.79 KB
Binary file not shown.

new/longtext.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from PyPDF2 import PdfReader
33

44
# Set the file path of the PDF
5-
pdf_file_path = "single_Module/Modul B.Inf.1206.pdf"
5+
pdf_file_path = "single_Module/Modul B.Inf.1247.pdf"
66

77
# Read the PDF using the PdfReader
88
reader = PdfReader(pdf_file_path)

new/spitter.py

+15-7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Import the required library
2-
import os
2+
import os, sys
33
from PyPDF2 import PdfReader, PdfWriter
4-
4+
sys.stdout = open("output_print_splitter.txt", "w")
55
# Define the path for the input PDF file
66
pdf_file = "ModuleDS007.pdf"
77

@@ -24,17 +24,21 @@
2424
if "Modul" in text:
2525
# Get the unique value after the word "Modul"
2626
unique = text.split("Modul")[1].strip()
27+
print (unique + "\n\n")
28+
# Get the first part of the unique value until the ":" or "-"
29+
if " - " in unique:
30+
unique = "Modul" + unique.split(" - ")[0].strip()
31+
elif " : " in unique:
32+
unique = "Modul" + unique.split(" : ")[0].strip()
2733
# Skip if the unique value contains the word "verzeichnis" or its length is greater than 80 characters
28-
if "verzeichnis" in unique.lower() or len(unique) > 80:
34+
if "verzeichnis" in unique.lower() or len(unique) > 120:
2935
continue
30-
# Get the first part of the unique value until the "-"
31-
unique = "Modul" + unique.split(" - ")[0].strip()
3236
# Replace "Module" with "Modul"
3337
unique = unique.replace("Module", "Modul")
3438
# Replace spaces with underscores
3539
unique = unique.replace(" ", "_")
3640
# Print the unique value
37-
print(f"Unique value: {unique}")
41+
print(f"Unique value: {unique}\n\n\n\n")
3842
# Create a new PdfWriter for this unique value if it doesn't already exist
3943
if unique not in outputs:
4044
outputs[unique] = PdfWriter()
@@ -55,4 +59,8 @@
5559
output.write(f)
5660
except Exception as e:
5761
# Print any errors that occur while writing the PDF file
58-
print(f"Error creating PDF for {unique}: {e}")
62+
print(f"Error creating PDF for {unique}: {e}")
63+
64+
65+
sys.stdout.close()
66+
sys.stdout = sys.__stdout__

new/variablensuche.py

+27-1
Original file line numberDiff line numberDiff line change
@@ -140,19 +140,45 @@ def get_maxstudents(self):
140140
return None
141141
else:
142142
print("Neither Präsenzzeit nor Self-study time found in the PDF")
143+
144+
def get_language(self):
145+
stop_words = ['Modul','Modul-Nr.','Modulnummer','ECTS','SWS','Präsenzzeit','Self-study time', "Person", "Modulverantwortliche"]
146+
for i in range(len(self.reader.pages)):
147+
self.page = self.reader.pages[i]
148+
text = self.page.extract_text().replace("\n", " ")
149+
print (text)
150+
if "Sprache" in text:
151+
language = text.split("Sprache:")[1].strip()
152+
for word in stop_words:
153+
if word in language:
154+
language = language.split(word)[0].strip()
155+
break
156+
return language
157+
elif "Language" in text:
158+
language = text.split("Language:")[1].strip()
159+
for word in stop_words:
160+
if word in language:
161+
language = language.split(word)[0].strip()
162+
break
163+
return language
164+
else:
165+
print("Language & Sprache not found in the PDF")
166+
return None
167+
143168

144169

145170

146171

147172

148173
print("------------------------")
149-
pdf_data = PDFdata("single_Module/Modul B.Inf.1204.pdf")
174+
pdf_data = PDFdata("single_Module/Modul B.Inf.1247.pdf")
150175
print("SWS: " + str(pdf_data.get_sws()))
151176
print("Präsenzzeit: " + str(pdf_data.get_presencetime()))
152177
print("Selbststudium: " + str(pdf_data.get_selfstudytime()))
153178
print("Credits: " + str(pdf_data.get_credits()))
154179
print("Version: " + str(pdf_data.get_version()))
155180
print("Maximale Studierendenzahl: " + str(pdf_data.get_maxstudents()))
181+
print("Sprache: " + str(pdf_data.get_language()))
156182

157183

158184

new/variablensucheaufalle.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import os
2+
import time
23
from variablensuche import PDFdata
34

45
pdf_data = PDFdata("single_Module/Modul B.Inf.1204.pdf")
@@ -10,11 +11,15 @@
1011
folder = "single_Module"
1112

1213
for pdfFile in os.listdir(folder):
14+
print(time)
1315
print("Reading file: " + pdfFile)
1416
pdf_data = PDFdata(folder + "/" + pdfFile)
1517
with open("output.txt", "a") as f:
1618
f.write("File: " + pdfFile + "\n")
1719
f.write("SWS: " + str(pdf_data.get_sws()) + "\n")
1820
f.write("Präsenzzeit: " + str(pdf_data.get_presencetime()) + "\n")
1921
f.write("Credits: " + str(pdf_data.get_credits()) + "\n")
20-
f.write("Selbststudium: " + str(pdf_data.get_selfstudytime()) + "\n\n")
22+
f.write("Version: " + str(pdf_data.get_version()) + "\n")
23+
f.write("Maximale Studierendenzahl: " + str(pdf_data.get_maxstudents()) + "\n")
24+
f.write("Sprache: " + pdf_data.get_language() + "\n")
25+
f.write("Selbststudium: " + str(pdf_data.get_selfstudytime()) + "\n\n")

0 commit comments

Comments
 (0)