first slides

This commit is contained in:
Michael Scholz 2013-05-19 18:44:06 +02:00
parent 55935e7b22
commit a063983767
23 changed files with 277 additions and 688 deletions

View File

@ -9,6 +9,7 @@ from sgmllib import SGMLParser
import sgmllib
from urlparse import urlparse
from urlparse import urljoin
import matplotlib.pyplot as plt
import time
from termcolor import colored
from collections import Counter
@ -28,12 +29,13 @@ TODO:
# crawler attributes
entrypoint = "http://www.ke.tu-darmstadt.de/lehre/arbeiten"
entrypoint = "http://www.spiegel.de" # german website
#entrypoint = "http://www.spiegel.de" # german website
#entrypoint = "http://www.cnn.com" # english website
#entrypoint = "http://www.red2000.com/spain/1index.html" # spanish website
#entrypoint = "https://code.google.com/p/feedparser/issues/attachmentText?id=226&aid=-1296926914212963541&name=demonstrate_issue_226.xml&token=CHtgpTsdPmWnNsvScD0yfMuBriU%3A1368702558154"
numberOfPagesToCrawl = 1000
timeBetweenSameHost = 0 # 5 sec
timeBetweenSameHost = 2 # 5 sec
visitOnlyTuSites = True;
#some variables
@ -131,6 +133,10 @@ def canonicalUrl(url):
def getNextUrlToVisit():
url = random.choice(extractor.urls)
if visitOnlyTuSites:
if 'tu-darmstadt' not in urlparse(url).netloc:
extractor.urls.remove(url)
return getNextUrlToVisit()
if url in numberHyperlink:
numberHyperlink[url] += 1
else:
@ -249,6 +255,7 @@ if __name__ == "__main__":
if i < 50:
print str(numberHyperlink[u])+"\t \t \t"+u
i += 1
## print table number hyperlinks to page ##
print "\n \n ==== numberHyperlinksPerPage ===="
@ -269,8 +276,8 @@ if __name__ == "__main__":
threshold = 0.9 # how much similar must 2 urls be to be logged
print "\n \n ==== copied content probability (>= " + str(threshold*100) + " %) ===="
print "URL1 \t URL2 \t Similarity in %"
#print "\n \n ==== copied content probability (>= " + str(threshold*100) + " %) ===="
#print "URL1 \t URL2 \t Similarity in %"
# wordcounts per page
wordCountsByPage = {}
charsByPage = {}
@ -316,8 +323,8 @@ if __name__ == "__main__":
wordCountDeltas[url1][url2] = math.fabs(float(sum(deltaWordCounts.values())) / float(sum1))
if 1 - wordCountDeltas[url1][url2] > threshold:
print url1 + " \t " + url2 + " \t " + str((1 - wordCountDeltas[url1][url2]) * 100)
#print url1 + " \t " + url2 + " \t " + str((1 - wordCountDeltas[url1][url2]) * 100)
pass
## determine the sites' languages ##
spanish = 'es'

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

View File

@ -37,70 +37,36 @@
\@writefile{nav}{\headcommand {\beamer@framepages {5}{5}}}
\@writefile{nav}{\headcommand {\slideentry {1}{0}{6}{6/6}{}{0}}}
\@writefile{nav}{\headcommand {\beamer@framepages {6}{6}}}
\@writefile{toc}{\beamer@sectionintoc {2}{2. Aufgabe}{7}{0}{2}}
\@writefile{nav}{\headcommand {\sectionentry {2}{2. Aufgabe}{7}{2. Aufgabe}{0}}}
\@writefile{nav}{\headcommand {\beamer@sectionpages {2}{6}}}
\@writefile{nav}{\headcommand {\beamer@subsectionpages {2}{6}}}
\@writefile{nav}{\headcommand {\slideentry {2}{0}{7}{7/7}{}{0}}}
\@writefile{nav}{\headcommand {\slideentry {1}{0}{7}{7/7}{}{0}}}
\@writefile{nav}{\headcommand {\beamer@framepages {7}{7}}}
\@writefile{nav}{\headcommand {\slideentry {2}{0}{8}{8/8}{}{0}}}
\@writefile{nav}{\headcommand {\slideentry {1}{0}{8}{8/8}{}{0}}}
\@writefile{nav}{\headcommand {\beamer@framepages {8}{8}}}
\@writefile{toc}{\beamer@sectionintoc {2}{2. Aufgabe}{9}{0}{2}}
\@writefile{nav}{\headcommand {\sectionentry {2}{2. Aufgabe}{9}{2. Aufgabe}{0}}}
\@writefile{nav}{\headcommand {\beamer@sectionpages {2}{8}}}
\@writefile{nav}{\headcommand {\beamer@subsectionpages {2}{8}}}
\@writefile{nav}{\headcommand {\slideentry {2}{0}{9}{9/9}{}{0}}}
\@writefile{nav}{\headcommand {\beamer@framepages {9}{9}}}
\@writefile{nav}{\headcommand {\slideentry {2}{0}{10}{10/10}{}{0}}}
\@writefile{toc}{\beamer@sectionintoc {3}{2. Aufgabe}{10}{0}{3}}
\@writefile{nav}{\headcommand {\sectionentry {3}{2. Aufgabe}{10}{2. Aufgabe}{0}}}
\@writefile{nav}{\headcommand {\beamer@sectionpages {9}{9}}}
\@writefile{nav}{\headcommand {\beamer@subsectionpages {9}{9}}}
\@writefile{nav}{\headcommand {\slideentry {3}{0}{10}{10/10}{}{0}}}
\@writefile{nav}{\headcommand {\beamer@framepages {10}{10}}}
\@writefile{nav}{\headcommand {\slideentry {2}{0}{11}{11/11}{}{0}}}
\@writefile{toc}{\beamer@sectionintoc {4}{2. Aufgabe}{11}{0}{4}}
\@writefile{nav}{\headcommand {\sectionentry {4}{2. Aufgabe}{11}{2. Aufgabe}{0}}}
\@writefile{nav}{\headcommand {\beamer@sectionpages {10}{10}}}
\@writefile{nav}{\headcommand {\beamer@subsectionpages {10}{10}}}
\@writefile{nav}{\headcommand {\slideentry {4}{0}{11}{11/11}{}{0}}}
\@writefile{nav}{\headcommand {\beamer@framepages {11}{11}}}
\@writefile{toc}{\beamer@sectionintoc {3}{3. Aufgabe}{12}{0}{3}}
\@writefile{nav}{\headcommand {\sectionentry {3}{3. Aufgabe}{12}{3. Aufgabe}{0}}}
\@writefile{nav}{\headcommand {\beamer@sectionpages {7}{11}}}
\@writefile{nav}{\headcommand {\beamer@subsectionpages {7}{11}}}
\@writefile{nav}{\headcommand {\slideentry {3}{0}{12}{12/12}{}{0}}}
\@writefile{nav}{\headcommand {\slideentry {4}{0}{12}{12/12}{}{0}}}
\@writefile{nav}{\headcommand {\beamer@framepages {12}{12}}}
\@writefile{nav}{\headcommand {\slideentry {3}{0}{13}{13/13}{}{0}}}
\@writefile{nav}{\headcommand {\slideentry {4}{0}{13}{13/13}{}{0}}}
\@writefile{nav}{\headcommand {\beamer@framepages {13}{13}}}
\@writefile{nav}{\headcommand {\slideentry {3}{0}{14}{14/14}{}{0}}}
\@writefile{nav}{\headcommand {\slideentry {4}{0}{14}{14/14}{}{0}}}
\@writefile{nav}{\headcommand {\beamer@framepages {14}{14}}}
\@writefile{nav}{\headcommand {\slideentry {3}{0}{15}{15/15}{}{0}}}
\@writefile{nav}{\headcommand {\beamer@framepages {15}{15}}}
\@writefile{nav}{\headcommand {\slideentry {3}{0}{16}{16/16}{}{0}}}
\@writefile{nav}{\headcommand {\beamer@framepages {16}{16}}}
\@writefile{nav}{\headcommand {\slideentry {3}{0}{17}{17/17}{}{0}}}
\@writefile{nav}{\headcommand {\beamer@framepages {17}{17}}}
\@writefile{nav}{\headcommand {\slideentry {3}{0}{18}{18/18}{}{0}}}
\@writefile{nav}{\headcommand {\beamer@framepages {18}{18}}}
\@writefile{nav}{\headcommand {\slideentry {3}{0}{19}{19/19}{}{0}}}
\@writefile{nav}{\headcommand {\beamer@framepages {19}{19}}}
\@writefile{nav}{\headcommand {\slideentry {3}{0}{20}{20/20}{}{0}}}
\@writefile{nav}{\headcommand {\beamer@framepages {20}{20}}}
\@writefile{nav}{\headcommand {\slideentry {3}{0}{21}{21/21}{}{0}}}
\@writefile{nav}{\headcommand {\beamer@framepages {21}{21}}}
\@writefile{nav}{\headcommand {\slideentry {3}{0}{22}{22/22}{}{0}}}
\@writefile{nav}{\headcommand {\beamer@framepages {22}{22}}}
\@writefile{nav}{\headcommand {\slideentry {3}{0}{23}{23/23}{}{0}}}
\@writefile{nav}{\headcommand {\beamer@framepages {23}{23}}}
\@writefile{nav}{\headcommand {\slideentry {3}{0}{24}{24/24}{}{0}}}
\@writefile{nav}{\headcommand {\beamer@framepages {24}{24}}}
\@writefile{nav}{\headcommand {\slideentry {3}{0}{25}{25/25}{}{0}}}
\@writefile{nav}{\headcommand {\beamer@framepages {25}{25}}}
\@writefile{nav}{\headcommand {\slideentry {3}{0}{26}{26/26}{}{0}}}
\@writefile{nav}{\headcommand {\beamer@framepages {26}{26}}}
\@writefile{nav}{\headcommand {\slideentry {3}{0}{27}{27/27}{}{0}}}
\@writefile{nav}{\headcommand {\beamer@framepages {27}{27}}}
\@writefile{toc}{\beamer@sectionintoc {4}{5. Aufgabe}{28}{0}{4}}
\@writefile{nav}{\headcommand {\sectionentry {4}{5. Aufgabe}{28}{5. Aufgabe}{0}}}
\@writefile{nav}{\headcommand {\beamer@sectionpages {12}{27}}}
\@writefile{nav}{\headcommand {\beamer@subsectionpages {12}{27}}}
\@writefile{nav}{\headcommand {\slideentry {4}{0}{28}{28/28}{}{0}}}
\@writefile{nav}{\headcommand {\beamer@framepages {28}{28}}}
\@writefile{nav}{\headcommand {\slideentry {4}{0}{29}{29/29}{}{0}}}
\@writefile{nav}{\headcommand {\beamer@framepages {29}{29}}}
\@writefile{nav}{\headcommand {\slideentry {4}{0}{30}{30/30}{}{0}}}
\@writefile{nav}{\headcommand {\beamer@framepages {30}{30}}}
\@writefile{nav}{\headcommand {\slideentry {4}{0}{31}{31/31}{}{0}}}
\@writefile{nav}{\headcommand {\beamer@framepages {31}{31}}}
\@writefile{nav}{\headcommand {\beamer@partpages {1}{31}}}
\@writefile{nav}{\headcommand {\beamer@subsectionpages {28}{31}}}
\@writefile{nav}{\headcommand {\beamer@sectionpages {28}{31}}}
\@writefile{nav}{\headcommand {\beamer@documentpages {31}}}
\@writefile{nav}{\headcommand {\def \inserttotalframenumber {31}}}
\@writefile{nav}{\headcommand {\beamer@partpages {1}{14}}}
\@writefile{nav}{\headcommand {\beamer@subsectionpages {11}{14}}}
\@writefile{nav}{\headcommand {\beamer@sectionpages {11}{14}}}
\@writefile{nav}{\headcommand {\beamer@documentpages {14}}}
\@writefile{nav}{\headcommand {\def \inserttotalframenumber {14}}}

