Showing posts with label Academic. Show all posts
Showing posts with label Academic. Show all posts

Wednesday, 20 May 2009

Language Guesser and OpenNLP Pipe

1. The first program I wrote estimates the language of a document, based on a simple statistical bigram model. It takes 5 arguments from commandline based on following syntax:

java Main trainfile_lang_1 trainfile_lang_2 trainfile_lang_3 trainfile_lang_4 testfile_lang

e.g.

java Main ./europarl/train/de/ep-01-de.train ./europarl/train/en/ep-01-en.train ./europarl/train/es/ep-01-es.train ./europarl/train/fr/ep-01-fr.train ./europarl/test/de/ep-01-de.test

and writes to the system standard output: "Die Sprache ist wahrscheinlich Deutsch." (The language is probably German.)

You see, this is very static and perhaps I'll make it more dynamic in the future. It was originally created to estimate the language of a protocol from the European parliament. You can download it here, but please be aware that the comments are in German.


2. The second program is more interesting. It takes a XML file with tags and everything and writes the sentences to a file in following format:

token TAB tag TAB chunk

e.g. for the sentence "Is this love?"

Is VBZ O
this DT B-NP
love NN O
? . O

It just takes the path to the XML file as commandline argument. To run the program you'll need 2 things. Ant and the OpenNLP models. You can download the program here

/*
* To ensure the functionality of the program, the models EnglishChunk.bin.gz,
* EnglishSD.bin.gz, EnglishTok.bin.gz, tag.bin.gz and tagdict.htm have to be
* in the models directory.
*
* IMPORTANT:
* The models have to be downloaded and placed in the models directory
* otherwise the program won't work. The download links can be found in
* ./model/readme.txt.
*
* Install:
*
* 1. Download the models at OpenNLP: http://opennlp.sourceforge.net/
* 2. Run Ant
* 3. Start the program with java -jar NLPipe.jar XMLfile
* 4. Optionally you can run the program with: ant -Dargs="XMLfile" run
* 5. Optionally you can archive the basedir with: ant tar
*/

Friday, 10 April 2009

Recap

This is going to be a very boring semester. Java is really interesting but also complicated for a beginner. Compared to Python, it feels like a mature language and you have to think (more) about what you're doing. Formal Syntax is complex and time-consuming, especially for me, since I'm not into Syntax. I'm more interested in semantics and therefore Logic is quite fancy - although sometimes it's as boring as Math. Acoustic phonetics hasn't started yet and Artificial Intelligence is fun but often too superficial - we aren't concerned with Natural Language Processing. Hence I plan to do a small pragmatic series on AI and to recap what I'll learn in the course. I also took two courses in English: Translation into German (boring as hell) and English to the 1700 century (boring lecturer), but they aren't worth to mention.

Finally, there's no post in my blogroll which could wake my interest. Except - well, in a not so positive way - for a news on Eureka Alert. This is one of the cases which I'd entitle 'the most unspectacular findings - that are no findings because everybody already knows - in science'. The study says that music is culturally independent when it comes to convey (certain) emotions. Well, everyone who's listened to a song in another language knows this. The study goes one step further and investigates the influence of music from fundamentally different cultures: Language of music really is universal, study finds

Wednesday, 18 February 2009

Crying

Vacation! Last semester was very intense, no time for anything. Gosh, and now I'm trying to learn Java... It's far more complicated than imagined. Python was neat and easy - in comparison - but Java is far more potent, so they say. I don't quite understand why I've to write code which seems to be obsolete - at least for a beginner like me , e.g.

public class HelloWorld
{
public static void main(String argv[])
{
System.out.println("Hello World!");
}
}

is equivalent to

print "Hello World!"

in Python.

And next semester I'm going to die for sure... Here're my courses:

Formal Syntax: I'm more the Morphology, Phonology, Semantics type. Actually Syntax is the only thing which gives me problems.
Java: Well, it's going to be hard I'd say.
Logic: I like formal logic, really.
Artificial Intelligence: Very very interesting. Inference, neuronal networks, genetic algorithms and that stuff - you know...
Acoustic Phonetics: This sounds good: Reading spectrograms and get in touch with VoiceXML.

Wednesday, 23 July 2008

LaTeX



