how to make google books at home

108
How to make Google Books at home

Upload: andysh

Post on 18-Nov-2014

3.749 views

Category:

Technology


6 download

DESCRIPTION

 

TRANSCRIPT

Page 1: How to make Google Books at home

How to make Google Books

at home

Page 2: How to make Google Books at home

in Perl

Page 3: How to make Google Books at home

at home

Page 4: How to make Google Books at home

not to beat Google

Page 5: How to make Google Books at home

What do we have in the internet today?

Page 6: How to make Google Books at home
Page 7: How to make Google Books at home
Page 8: How to make Google Books at home
Page 9: How to make Google Books at home

Find a word

Page 10: How to make Google Books at home

Find the words

Page 11: How to make Google Books at home

Google

Page 12: How to make Google Books at home
Page 13: How to make Google Books at home
Page 14: How to make Google Books at home

Show the page

Page 15: How to make Google Books at home

Show the pageand highlight the words

Page 16: How to make Google Books at home
Page 17: How to make Google Books at home
Page 18: How to make Google Books at home
Page 19: How to make Google Books at home
Page 20: How to make Google Books at home

... Russia ... ece yapc/coe ...

Page 21: How to make Google Books at home

... Russia ... ece yapc/coe ...

Pushkin?

Page 22: How to make Google Books at home

... Russia ... ece yapc/coe ...

YAPC?

Page 23: How to make Google Books at home

... Russia ... ece yapc/coe ...

XIX?

Page 24: How to make Google Books at home

... Russia ... ece yapc/coe ...

WTF?

Page 25: How to make Google Books at home
Page 26: How to make Google Books at home

ece yapc/coe

Page 27: How to make Google Books at home

ece yapc/coeвсе царское

Page 28: How to make Google Books at home

все царскоеece yapc/coe

Page 29: How to make Google Books at home

Amazon

Page 30: How to make Google Books at home
Page 31: How to make Google Books at home
Page 32: How to make Google Books at home

Guess the next screen

Page 33: How to make Google Books at home
Page 34: How to make Google Books at home
Page 35: How to make Google Books at home
Page 36: How to make Google Books at home

Text archive

Page 37: How to make Google Books at home
Page 38: How to make Google Books at home
Page 39: How to make Google Books at home
Page 40: How to make Google Books at home
Page 41: How to make Google Books at home

Berlin

Page 42: How to make Google Books at home
Page 43: How to make Google Books at home

How to make it

Page 44: How to make Google Books at home

PDF

Page 45: How to make Google Books at home

PDF

Page 46: How to make Google Books at home

PDF(Black box)

Page 47: How to make Google Books at home

PDF WEB

Page 48: How to make Google Books at home

Sample PDFuse.perl.org/~andy.sh/journal

Page 49: How to make Google Books at home

Work with PDF?

Page 50: How to make Google Books at home

Work with PDF?No

Page 51: How to make Google Books at home

SVG

Page 52: How to make Google Books at home

SVGScalable vector graphics

Page 53: How to make Google Books at home

SVGScalable vector graphics

http://www.w3.org/Graphics/SVG/

Page 54: How to make Google Books at home

SVG is XML

Page 55: How to make Google Books at home

SVG is XMLXML::LibXML

Page 56: How to make Google Books at home

SVG is XMLXML::LibXMLXPath

Page 57: How to make Google Books at home

SVG is XMLXML::LibXMLXPath

XSLT

Page 58: How to make Google Books at home

SVG

PDFhttp://www.pdftron.com/pdf2svg/

Page 59: How to make Google Books at home
Page 60: How to make Google Books at home

$ ./pdf2svg book.pdf book.svg

Page 61: How to make Google Books at home
Page 62: How to make Google Books at home

Structure

Page 63: How to make Google Books at home
Page 64: How to make Google Books at home
Page 65: How to make Google Books at home
Page 66: How to make Google Books at home
Page 67: How to make Google Books at home

Geometry

Page 68: How to make Google Books at home

<g></g>

Page 69: How to make Google Books at home

<g>    <g>    </g></g>

Page 70: How to make Google Books at home

<g>    <g>    </g>    <g>    </g></g>

Page 71: How to make Google Books at home

<g>    <g>        <text>        </text>    </g>    <g>    </g></g>

Page 72: How to make Google Books at home

<g>    <g>        <text>        </text>        <text>        </text>    </g>    <g>    </g></g>

Page 73: How to make Google Books at home

<g>    <g>        <text>          <tspan>          </tspan>        </text>        <text>        </text>    </g>    <g>    </g></g>

Page 74: How to make Google Books at home

<g>

Page 75: How to make Google Books at home

<text>

Page 76: How to make Google Books at home

<text    transform=...>

Page 77: How to make Google Books at home

<text    transform=    "matrix(      1 0 0 ‐1       10 584    )">

Page 78: How to make Google Books at home

Page

Page 79: How to make Google Books at home

Pageg

Page 80: How to make Google Books at home

Pageg