View File

@ -1,4 +1,4 @@
This is pdfTeX, Version 3.1415926-2.3-1.40.12 (TeX Live 2011) (format=pdflatex 2011.7.3) 5 MAY 2013 15:48
This is pdfTeX, Version 3.1415926-2.3-1.40.12 (TeX Live 2011) (format=pdflatex 2011.7.3) 19 MAY 2013 18:14
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
@ -1258,28 +1258,28 @@ File: ts1enc.dfu 2008/04/05 v1.1m UTF-8 support for inputenc
(./solution.aux)
\openout1 = `solution.aux'.
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 16.
LaTeX Font Info: ... okay on input line 16.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 16.
LaTeX Font Info: ... okay on input line 16.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 16.
LaTeX Font Info: ... okay on input line 16.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 16.
LaTeX Font Info: ... okay on input line 16.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 16.
LaTeX Font Info: ... okay on input line 16.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 16.
LaTeX Font Info: ... okay on input line 16.
LaTeX Font Info: Checking defaults for PD1/pdf/m/n on input line 16.
LaTeX Font Info: ... okay on input line 16.
LaTeX Font Info: Checking defaults for TS1/cmr/m/n on input line 16.
LaTeX Font Info: ... okay on input line 16.
LaTeX Font Info: Try loading font information for T1+phv on input line 16.
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 17.
LaTeX Font Info: ... okay on input line 17.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 17.
LaTeX Font Info: ... okay on input line 17.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 17.
LaTeX Font Info: ... okay on input line 17.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 17.
LaTeX Font Info: ... okay on input line 17.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 17.
LaTeX Font Info: ... okay on input line 17.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 17.
LaTeX Font Info: ... okay on input line 17.
LaTeX Font Info: Checking defaults for PD1/pdf/m/n on input line 17.
LaTeX Font Info: ... okay on input line 17.
LaTeX Font Info: Checking defaults for TS1/cmr/m/n on input line 17.
LaTeX Font Info: ... okay on input line 17.
LaTeX Font Info: Try loading font information for T1+phv on input line 17.
(/usr/local/texlive/2011/texmf-dist/tex/latex/psnfss/t1phv.fd
File: t1phv.fd 2001/06/04 scalable font definitions for T1/phv.
)
LaTeX Font Info: Font shape `T1/phv/m/n' will be
(Font) scaled to size 9.40002pt on input line 16.
(Font) scaled to size 9.40002pt on input line 17.
*geometry* driver: auto-detecting
*geometry* detected driver: pdftex
*geometry* verbose mode - [ preamble ] result:
@ -1344,7 +1344,7 @@ e
))
ABD: EveryShipout initializing macros
\AtBeginShipoutBox=\box60
Package hyperref Info: Link coloring OFF on input line 16.
Package hyperref Info: Link coloring OFF on input line 17.
(/usr/local/texlive/2011/texmf-dist/tex/latex/hyperref/nameref.sty
Package: nameref 2010/04/30 v2.40 Cross-referencing by name of section
@ -1354,9 +1354,9 @@ Package: gettitlestring 2010/12/03 v1.4 Cleanup title references (HO)
)
\c@section@level=\count163
)
LaTeX Info: Redefining \ref on input line 16.
LaTeX Info: Redefining \pageref on input line 16.
LaTeX Info: Redefining \nameref on input line 16.
LaTeX Info: Redefining \ref on input line 17.
LaTeX Info: Redefining \pageref on input line 17.
LaTeX Info: Redefining \nameref on input line 17.
(./solution.out) (./solution.out)
\@outlinefile=\write6
@ -1389,48 +1389,48 @@ Dictionary: translator-theorem-dictionary, Language: English
)
(./solution.nav)
LaTeX Font Info: Font shape `T1/phv/m/n' will be
(Font) scaled to size 4.70001pt on input line 16.
(Font) scaled to size 4.70001pt on input line 17.
Underfull \hbox (badness 10000) in paragraph at lines 16--16
Underfull \hbox (badness 10000) in paragraph at lines 17--17
[]
LaTeX Font Info: Try loading font information for OT1+phv on input line 16.
LaTeX Font Info: Try loading font information for OT1+phv on input line 17.
(/usr/local/texlive/2011/texmf-dist/tex/latex/psnfss/ot1phv.fd
File: ot1phv.fd 2001/06/04 scalable font definitions for OT1/phv.
)
LaTeX Font Info: Font shape `OT1/phv/m/n' will be
(Font) scaled to size 4.70001pt on input line 16.
LaTeX Font Info: Try loading font information for U+msa on input line 16.
(Font) scaled to size 4.70001pt on input line 17.
LaTeX Font Info: Try loading font information for U+msa on input line 17.
(/usr/local/texlive/2011/texmf-dist/tex/latex/amsfonts/umsa.fd
File: umsa.fd 2009/06/22 v3.00 AMS symbols A
)
LaTeX Font Info: Try loading font information for U+msb on input line 16.
LaTeX Font Info: Try loading font information for U+msb on input line 17.
(/usr/local/texlive/2011/texmf-dist/tex/latex/amsfonts/umsb.fd
File: umsb.fd 2009/06/22 v3.00 AMS symbols B
)
LaTeX Font Info: Font shape `OT1/phv/m/sl' will be
(Font) scaled to size 4.70001pt on input line 16.
(Font) scaled to size 4.70001pt on input line 17.
LaTeX Font Info: Font shape `T1/phv/bx/n' in size <10> not available
(Font) Font shape `T1/phv/b/n' tried instead on input line 25.
(Font) Font shape `T1/phv/b/n' tried instead on input line 26.
LaTeX Font Info: Font shape `T1/phv/b/n' will be
(Font) scaled to size 9.40002pt on input line 25.
(Font) scaled to size 9.40002pt on input line 26.
LaTeX Font Info: Font shape `T1/phv/m/n' will be
(Font) scaled to size 6.58002pt on input line 25.
(Font) scaled to size 6.58002pt on input line 26.
LaTeX Font Info: Font shape `OT1/phv/m/n' will be
(Font) scaled to size 6.58002pt on input line 25.
(Font) scaled to size 6.58002pt on input line 26.
LaTeX Font Info: Font shape `OT1/phv/m/sl' will be
(Font) scaled to size 6.58002pt on input line 25.
(Font) scaled to size 6.58002pt on input line 26.
LaTeX Font Info: Font shape `T1/phv/m/n' will be
(Font) scaled to size 11.28003pt on input line 25.
(Font) scaled to size 11.28003pt on input line 26.
LaTeX Font Info: Font shape `T1/phv/bx/n' in size <12> not available
(Font) Font shape `T1/phv/b/n' tried instead on input line 25.
(Font) Font shape `T1/phv/b/n' tried instead on input line 26.
LaTeX Font Info: Font shape `T1/phv/b/n' will be
(Font) scaled to size 11.28003pt on input line 25.
(Font) scaled to size 11.28003pt on input line 26.
LaTeX Font Info: Font shape `T1/phv/m/n' will be
(Font) scaled to size 3.76001pt on input line 25.
(Font) scaled to size 3.76001pt on input line 26.
Underfull \hbox (badness 10000) has occurred while \output is active
@ -1440,34 +1440,61 @@ Underfull \hbox (badness 10000) has occurred while \output is active
{/Users/Michael/Library/texlive/2011/texmf-var/fonts/map/pdftex/updmap/pdftex.m
ap} </Users/Michael/Library/texmf/tex/latex/tuddesign/logo/tud_logo.pdf>]
LaTeX Font Info: Font shape `OT1/phv/m/n' will be
(Font) scaled to size 9.40002pt on input line 39.
LaTeX Font Info: Font shape `OT1/phv/m/sl' will be
(Font) scaled to size 9.40002pt on input line 39.
LaTeX Font Info: Font shape `T1/phv/m/it' in size <10> not available
(Font) Font shape `T1/phv/m/sl' tried instead on input line 39.
LaTeX Font Info: Font shape `T1/phv/m/sl' will be
(Font) scaled to size 9.40002pt on input line 39.
Underfull \hbox (badness 10000) has occurred while \output is active
[]
[2
]
] <grafiken/a1_abb1.png, id=47, 330.23375pt x 531.9875pt>
File: grafiken/a1_abb1.png Graphic file (type png)
<use grafiken/a1_abb1.png>
Package pdftex.def Info: grafiken/a1_abb1.png used on input line 48.
(pdftex.def) Requested size: 97.14096pt x 156.49014pt.
LaTeX Font Info: Font shape `T1/phv/m/n' will be
(Font) scaled to size 8.46002pt on input line 48.
Overfull \vbox (22.25151pt too high) detected at line 48
[]
Underfull \hbox (badness 10000) has occurred while \output is active
[]
[3
]
<./grafiken/a1_abb1.png>]
Underfull \hbox (badness 10000) has occurred while \output is active
[]
[4
]
] <grafiken/a1_abb2.png, id=58, 614.295pt x 131.49126pt>
File: grafiken/a1_abb2.png Graphic file (type png)
<use grafiken/a1_abb2.png>
Package pdftex.def Info: grafiken/a1_abb2.png used on input line 66.
(pdftex.def) Requested size: 341.43454pt x 113.8166pt.
Underfull \hbox (badness 10000) has occurred while \output is active
[]
[5
]
<./grafiken/a1_abb2.png>]
Underfull \hbox (badness 10000) has occurred while \output is active
[]
@ -1482,10 +1509,12 @@ Underfull \hbox (badness 10000) has occurred while \output is active
[7
]
LaTeX Font Info: Font shape `T1/phv/m/it' in size <10> not available
(Font) Font shape `T1/phv/m/sl' tried instead on input line 106.
LaTeX Font Info: Font shape `T1/phv/m/sl' will be
(Font) scaled to size 9.40002pt on input line 106.
LaTeX Font Info: Font shape `T1/phv/bx/it' in size <10> not available
(Font) Font shape `T1/phv/b/it' tried instead on input line 113.
LaTeX Font Info: Font shape `T1/phv/b/it' in size <10> not available
(Font) Font shape `T1/phv/b/sl' tried instead on input line 113.
LaTeX Font Info: Font shape `T1/phv/b/sl' will be
(Font) scaled to size 9.40002pt on input line 113.
Underfull \hbox (badness 10000) has occurred while \output is active
@ -1493,44 +1522,21 @@ Underfull \hbox (badness 10000) has occurred while \output is active
[8
] <grafiken/a2_abb1.png, id=77, 340.27126pt x 473.77pt>
File: grafiken/a2_abb1.png Graphic file (type png)
<use grafiken/a2_abb1.png>
Package pdftex.def Info: grafiken/a2_abb1.png used on input line 114.
(pdftex.def) Requested size: 112.39369pt x 156.49014pt.
LaTeX Font Info: Font shape `T1/phv/m/n' will be
(Font) scaled to size 8.46002pt on input line 114.
Overfull \vbox (22.25151pt too high) detected at line 114
[]
]
Underfull \hbox (badness 10000) has occurred while \output is active
[]
[9
<./grafiken/a2_abb1.png>]
<grafiken/a2_abb2.png, id=83, 359.3425pt x 471.7625pt>
File: grafiken/a2_abb2.png Graphic file (type png)
<use grafiken/a2_abb2.png>
Package pdftex.def Info: grafiken/a2_abb2.png used on input line 122.
(pdftex.def) Requested size: 119.1975pt x 156.49014pt.
Overfull \vbox (22.25151pt too high) detected at line 122
[]
]
Underfull \hbox (badness 10000) has occurred while \output is active
[]
[10
<./grafiken/a2_abb2.png>]
]
Underfull \hbox (badness 10000) has occurred while \output is active
[]
@ -1544,233 +1550,20 @@ Underfull \hbox (badness 10000) has occurred while \output is active
[12
] <grafiken/a3_abb3.png, id=99, 553.06625pt x 408.52625pt>
File: grafiken/a3_abb3.png Graphic file (type png)
<use grafiken/a3_abb3.png>
Package pdftex.def Info: grafiken/a3_abb3.png used on input line 153.
(pdftex.def) Requested size: 211.85518pt x 156.49014pt.
Overfull \vbox (22.25151pt too high) detected at line 153
[]
]
Underfull \hbox (badness 10000) has occurred while \output is active
[]
[13
<./grafiken/a3_abb3.png>]
]
Underfull \hbox (badness 10000) has occurred while \output is active
[]
[14
] <grafiken/a3_abb4.png, id=111, 408.52625pt x 313.17pt>
File: grafiken/a3_abb4.png Graphic file (type png)
<use grafiken/a3_abb4.png>
Package pdftex.def Info: grafiken/a3_abb4.png used on input line 172.
(pdftex.def) Requested size: 204.14418pt x 156.49014pt.
Overfull \vbox (22.25151pt too high) detected at line 172
[]
Underfull \hbox (badness 10000) has occurred while \output is active
[]
[15
<./grafiken/a3_abb4.png>]
Underfull \hbox (badness 10000) has occurred while \output is active
[]
[16
] <grafiken/a3_abb5.png, id=122, 547.04375pt x 402.50375pt>
File: grafiken/a3_abb5.png Graphic file (type png)
<use grafiken/a3_abb5.png>
Package pdftex.def Info: grafiken/a3_abb5.png used on input line 191.
(pdftex.def) Requested size: 212.68677pt x 156.49014pt.
Overfull \vbox (22.25151pt too high) detected at line 191
[]
Underfull \hbox (badness 10000) has occurred while \output is active
[]
[17
<./grafiken/a3_abb5.png>]
<grafiken/a3_abb6.png, id=128, 532.99126pt x 405.515pt>
File: grafiken/a3_abb6.png Graphic file (type png)
<use grafiken/a3_abb6.png>
Package pdftex.def Info: grafiken/a3_abb6.png used on input line 200.
(pdftex.def) Requested size: 205.68617pt x 156.49014pt.
Overfull \vbox (22.25151pt too high) detected at line 200
[]
Underfull \hbox (badness 10000) has occurred while \output is active
[]
[18
<./grafiken/a3_abb6.png>]
Underfull \hbox (badness 10000) has occurred while \output is active
[]
[19
]
Underfull \hbox (badness 10000) has occurred while \output is active
[]
[20
] <grafiken/a4_abb7.png, id=145, 342.27875pt x 169.63374pt>
File: grafiken/a4_abb7.png Graphic file (type png)
<use grafiken/a4_abb7.png>
Package pdftex.def Info: grafiken/a4_abb7.png used on input line 224.
(pdftex.def) Requested size: 315.77245pt x 156.49014pt.
Overfull \vbox (22.25151pt too high) detected at line 224
[]
Underfull \hbox (badness 10000) has occurred while \output is active
[]
[21
<./grafiken/a4_abb7.png>]
<grafiken/a4_abb8.png, id=151, 339.2675pt x 177.66376pt>
File: grafiken/a4_abb8.png Graphic file (type png)
<use grafiken/a4_abb8.png>
Package pdftex.def Info: grafiken/a4_abb8.png used on input line 233.
(pdftex.def) Requested size: 298.84103pt x 156.49014pt.
Overfull \vbox (22.25151pt too high) detected at line 233
[]
Underfull \hbox (badness 10000) has occurred while \output is active
[]
[22
<./grafiken/a4_abb8.png>]
Underfull \hbox (badness 10000) has occurred while \output is active
[]
[23
] <grafiken/a4_abb9.png, id=163, 342.27875pt x 172.645pt>
File: grafiken/a4_abb9.png Graphic file (type png)
<use grafiken/a4_abb9.png>
Package pdftex.def Info: grafiken/a4_abb9.png used on input line 248.
(pdftex.def) Requested size: 310.25723pt x 156.49014pt.
Overfull \vbox (22.25151pt too high) detected at line 248
[]
Underfull \hbox (badness 10000) has occurred while \output is active
[]
[24
<./grafiken/a4_abb9.png>]
<grafiken/a4_abb10.png, id=169, 522.95375pt x 400.49625pt>
File: grafiken/a4_abb10.png Graphic file (type png)
<use grafiken/a4_abb10.png>
Package pdftex.def Info: grafiken/a4_abb10.png used on input line 257.
(pdftex.def) Requested size: 204.34213pt x 156.49014pt.
Overfull \vbox (22.25151pt too high) detected at line 257
[]
Underfull \hbox (badness 10000) has occurred while \output is active
[]
[25
<./grafiken/a4_abb10.png>]
<grafiken/a4_abb11.png, id=176, 526.96875pt x 403.5075pt>
File: grafiken/a4_abb11.png Graphic file (type png)
<use grafiken/a4_abb11.png>
Package pdftex.def Info: grafiken/a4_abb11.png used on input line 266.
(pdftex.def) Requested size: 204.36713pt x 156.49014pt.
Overfull \vbox (22.25151pt too high) detected at line 266
[]
Underfull \hbox (badness 10000) has occurred while \output is active
[]
[26
<./grafiken/a4_abb11.png>]
Underfull \hbox (badness 10000) has occurred while \output is active
[]
[27
]
Underfull \hbox (badness 10000) has occurred while \output is active
[]
[28
]
Underfull \hbox (badness 10000) has occurred while \output is active
[]
[29
]
Underfull \hbox (badness 10000) has occurred while \output is active
[]
[30
]
Underfull \hbox (badness 10000) has occurred while \output is active
[]
[31
]
\tf@nav=\write7
\openout7 = `solution.nav'.
@ -1781,32 +1574,37 @@ Underfull \hbox (badness 10000) has occurred while \output is active
\tf@snm=\write9
\openout9 = `solution.snm'.
Package atveryend Info: Empty hook `BeforeClearDocument' on input line 320.
Package atveryend Info: Empty hook `AfterLastShipout' on input line 320.
Package atveryend Info: Empty hook `BeforeClearDocument' on input line 172.
Package atveryend Info: Empty hook `AfterLastShipout' on input line 172.
(./solution.aux)
Package atveryend Info: Empty hook `AtVeryEndDocument' on input line 320.
Package atveryend Info: Executing hook `AtEndAfterFileList' on input line 320.
Package atveryend Info: Empty hook `AtVeryEndDocument' on input line 172.
Package atveryend Info: Executing hook `AtEndAfterFileList' on input line 172.
Package rerunfilecheck Info: File `solution.out' has not changed.
(rerunfilecheck) Checksum: E60A32C6B19F5DE93CFCFDED9C213C9E;180.
Package atveryend Info: Empty hook `AtVeryVeryEnd' on input line 320.
(rerunfilecheck) Checksum: 88D911AA5795ABD0722131B6C5D24A75;180.
Package atveryend Info: Empty hook `AtVeryVeryEnd' on input line 172.
)
Here is how much of TeX's memory you used:
17310 strings out of 493633
316255 string characters out of 3143378
390807 words of memory out of 3000000
20070 multiletter control sequences out of 15000+200000
31501 words of font info for 43 fonts, out of 3000000 for 9000
17220 strings out of 493633
315045 string characters out of 3143378
391807 words of memory out of 3000000
20016 multiletter control sequences out of 15000+200000
39628 words of font info for 52 fonts, out of 3000000 for 9000
831 hyphenation exceptions out of 8191
55i,20n,79p,695b,533s stack positions out of 5000i,500n,10000p,200000b,50000s
55i,20n,79p,425b,533s stack positions out of 5000i,500n,10000p,200000b,50000s
{/usr/local/texlive/2011/texmf-dist/fonts/enc/dvips/base/8r.enc}</usr/local/t
exlive/2011/texmf-dist/fonts/type1/public/amsfonts/symbols/msam7.pfb></usr/loca
l/texlive/2011/texmf-dist/fonts/type1/urw/helvetic/uhvb8a.pfb></usr/local/texli
ve/2011/texmf-dist/fonts/type1/urw/helvetic/uhvr8a.pfb></usr/local/texlive/2011
/texmf-dist/fonts/type1/urw/helvetic/uhvro8a.pfb>
Output written on solution.pdf (31 pages, 347073 bytes).
exlive/2011/texmf-dist/fonts/type1/public/amsfonts/cmextra/cmex7.pfb></usr/loca
l/texlive/2011/texmf-dist/fonts/type1/public/amsfonts/cm/cmsy10.pfb></usr/local
/texlive/2011/texmf-dist/fonts/type1/public/amsfonts/cm/cmsy5.pfb></usr/local/t
exlive/2011/texmf-dist/fonts/type1/public/amsfonts/cm/cmsy7.pfb></usr/local/tex
live/2011/texmf-dist/fonts/type1/public/amsfonts/symbols/msam7.pfb></usr/local/
texlive/2011/texmf-dist/fonts/type1/urw/helvetic/uhvb8a.pfb></usr/local/texlive
/2011/texmf-dist/fonts/type1/urw/helvetic/uhvbo8a.pfb></usr/local/texlive/2011/
texmf-dist/fonts/type1/urw/helvetic/uhvr8a.pfb></usr/local/texlive/2011/texmf-d
ist/fonts/type1/urw/helvetic/uhvro8a.pfb>
Output written on solution.pdf (14 pages, 146011 bytes).
PDF statistics:
241 PDF objects out of 1000 (max. 8388607)
186 compressed objects within 2 object streams
67 named destinations out of 1000 (max. 500000)
125 words of extra memory for PDF output out of 10000 (max. 10000000)
156 PDF objects out of 1000 (max. 8388607)
122 compressed objects within 2 object streams
33 named destinations out of 1000 (max. 500000)
80 words of extra memory for PDF output out of 10000 (max. 10000000)