If you don't know this picture, you shouldn't study. Okay, that's a hyperbole. Nevertheless, LaTeX (/ˈleɪtɛk/ or /ˈlɑːtɛk/) is an important tool for writing scientific essays. It's not sufficient for a dotoral thesis or any other academic document with more than fifty pages to use Microsoft Word or Open Office. Unfortunately, in Germany many students and even post-graduates don't know LaTeX unless they study computational science, mathematics or physics. In other countries it is the tool for scientists, philosophers, mathematicians and engineers to write a scientific essay. It is most convenient tool to display mathematical formulas as you'll see below.

The high-level markup language allows you to produce ready to print and printer/monitor independent documents with easy numbering, cross-referencing, tables and figures, page layout and bibliographies. It takes you one week, at the most, to learn the language and saves you years of blood and tears.

Wikipedia shows a comprehensive example of a LaTeX document, here is the raw script:
\documentclass[12pt]{article}
\title{\LaTeX}
\date{}
\begin{document}
\maketitle
\LaTeX{} is a document preparation system for the \TeX{}
typesetting program. It offers programmable desktop publishing
features and extensive facilities for automating most aspects of
typesetting and desktop publishing, including numbering and
cross-referencing, tables and figures, page layout, bibliographies,
and much more. \LaTeX{} was originally written in 1984 by Leslie
Lamport and has become the dominant method for using \TeX; few
people write in plain \TeX{} anymore. The current version is
\LaTeXe.
\newline
% This is a comment, it is not shown in the final output.
% The following shows a little of the typesetting power of LaTeX
\begin{eqnarray}
E &=& mc^2 \\
m &=& \frac{m_0}{\sqrt{1-\frac{v^2}{c^2}}}
\end{eqnarray}
\end{document}
This is converted to following document:



If you want to learn LaTeX, you can find an excellent Introduction at Wikibooks here. LaTeX is build into Linux operating systems, but you can use proTeXt for Windows as well. If you don't use Linux, you can get LaTeX here.

Wednesday, 30 April 2008

Germanistik in Heidelberg

Doch nicht so Elite:
Free Image Hosting at www.ImageShack.us

Ich bin ein einfacher Student, der nicht weiter weiß. Derzeit studiere ich Anglistik und Germanistik auf Lehramt an der Universität in Heidelberg und das schon im 5. Semester. Leider ist Lehramt so gar nichts für mich, da ich kein pädagogisches Feingefühl habe. Germanistik ist noch weniger etwas für mich, da ich die endlosen Diskussionen, die zudem weder Hand noch Fuß haben, über Gedichte satt bin. Ich möchte nicht sagen, dass die germanistische Literaturwissenschaft keine Wissenschaft ist...
Ja ich möchte es einfach nicht sagen. Literaturwissenschaft ist doch nur dann wissenschaftlich, wenn sie Ansätze aus anderen, wissenschaftlicheren, Fächern heranzieht, z.B. der Psychologie oder der Philosophie. Ohne diese Ansätze wären doch die Germanisten zum Ratespiel verurteilt. Gut, dass man als Student nicht gelehrt bekommt, wie man eine wissenschaftliche Analyse von Texten durchzuführen hat. Die meisten Studenten raten wild drauf los und beachten nicht einmal mehr die konkrete Textgrundlage.
Vielleicht habe ich eine seltsame Vorstellung davon, was Wissenschaft ist, aber einige andere scheinen ein ähnliches Bild zu haben. Wieso sonst sind die Geisteswissenschaften so schlecht angesehen im universitären Umfeld? Wissenschaft muss für mich formal sein. Klar strukturiert und geregelt. Die Geisteswissenschaftler pochen immer auf ihre Tradition. Tradition hier und Tradition dort, aber damit bekommen sie keine Drittmittel. Was ist die Leistung eines Literaturwissenschaftlers?
In der germanistischen Sprachwissenschaft sieht es auch nicht gerade besser aus. Im Vergleich zu der anglistischen Sprachwissenschaft verschließt sie sich und pocht auf ihre Traditionen. Gewagte neue Hypothesen und Theorien werden nicht einmal besprochen, wenn sie von ausländischen Linguisten angefertigt wurden. In meinen drei Jahren am germanistischen Seminar habe ich nicht einmal den Namen Chomsky gehört. Die Themen der Seminare reichen von Gewalt & Sprache bis hin zu Kleidungssemiotik. Das ganze Studium ist doch ein Witz, eine Freizeitveranstaltung. Die Dozenten versuchen Unterhaltungskünstler für die ganzen Lehramtsstudenten zu sein. Hier einmal eine kurze Beschreibung der Perlen meiner germanistischen Vorlesungen:


