What is a Literary Fingerprint?

advertisement
What is a Literary Fingerprint?

http://www.physorg.com/news179651371.html
http://iopscience.iop.org/1367-2630/11/12/123015

What are some of the issues in creating 'fingerprint'





Where else do fingerprints occur?
What is www.shazam.com
What is www.tineye.com
How do we go from sets to frequency analysis?

Toward understanding Python dictionary data type
Compsci 06/101, Fall 2010
9.1
How do you read words from file?

I exist solely as the
Canis Familiaris
'Bassett'
Compsci 06/101, Fall 2010

I ain't nothin' but a
hound-dog
9.2
Six of one and half-a-dozen …
def wordsFromFile3(filename):
file = open(filename)
words = []
for line in file:
for w in line.split():
words.append(w)
file.close()
return words
Change one line to get all
words in lowercase equivalent


See CommonWords.py
Compsci 06/101, Fall 2010
9.3
Six of one and half-a-dozen …
def wordsFromFile2(filename):
file = open(filename)
words = []
for line in file:
words.extend(line.split())
file.close()
return words
Change one line to get all
words in lowercase equivalent


See CommonWords.py
Compsci 06/101, Fall 2010
9.4
Six of one and half-a-dozen …
def wordsFromFile(filename):
file = open(filename)
words = file.read().split()
file.close()
return words
Change one line to get all words in
lowercase equivalent



See CommonWords.py
Reasoning about common words
Compsci 06/101, Fall 2010
9.5
How do we find 'common words'

Should common words be included in our literary
fingerprint?




Where do authoritative sources originate? Determinable?
How can we experiment and compare common files?
Using Python sets!
Words in one set that aren't in another?



How do we do this in Python?
How do we find words in all sets?
Is intersection an associative operation? Do we care?
Compsci 06/101, Fall 2010
9.6
Set Operations from pictures

http://en.wikipedia.org/wiki/File:Venn0111.svg
Compsci 06/101, Fall 2010
9.7
APTs for practice: great minds …

Membercheck and SimpleWordGame




Set idioms
List comprehensions
Understandable code
Why do we study more than one way to …?




Expressive power
Neuronal excitement
Creating connections
We don't have to
Compsci 06/101, Fall 2010
9.8
Download