View File

@ -14,67 +14,33 @@
\headcommand {\beamer@framepages {5}{5}}
\headcommand {\slideentry {1}{0}{6}{6/6}{}{0}}
\headcommand {\beamer@framepages {6}{6}}
\headcommand {\sectionentry {2}{2. Aufgabe}{7}{2. Aufgabe}{0}}
\headcommand {\beamer@sectionpages {2}{6}}
\headcommand {\beamer@subsectionpages {2}{6}}
\headcommand {\slideentry {2}{0}{7}{7/7}{}{0}}
\headcommand {\slideentry {1}{0}{7}{7/7}{}{0}}
\headcommand {\beamer@framepages {7}{7}}
\headcommand {\slideentry {2}{0}{8}{8/8}{}{0}}
\headcommand {\slideentry {1}{0}{8}{8/8}{}{0}}
\headcommand {\beamer@framepages {8}{8}}
\headcommand {\sectionentry {2}{2. Aufgabe}{9}{2. Aufgabe}{0}}
\headcommand {\beamer@sectionpages {2}{8}}
\headcommand {\beamer@subsectionpages {2}{8}}
\headcommand {\slideentry {2}{0}{9}{9/9}{}{0}}
\headcommand {\beamer@framepages {9}{9}}
\headcommand {\slideentry {2}{0}{10}{10/10}{}{0}}
\headcommand {\sectionentry {3}{2. Aufgabe}{10}{2. Aufgabe}{0}}
\headcommand {\beamer@sectionpages {9}{9}}
\headcommand {\beamer@subsectionpages {9}{9}}
\headcommand {\slideentry {3}{0}{10}{10/10}{}{0}}
\headcommand {\beamer@framepages {10}{10}}
\headcommand {\slideentry {2}{0}{11}{11/11}{}{0}}
\headcommand {\sectionentry {4}{2. Aufgabe}{11}{2. Aufgabe}{0}}
\headcommand {\beamer@sectionpages {10}{10}}
\headcommand {\beamer@subsectionpages {10}{10}}
\headcommand {\slideentry {4}{0}{11}{11/11}{}{0}}
\headcommand {\beamer@framepages {11}{11}}
\headcommand {\sectionentry {3}{3. Aufgabe}{12}{3. Aufgabe}{0}}
\headcommand {\beamer@sectionpages {7}{11}}
\headcommand {\beamer@subsectionpages {7}{11}}
\headcommand {\slideentry {3}{0}{12}{12/12}{}{0}}
\headcommand {\slideentry {4}{0}{12}{12/12}{}{0}}
\headcommand {\beamer@framepages {12}{12}}
\headcommand {\slideentry {3}{0}{13}{13/13}{}{0}}
\headcommand {\slideentry {4}{0}{13}{13/13}{}{0}}
\headcommand {\beamer@framepages {13}{13}}
\headcommand {\slideentry {3}{0}{14}{14/14}{}{0}}
\headcommand {\slideentry {4}{0}{14}{14/14}{}{0}}
\headcommand {\beamer@framepages {14}{14}}
\headcommand {\slideentry {3}{0}{15}{15/15}{}{0}}
\headcommand {\beamer@framepages {15}{15}}
\headcommand {\slideentry {3}{0}{16}{16/16}{}{0}}
\headcommand {\beamer@framepages {16}{16}}
\headcommand {\slideentry {3}{0}{17}{17/17}{}{0}}
\headcommand {\beamer@framepages {17}{17}}
\headcommand {\slideentry {3}{0}{18}{18/18}{}{0}}
\headcommand {\beamer@framepages {18}{18}}
\headcommand {\slideentry {3}{0}{19}{19/19}{}{0}}
\headcommand {\beamer@framepages {19}{19}}
\headcommand {\slideentry {3}{0}{20}{20/20}{}{0}}
\headcommand {\beamer@framepages {20}{20}}
\headcommand {\slideentry {3}{0}{21}{21/21}{}{0}}
\headcommand {\beamer@framepages {21}{21}}
\headcommand {\slideentry {3}{0}{22}{22/22}{}{0}}
\headcommand {\beamer@framepages {22}{22}}
\headcommand {\slideentry {3}{0}{23}{23/23}{}{0}}
\headcommand {\beamer@framepages {23}{23}}
\headcommand {\slideentry {3}{0}{24}{24/24}{}{0}}
\headcommand {\beamer@framepages {24}{24}}
\headcommand {\slideentry {3}{0}{25}{25/25}{}{0}}
\headcommand {\beamer@framepages {25}{25}}
\headcommand {\slideentry {3}{0}{26}{26/26}{}{0}}
\headcommand {\beamer@framepages {26}{26}}
\headcommand {\slideentry {3}{0}{27}{27/27}{}{0}}
\headcommand {\beamer@framepages {27}{27}}
\headcommand {\sectionentry {4}{5. Aufgabe}{28}{5. Aufgabe}{0}}
\headcommand {\beamer@sectionpages {12}{27}}
\headcommand {\beamer@subsectionpages {12}{27}}
\headcommand {\slideentry {4}{0}{28}{28/28}{}{0}}
\headcommand {\beamer@framepages {28}{28}}
\headcommand {\slideentry {4}{0}{29}{29/29}{}{0}}
\headcommand {\beamer@framepages {29}{29}}
\headcommand {\slideentry {4}{0}{30}{30/30}{}{0}}
\headcommand {\beamer@framepages {30}{30}}
\headcommand {\slideentry {4}{0}{31}{31/31}{}{0}}
\headcommand {\beamer@framepages {31}{31}}
\headcommand {\beamer@partpages {1}{31}}
\headcommand {\beamer@subsectionpages {28}{31}}
\headcommand {\beamer@sectionpages {28}{31}}
\headcommand {\beamer@documentpages {31}}
\headcommand {\def \inserttotalframenumber {31}}
\headcommand {\beamer@partpages {1}{14}}
\headcommand {\beamer@subsectionpages {11}{14}}
\headcommand {\beamer@sectionpages {11}{14}}
\headcommand {\beamer@documentpages {14}}
\headcommand {\def \inserttotalframenumber {14}}