Einführung in die Literaturwissenschaft: Wissenschaft, das ich nicht lache. Wir haben Literaturgeschichte gemacht und zwar ausschließlich - vom Barock bis zur Nachkriegsliteratur. Kein einziges Wort ist über wissenschaftliche Analysemöglichkeiten von Texten verloren worden. Das ganze war mehr eine Geschichtsvorlesung, als alles andere.

Einführung in die Sprachwissenschaft: Eher eine Einführung in die Unterhaltungswissenschaft. Da die Studenten keine Lust auf Syntax haben, wurde halt Pragmatik und Textlinguistik gemacht. Namen und Theorien sind kaum aufgetaucht. Peirce war der einzige der namentlich genannt wurde und sonst nur Bühler, Saussure und Keller.

Proseminar Literaturwissenschaft: Die Dozentin war eine Feministin und 90% der anwesenden Studentinnen waren auch so drauf. Im Grunde ist es darauf hinausgelaufen, dass die Leute absurde Behauptungen aufgestellt haben und man 2 Stunden lang über diese philosophiert hat ohne den Text auch nur einzubeziehen. Ich glaube manche Leute hören sich einfach nur selbst reden und nutzen so ein Seminar als Therapiesitzung.

Proseminar Sprachwissenschaft: Da die Gemeinschaft der Germanistikstudierenden etwa aus 99% Lehrämtlern besteht, wird schon einmal gerne auf Fachterminologie verzichtet, um es den armen Kindern nicht zu schwer zu machen. Im Grunde war die Aufgabe auch nur Videofilme zu gucken und zu überlegen wie die Sprache Gewalt transportiert.


Jetzt, da die Geisteswissenschaften immer mehr den Bach heruntergehen, wird endlich einmal überlegt, wie man wirksam in den Konkurrenzkampf mit den Naturwissenschaften treten kann. Hoffentlich ist das nicht schon zu spät. Allen Studieninteressierten, die wirklich wissenschaftlich arbeiten wollen, rate ich dringend davon ab Germanistik zu studieren. Für alle die ein nettes Freizeitvergnügen suchen oder ein Studium, welches ohne größere Anstrengungen zu bewältigen ist, denen rate ich zum Germanistik Studium - ihr werdet nichts sinnloseres und einfacheres finden.


Free Image Hosting at www.ImageShack.us

Wednesday, 2 April 2008

Papers

During my short academic career as a student of English and German I wrote three papers which might be of interest. Therefore I uploaded them on rapidshare and might say a word or two about these papers.


The "Kleist" paper:
This paper mainly deals with the theodicy issue in Heinrich von Kleist's Das Erbeben von Chili and the background of the theodicy discourse in the Eighteenth Century. I got a quite good mark for it.


The "Love Poetry" paper:
I uploaded it for your amusement and bewilderment. It is not a good paper and I'm not proud of it. It was my very first and got a bad mark. I'm not that kind of man who only praises his good achievements. It's about Robert Browning's Porphyria's Lover. I tried to make a more medical approach towards the poem, but got lost in meaningless phrases.


The "Norn" paper:
I'm quite proud of this paper. It took me a long and hard time to write it since there is almost no material and valid research on this language. For this paper I got a pretty good mark.

Tuesday, 18 March 2008

How to cite a blog

Citing Medicine, a great site for citing techniques, provides an excellent new method to cite posts from blogs. 30 techniques are described depending on the author and information.
I would use following method to cite from blogs, since I adapted it to the form of my other citing methods:

Author. Title. On: Publisher (ed.). Blogname. Place of publication: Date of publication. URL.

e.g. Doe, John. How to be anonymous. On: Jane Doe (ed.). CoolBlog. London: 23.04.2007. http://www.coadsy.blogspot.com/howtobeanonymous.
Secondary source: Neurophilosophy

Lost Language Lament

Alright, lets start with a post about the term paper I wrote this semester.
It's about the Scandinavian language Norn that was probably spoken between the 9th and 19th century in Scotland and its influence on modern Orcadian and Shetlandic speech. It gave me a really hard time because we don't have an idea how Norn might've looked like and the source material... sucks (although the language existed for almost a whole millenium)!
Oh, by the way, I got a 1.3 mark for this paper which is rather good on a six point scale (1 = lets make love all night long vs. 6 = no love for you, fag).