text

Page 81: How to make Google Books at home

Pageg

text + transform

Page 82: How to make Google Books at home
Page 83: How to make Google Books at home

<tspan>

Page 84: How to make Google Books at home

Pageg

text + transform

tspan

Page 85: How to make Google Books at home

    my $transform = $node‐>findvalue('@transform');    if ($transform =~ /matrix/) {        my ($sx, $sy, $tx, $ty) = $transform =~ /matrix\((‐?\d+(?:\.\d+)?) ‐?\d(?:\.\d+)?+ ‐?\d(?:\.\d+)?+ (‐?\d+(?:\.\d+)?) (‐?\d+(?:\.\d+)?) (‐?\d+(?:\.\d+)?)\)/;                print "($sx, $sy, $tx, $ty)";        $pos{x} = $sx * $tx;        $pos{x} += $pos{pagew} if $sx < 0;        $pos{y} = $sy * $ty;        $pos{y} += $pos{pageh} if $sy < 0;        print " [$pos{x}, $pos{y}]";    }

Page 86: How to make Google Books at home

<tspan 

x="0,16.875,26.258,34.695,4

0.314,44.533,49.224,55.789,

60.008,64.699" y="‐0" 

class="ps00 ps23">What is 

it</tspan>

Page 87: How to make Google Books at home

<tspan 

x="0,16.875,26.258,34.695,4

0.314,44.533,49.224,55.789,

60.008,64.699" y="‐0" 

class="ps00 ps23">What is 

it</tspan>

Page 88: How to make Google Books at home

<tspan 

x="0,16.875,26.258,34.695,4

0.314,44.533,49.224,55.789,

60.008,64.699" y="‐0" 

class="ps00 ps23">What is 

it</tspan>

Page 89: How to make Google Books at home

<tspan 

x="0,16.875,26.258,34.695,4

0.314,44.533,49.224,55.789,

60.008,64.699" y="‐0" 

class="ps00 ps23">What is 

it</tspan>

Page 90: How to make Google Books at home

<tspan 

x="0,16.875,26.258,34.695,4

0.314,44.533,49.224,55.789,

60.008,64.699" y="‐0" 

class="ps00 ps23">What is 

it</tspan>

Page 91: How to make Google Books at home

<tspan 

x="0,16.875,26.258,34.695,4

0.314,44.533,49.224,55.789,

60.008,64.699" y="‐0" 

class="ps00 ps23">What is 

it</tspan>

Page 92: How to make Google Books at home

<tspan 

x="0,16.875,26.258,34.695,4

0.314,44.533,49.224,55.789,

60.008,64.699" y="‐0" 

class="ps00 ps23">What is 

it</tspan>

Page 93: How to make Google Books at home

YAPC

Page 94: How to make Google Books at home

<tspan>YAPC</tspan>

Page 95: How to make Google Books at home

Y APC

Page 96: How to make Google Books at home

Y APC

Page 97: How to make Google Books at home

<tspan>Y</tspan>

<tspan>APC</tspan>

Page 98: How to make Google Books at home

Dictionary

Page 99: How to make Google Books at home

mysql> select * from base where base like 'seek';

+‐‐‐‐‐‐‐‐+‐‐‐‐‐‐+‐‐‐‐‐‐‐+‐‐‐‐‐‐‐‐‐+

| id     | base | rules | grammar |

+‐‐‐‐‐‐‐‐+‐‐‐‐‐‐+‐‐‐‐‐‐‐+‐‐‐‐‐‐‐‐‐+

| 189785 | seek | GRSZ  |         | 

+‐‐‐‐‐‐‐‐+‐‐‐‐‐‐+‐‐‐‐‐‐‐+‐‐‐‐‐‐‐‐‐+

Page 100: How to make Google Books at home

mysql> select * from word where ref = 189785;

+‐‐‐‐‐‐‐‐+‐‐‐‐‐‐‐‐‐+

| ref    | word    |

+‐‐‐‐‐‐‐‐+‐‐‐‐‐‐‐‐‐+

| 189785 | seek    | 

| 189785 | seeking | 

| 189785 | seeker  | 

| 189785 | seeks   | 

| 189785 | seekers | 

+‐‐‐‐‐‐‐‐+‐‐‐‐‐‐‐‐‐+

Page 101: How to make Google Books at home

YAPC attendee seeks where to drink after the evening talk.

Page 102: How to make Google Books at home

YAPC attendee seeks where to drink after the evening talk.

Morphology

Page 103: How to make Google Books at home

YAPC attendee seeks where to drink after the evening talk.

Stop words

Page 104: How to make Google Books at home

YAPC attendee seeks where to drink after the evening talk.

Page 105: How to make Google Books at home

yapc attendee seeks where to drink after the evening talk.

Page 106: How to make Google Books at home
Page 107: How to make Google Books at home

DEMO

live demonstration at

http://booksearch.andy.sh

Page 108: How to make Google Books at home

__END__

Andrew Shitov

http://andy.sh