View File

@ -1,4 +1,4 @@
\BOOKMARK [2][]{Outline0.1}{1. Aufgabe}{}% 1
\BOOKMARK [2][]{Outline0.2}{2. Aufgabe}{}% 2
\BOOKMARK [2][]{Outline0.3}{3. Aufgabe}{}% 3
\BOOKMARK [2][]{Outline0.4}{5. Aufgabe}{}% 4
\BOOKMARK [2][]{Outline0.3}{2. Aufgabe}{}% 3
\BOOKMARK [2][]{Outline0.4}{2. Aufgabe}{}% 4

View File

@ -1,6 +1,7 @@
\documentclass[colorback,accentcolor=tud1b]{tudbeamer}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage{amssymb}
\title{1 "Ubung}
\author{Ulf Gebhardt, Victor-Philipp Negoescu, Michael Scholz}
@ -28,291 +29,142 @@
% % % % % % % % % % % % % % % % % % % % % % %% % % % % % % % % % % % % % % % % % % % % % %% % % % % % % % % % % % % % % % % % % % % % % %
\section{1. Aufgabe}
\begin{frame}
\frametitle{1. Aufgabe \\ Aufgabenstellung}
"Uberlegen Sie sich eine neuartige, originelle Web Mining Anwendung, die mit Text-Klassifikationsverfahren gel"ost werden k"onnte. Skizzieren Sie eine m"ogliche Umsetzung (Sammlung der Trainingsdaten, Klassifikation der Trainingsdaten, Einsatz des gelernten Klassifikators in der Praxis). (2 Punkte)
\frametitle{1. Aufgabe \\ Firefox-Plugin}
\textbf{Datengrundlage:}
\begin{itemize}
\item Auftrittswahrscheinlichkeiten $p_{expected}(l, lang)$ wurden aus Wikipedia-Artikel (http://en.wikipedia.org/wiki/Letter\_frequency) extrahiert und nomiert.
\item \textit{l} Buchstaben A-Z ohne Umlaute
\item \textit{lang} Sprachen Englisch, Deutsch, Spanisch ($lang \in \{en, de, es\}$)
\end{itemize}
\end{frame}
\begin{frame}
\frametitle{1. Aufgabe \\ L"osung}
Textbasiertes Klassifikationsverfahren für gecrawlte Produktrezensionen. \\
Einteilung in die Klassen:
\begin{itemize}
\item \textbf{Positiv:} \\
Rezension lobt das Produkt
\item \textbf{Neutral:} \\
Die Rezension besitzt keine eindeutige Tendenz
\item \textbf{Negativ:} \\
Die Rezension kritisiert das Produkt
\end{itemize}
\frametitle{1. Aufgabe \\ Firefox-Plugin}
\begin{figure}
\noindent\includegraphics[height=5.5cm,keepaspectratio]{grafiken/a1_abb1.png}
\caption{Buchstaben zu Auftrittswahrscheinlichkeiten (spanisch, nicht normiert)}
\end{figure}
\end{frame}
\begin{frame}
\frametitle{1. Aufgabe \\ L"osung}
\textbf{Sammlung von Trainingsdaten:}
\frametitle{1. Aufgabe \\ Firefox-Plugin}
\begin{itemize}
\item Produktrezensionen enthalten meist Bewertung von 1 (sehr negativ) bis 5 (sehr positiv)
\item Zudem enthalten sie eine ausf"uhrliche Beschreibung
\item Trainingsdaten k"onnen automatisch durch einen Crawler gesammelt werden.
\item Crawler durchl"auft die DOM-Struktur oder verwendet API-Schnittstelle (falls vorhanden)
\item Für Spanisch nicht genügend Textmaterial um Wahrscheinlichkeitsverteilung über Buchstabenpaare zu erstellen.
\item Zudem wäre die vollständige Menge an Buchstabenpaaren für alle drei Sprachen sehr groß.
\end{itemize}
Ergebnis: \\
Zuordnung von Bewertungen (1-5) zu Rezension (Text)
$\to$ Nutzung geordneter Listen der jeweils zwanzig häufigsten Buchstabenpaare von http://www.m-i-b.com.ar/letters/en/ extrahiert haben.
\end{frame}
\begin{frame}
\frametitle{1. Aufgabe \\ L"osung}
\textbf{Klassifikation der Trainingsdaten:} \\
Zuweisung von Bewertung zu definierter Klasse:
\begin{itemize}
\item Bewertung \{1, 1.5, 2\}: Negativ
\item Bewertung \{2.5, 3, 3.5\}: Neutral
\item Bewertung \{4, 4.5, 5\}: Positiv
\end{itemize}
Gesammelte Trainingsdaten k"onnten nun entsprechend dieser Zuweisung in die passende Klasse eingeordnet werden.
\frametitle{1. Aufgabe \\ Firefox-Plugin}
\begin{figure}
\noindent\includegraphics[height=4cm,width = 12cm]{grafiken/a1_abb2.png}
\caption{Auflistung der zwanzig häufigsten Buchstabenpaare}
\end{figure}
\end{frame}
\begin{frame}
\frametitle{1. Aufgabe \\ L"osung}
\textbf{Einsatz des gelernten Klassifikators in der Praxis:}
\frametitle{1. Aufgabe \\ Firefox-Plugin}
\textbf{Vorgehensweise:}
\begin{itemize}
\item Unbekannte Texte, welche durch einen Vorverarbeitungsschritt als passend zu einem gegebenen Produkt erkannt wurden, k"onnen in die definierten drei Klassen eingeteilt werden.
\item Diese Methode k"onnte die Bewertung der "Offentlichkeit eines bestimmtes Produktes oder einer Marke quantitativ beschreiben, obwohl keine explizite quantitative Bewertung vorgenommen wurde.
\item Für Annäherung der Auftrittswahrscheinlichkeiten von Buchstabenpaaren verwenden wir die Formel der Zipf-Verteilung (http://de.wikipedia.org/wiki/Zipfsches\_Gesetz). \\
\begin{center}
$p_{expected(lp, lang) \approx \frac{1}{i * ln(1,78 * N)}}$
\end{center}
\item $N = 26^2$ entspricht Anzahl aller möglichen Buchstabenpaaren
\item \textit{i} Arrayindex von \textit{letterPairByLanguage[lang]}
\end{itemize}
\end{frame}
\begin{frame}
\frametitle{1. Aufgabe \\ Firefox-Plugin}
\begin{itemize}
\item Häufigkeiten der Buchstaben bzw. Buchstabenpaare ($n_{text(l)}$) relativ zur Gesamtanzahl ($n_{text}$): \\
\begin{center}
$\tilde{p}_{text}(l) = \frac{n_{text}(l)}{n_{text}}$
\end{center}
\item Absolute quadratische Abweichung zur erwarteten Auftrittswahrscheinlichkeit berechnen und für die jeweilige Sprache aufaddieren und den Mittelwert berechnen.
\item Resultat ist die mittlere quadratische Abweichung der erwarteten zu beobachteten Auftrittswahrscheinlichkeit: \\
\begin{center}
$MSE(lang) = \frac{\sum_{l}(\tilde{p}_{text}(l) - p_{expected(lp, lang)})^2}{n_{text}}$
\end{center}
\item Wähle Sprache mit der kleinsten mittleren Abweichung.
\end{itemize}
\end{frame}
\begin{frame}
\frametitle{1. Aufgabe \\ Firefox-Plugin}
\textbf{Ergebnisse aus \textit{challenge.txt}:} \\
\begin{center}
01 $\to$ es \\
02 $\to$ de \\
03 $\to$ en \\
04 $\to$ en \\
05 $\to$ de \\
06 $\to$ es \\
07 $\to$ es \\
08 $\to$ de \\
09 $\to$ en \\
10 $\to$ es \\
\end{center}
\end{frame}
% % % % % % % % % % % % % % % % % % % % % % % 2. Aufgabe % % % % % % % % % % % % % % % % % % % % % %% % % % % % % % % % % % % % % % % %
% % % % % % % % % % % % % % % % % % % % % % %% % % % % % % % % % % % % % % % % % % % % % %% % % % % % % % % % % % % % % % % % % % % % % %
\section{2. Aufgabe}
\begin{frame}
\frametitle{2. Aufgabe \\ Aufgabenstellung}
Schreiben Sie ein einfaches Programm, das eine sortierte Liste der in einem Text vorkommenden Worte (im weitesten Sinn alles was durch Leerzeichen begrenzt wird) mit den assoziierten H"aufigkeiten (absolut und prozentual) erstellt und sortiert ausgibt. (2 Punkte)
\frametitle{2. Aufgabe \\ Crawler}
\textbf{Verfahren zur Erkennung von Duplikaten:} \\
\textbf{1.} Alle Wörter mit einer Länge von 4 und kleiner 11 werden von der Webseite extrahiert.
\begin{itemize}
\item Vergleichen Sie die 30 am h"aufigsten vorkommenden Worte in zwei oder mehreren l"angeren Texten der gleichen Sprache (z.B. E-books, Projekt Gutenberg, etc.). Sind diese Worte als Merkmale f"ur Text-Klassifizierungs-Aufgaben geeignet? Warum?
\item Modifizieren Sie Ihr Programm dahingehend, dass es eine Liste von Stoppw"ortern erhalten kann, die ignoriert werden. Wiederholen Sie die vorherige Aufgabe, indem Sie jedoch diesmal die Stoppw"orter der jeweiligen Sprache ignorieren. Wie w"urden Sie nun die Eignung der 30 h"aufigisten W"orter einsch"atzen?
\item Wörter mit weniger als 4 Zeichen kommen häufig vor
\item Unter diesen Wörtern sind unter anderem auch die Stoppwörter
\item Lange Wörter mit mehr als 10 Zeichen sind oft versteckter Text oder falsch geparster Text, der nicht in die Btrachtung einfließen muss
\end{itemize}
\end{frame}
\section{2. Aufgabe}
\begin{frame}
\frametitle{2. Aufgabe \\ Crawler}
\textbf{2.} Eine Zuweisung von Wörtern zu deren Auftrittshäufigkeit wird angefertigt \\
\textbf{3.} Für alle paarweise verschiedenen Seiten werden die Auftrittshäufigkeiten subtrahiert, so dass deren Ergebnis minimal null ergibt. Zudem werden alle Wörter, die auf einer, aber nicht auf der anderen Seite vorkommen, ebenfalls der anderen Seite zugewiesen
\begin{itemize}
\item Wörter, die auf der einen Seite, nicht aber auf der anderen Seite vorkommen, werden übernommen, da sonst Seiten mit extrem wenig Text schnell fälschlicherweise als Kopie erkannt werden, da die Wahrscheinlichkeit, dass eine andere Seite diese wenigen Wörter abdeckt, sehr groß ist.
\end{itemize}
\end{frame}
\section{2. Aufgabe}
\begin{frame}
\frametitle{2. Aufgabe \\ Crawler}
\textbf{4.} Anschließend wird die resultierende Gesamtzahl an Wortvorkommnissen durch die Anzahl der Wortvorkommnisse vor der Subtraktion geteilt. Fällt dieser Wert unter eine definierte Grenze, gilt die Seite als Duplikat. \\
\begin{itemize}
\item Im Code ist anstatt einer Untergrenze eine Obergrenze von 90\% angegeben, die Berechnung wurde also umgekehrt, so dass hohe Werte eine hohe Duplikatswahrscheinlichkeit implizieren.
\end{itemize}
\end{frame}
\begin{frame}
\frametitle{2. Aufgabe \\ L"osung}
Untersuchte Texte:
\frametitle{2. Aufgabe \\ Crawler}
Histogramm über die Anzahl der URLs pro Seite (wie beim ersten Übungsblatt mit Worthäufigkeiten, auch logarithmisch)
\end{frame}
\begin{frame}
\frametitle{2. Aufgabe \\ Crawler}
Histogramm mit den Häufigkeiten des Auftretens von Hyperlinks, d.h. wie viele Links treten 1-mal, 2-mal, ... auftreten ...
\end{frame}
\begin{frame}
\frametitle{2. Aufgabe \\ Crawler}
\textbf{Erfahrungen und Probleme:}
\begin{itemize}
\item {[}1{]} William Lewins. \textit{A Histroy of Banks for Saving in Great Britain and Ireland} (http://www.gutenberg.org/ebooks/42583)
\item {[}2{]} Amanda Minnie Douglas. \textit{A Little Girl in Old San Francisco} (http://www.gutenberg.org/ebooks/42582)
\item {[}3{]} James Curl. \textit{Expository Writing by Mervin} (http://www.gutenberg.org/ebooks/42580)
\item {[}4{]} Goswin Uphues.\textit{ Einf"uhrung in die moderne Logik. Erster Teil} (http://www.gutenberg.org/ebooks/24172)
\end{itemize}
\end{frame}
\begin{frame}
\frametitle{2. Aufgabe \\ L"osung}
\begin{figure}
\noindent\includegraphics[height=5.5cm,keepaspectratio]{grafiken/a2_abb1.png}
\caption{Auflistung der 30 h"aufigsten W"orter (Texte {[}1{]} {[}2{]} {[}3{]})}
\end{figure}
\end{frame}
\begin{frame}
\frametitle{2. Aufgabe \\ L"osung}
\begin{figure}
\noindent\includegraphics[height=5.5cm,keepaspectratio]{grafiken/a2_abb2.png}
\caption{Auflistung der 30 h"aufigsten W"orter ohne Stoppw"orter (Texte {[}1{]} {[}2{]} {[}3{]})}
\end{figure}
\end{frame}
\begin{frame}
\frametitle{2. Aufgabe \\ L"osung}
\begin{itemize}
\item Liste der 30 h"aufigsten W"orter besteht fast ausschließlich aus Stoppw"ortern
\item Somit eignet sich die Liste der Stoppw"orter f"ur eine Spracherkennung
\item Nach Entfernung der Stoppw"orter bleiben noch einige generisch verwendete W"orter (\al banks\grqq, \al savings\grqq) "ubrig mit welchen man die Dom"ane der untersuchten Texte erkennen kann.
\end{itemize}
\end{frame}
% % % % % % % % % % % % % % % % % % % % % % % 3. Aufgabe % % % % % % % % % % % % % % % % % % % % % %% % % % % % % % % % % % % % % % % %
% % % % % % % % % % % % % % % % % % % % % % %% % % % % % % % % % % % % % % % % % % % % % %% % % % % % % % % % % % % % % % % % % % % % % %
\section{3. Aufgabe}
\begin{frame}
\frametitle{3. Aufgabe \\ Aufgabenstellung}
Die Auftrittswahrscheinlichkeiten von Worten in Texten folgen einer sogenannten Zipf-Verteilung, d.h. einer Verteilung, die doppelt logarithmisch ist. "Uberpr"ufen Sie das anhand der gew"ahlten Texte. (2 Punkte)
\begin{itemize}
\item Plotten Sie die H"aufigkeiten (y-Achse) "uber den Rang (X-Achse), also die Anzahl der Vorkommnisse des h"aufigsten Wortes zuerst, dann die Anzahl des zweith"aufigsten Wortes, etc. Betrachten Sie sowohl eine absolute als auch eine logarithmische Skalierung beider Achsen. Was k"onnen Sie beobachten?
\item Bestimmen Sie die Anzahl der Worte, die mit einer gegebenen H"aufigkeit vrkommen (also, wie viele W"orter gibt es, die mit H"aufigkeit 1 vorkommen, wie viele mit H"aufigkeit 2, etc.). Produzieren Sie "ahnliche Grafiken (Anzahl der Worte mit einer gewissen H"aufigkeit "uber die H"aufigkeit) und interpretieren Sie diese.
\end{itemize}
\end{frame}
\begin{frame}
\frametitle{3. Aufgabe \\ L"osung}
\begin{figure}
\noindent\includegraphics[height=5.5cm,keepaspectratio]{grafiken/a3_abb3.png}
\caption{Absolute Worth"aufigkeit (y) "uber Wortrang (x), beide Achsen linear}
\end{figure}
\end{frame}
\begin{frame}
\frametitle{3. Aufgabe \\ L"osung}
\begin{itemize}
\item Auftrittswahrscheinlichkeit der W"orter nimmt zu schnell ab
\item Somit keine annehmbare Visualisierung mit linearer Achsenskalierung m"oglich
\item Y-Werte sammeln sich nahe dem Nullpunkt und konvergieren schon sehr fr"uh gegen null
\end{itemize}
\end{frame}
\begin{frame}
\frametitle{3. Aufgabe \\ L"osung}
\begin{figure}
\noindent\includegraphics[height=5.5cm,keepaspectratio]{grafiken/a3_abb4.png}
\caption{Abs. Worth"aufigkeit (y) "uber Wortrang (x), beide Achsen logarithmisch}
\end{figure}
\end{frame}
\begin{frame}
\frametitle{3. Aufgabe \\ L"osung}
\begin{itemize}
\item Durch logarithmische Skalierung beider Achsen ergibt sich eine ann"ahernd linear fallende Kurve der Auftrittswahrscheinlichkeiten
\item Dies ist typisch f"ur die Zipf-Verteilung
\item Es entspricht einem stark negativen exponentiellen Wachstum der Y-Werte
\end{itemize}
\end{frame}
\begin{frame}
\frametitle{3. Aufgabe \\ L"osung}
\begin{figure}
\noindent\includegraphics[height=5.5cm,keepaspectratio]{grafiken/a3_abb5.png}
\caption{Anzahl der W"orter mit einer bestimmten Frequenz, Achsen linear}
\end{figure}
\end{frame}
\begin{frame}
\frametitle{3. Aufgabe \\ L"osung}
\begin{figure}
\noindent\includegraphics[height=5.5cm,keepaspectratio]{grafiken/a3_abb6.png}
\caption{Anzahl der W"orter mit einer bestimmten Frequenz, Achsen logarithmisch}
\end{figure}
\end{frame}
\begin{frame}
\frametitle{3. Aufgabe \\ L"osung}
F"ur die Anzahl der W"orter, die sich eine bestimmte Auftrittswahrscheinlichkeit teilen ergibt sich ein "ahnliches Bild wie zuvor gesehen. Je seltener ein Wort gebraucht wird (x -> 0), desto (exponentiell-)gr"oßer ist die Wahrscheinlichkeit, dass ein anderes Wort genauso oft vorkommt.
\end{frame}
% % % % % % % % % % % % % % % % % % % % % % % 4. Aufgabe % % % % % % % % % % % % % % % % % % % % % %% % % % % % % % % % % % % % % % % %
% % % % % % % % % % % % % % % % % % % % % % %% % % % % % % % % % % % % % % % % % % % % % %% % % % % % % % % % % % % % % % % % % % % % % %
\begin{frame}
\frametitle{4. Aufgabe \\ Aufgabenstellung}
Modifizieren Sie das Programm, so dass es nicht Worte sondern Buchstaben und Buchstabenpaare z"ahlt. Vergleichen Sie deren H"aufigkeitsverteilung sowohl zweier in der gleichen Sprache verfassten Texte als auch zweier in verschiedenen Sprachen abgefasster Texte. (2 Punkte)
\end{frame}
\begin{frame}
\frametitle{4. Aufgabe \\ L"osung}
\begin{figure}
\noindent\includegraphics[height=5.5cm,keepaspectratio]{grafiken/a4_abb7.png}
\caption{10 h"aufigsten Buchstaben und -paare (Text {[}1{], englischer Text)}}
\end{figure}
\end{frame}
\begin{frame}
\frametitle{4. Aufgabe \\ L"osung}
\begin{figure}
\noindent\includegraphics[height=5.5cm,keepaspectratio]{grafiken/a4_abb8.png}
\caption{10 h"aufigsten Buchstaben und -paare (Text {[}2{], englischer Text)}}
\end{figure}
\end{frame}
\begin{frame}
\frametitle{4. Aufgabe \\ L"osung}
Die beiden vorherigen Abbildungen zeigen, dass sich f"ur englischsprachige Texte "ahnliche Verteilungen der Buchstaben und Buchstabenpaare ergeben. Dies "andert sich bei der Analyse eines deutschen Textes (nachfolgende Folie).
\end{frame}
\begin{frame}
\frametitle{4. Aufgabe \\ L"osung}
\begin{figure}
\noindent\includegraphics[height=5.5cm,keepaspectratio]{grafiken/a4_abb9.png}
\caption{10 h"aufigsten Buchstaben und -paare (Text {[}4{], deutscher Text)}}
\end{figure}
\end{frame}
\begin{frame}
\frametitle{4. Aufgabe \\ L"osung}
\begin{figure}
\noindent\includegraphics[height=5.5cm,keepaspectratio]{grafiken/a4_abb10.png}
\caption{Abs. Buchstabenh"aufigkeiten (y) "uber Rang (x), Achsen logarithmisch (Text {[}1{])}}
\end{figure}
\end{frame}
\begin{frame}
\frametitle{4. Aufgabe \\ L"osung}
\begin{figure}
\noindent\includegraphics[height=5.5cm,keepaspectratio]{grafiken/a4_abb11.png}
\caption{Abs. Buchstabenh"aufigkeiten (y) "uber Rang (x), Achsen logarithmisch (Text {[}4{])}}
\end{figure}
\end{frame}
\begin{frame}
\frametitle{4. Aufgabe \\ L"osung}
Aus den vorherigen Betrachtungen wurde deutlich, dass die h"aufigsten Buchstaben sich in verschiedenen Sprachen (hier: englisch und deutsch) unterscheiden. Betrachtet man nun die Verteilung des Verlaufs der Auftrittswahrscheinlichkeiten, ergibt sich daf"ur sowohl im englischen als auch im deutschen Text erneut die Zipf-Verteilung.
\end{frame}
% % % % % % % % % % % % % % % % % % % % % % % 5. Aufgabe % % % % % % % % % % % % % % % % % % % % % %% % % % % % % % % % % % % % % % % %
% % % % % % % % % % % % % % % % % % % % % % %% % % % % % % % % % % % % % % % % % % % % % %% % % % % % % % % % % % % % % % % % % % % % % %
\section{5. Aufgabe}
\begin{frame}
\frametitle{5. Aufgabe \\ Aufgabenstellung}
Laden Sie sich unser kleiner Firefox-Plugin herunter und machen Sie dich damit und den Entwicklungstools vertraut. Weiter unten finden Sie Hinweise zur Verwendung. Erweitern Sie die Funktion \textit{student(text)} in der Datei \textit{lib/student.js} dahingehend, dass es drei Sprachen erkennen kann. Die Liste der bisher unterst"utzten Sprachen k"onnen Sie gernen in \textit{languages.js} nach Belieben erweitern. Verwenden Sie f"ur die Spracherkennung eine einfache Heuristik, die z.B. auf den in der vorherigen Aufgabe vorgestellen Stoppw"ortern basiert. Browsen Sie dann ein wenig im Wem herum und berichten uns von Ihren Ergebnissen und Erfahrungen mit dem Plugin. (1 Punkt)
\end{frame}
\begin{frame}
\frametitle{5. Aufgabe \\ L"osung}
Anpassungen in \textit{utility.js}:
\begin{itemize}
\item Erstelle Funktionen \textit{getDeStopwords()\{...\}}, \textit{getEnStopwords()\{...\}} und \textit{getFrStopwords()\{...\}}, welche die dazugeh"origen Stoppw"orter in Form eines Arrays zur"uckgeben
\item Erstelle Funktion \textit{arrayContains(array, element)\{...\}}, welche pr"uft ob sich das gegebene Element im gegebenen Array befindet
\end{itemize}
\end{frame}
\begin{frame}
\frametitle{5. Aufgabe \\ L"osung}
Anpassungen in \textit{student.js}:
\begin{itemize}
\item Zerlege Text in Tokens
\item Erstelle Variablen zum Z"ahlen der deutschen, englischen und franz"osischen W"orter im Text.
\item Pr"ufe nun jedes Token ob es in den sprachspezifischen Stoppw"ortern vorkommt. Ist dies der Fall -> erh"ohe die dazuge"ohrige Variable um 1. \\
Nutze hierf"ur die zuvor in \textit{utility.js} definierten Funktionen.
\item Gebe die Sprache zur"uck deren Z"ahlvariable den h"ochsten Wert hat.
\end{itemize}
\end{frame}
\begin{frame}
\frametitle{5. Aufgabe \\ L"osung}
Ergebnisse:
\begin{itemize}
\item Einfache \al Z"ahlheuristik\ar funktioniert zuverl"assig
\item Alle besuchten Webseiten wurden richtig erkannt
\item Bug im Addon? \\
Nutzt man im Browser mehrere Tabs, so zeigt das Addon beim Wechsel des Tabs immer die Sprache der zuletzt geladenen Webseite an.
\item Findet man einen Onlineshop, so wird die Queue mit sehr vielen Links dieses Shops gefüllt und der Crawler besucht mit sehr hoher Wahrscheinlichkeit nur noch URLs innerhalb des Shops.
\item Dies ist auch oft bei Seiten mit vielen Subdomains der Fall.
\item Es werden viele Links auf URLs gefunden, die nicht mehr existieren.
\end{itemize}
\end{frame}

View File

@ -1,6 +1,6 @@
\beamer@endinputifotherversion {3.12pt}
\select@language {ngerman}
\beamer@sectionintoc {1}{1. Aufgabe}{2}{0}{1}
\beamer@sectionintoc {2}{2. Aufgabe}{7}{0}{2}
\beamer@sectionintoc {3}{3. Aufgabe}{12}{0}{3}
\beamer@sectionintoc {4}{5. Aufgabe}{28}{0}{4}
\beamer@sectionintoc {2}{2. Aufgabe}{9}{0}{2}
\beamer@sectionintoc {3}{2. Aufgabe}{10}{0}{3}
\beamer@sectionintoc {4}{2. Aufgabe}{11}{0}{4}