20.07.2013 Views

Notes on computational linguistics.pdf - UCLA Department of ...

Notes on computational linguistics.pdf - UCLA Department of ...

Notes on computational linguistics.pdf - UCLA Department of ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Stabler - Lx 185/209 2003<br />

who<br />

for<br />

his<br />

own<br />

amusement<br />

never<br />

The command 4% in (6) changes the space characters to newlines in persu11.wds<br />

The command 7% in (7) changes everything in the complement <strong>of</strong> A-Za-z to newlines and then squeezes<br />

repeated occurrences <strong>of</strong> newlines down to a single occurrence.<br />

(8) 9%sort -d persu11.wds > persu11.srt<br />

10%more persu11.srt<br />

A<br />

A<br />

A<br />

A<br />

A<br />

A<br />

A<br />

A<br />

A<br />

A<br />

A<br />

A<br />

A<br />

A<br />

A<br />

A<br />

A<br />

A<br />

A<br />

A<br />

A<br />

A<br />

A<br />

A<br />

About<br />

Abydos<br />

Accordingly<br />

(9) 11%tr -sc ’A-Z’ ’a-z’ ’\012’ < persu11.txt > persu11.wds<br />

tr: too many arguments<br />

Try ‘tr --help’ for more informati<strong>on</strong>.<br />

12%tr ’A-Z’ ’a-z’ < persu11.txt > persu11.low<br />

13%more persu11.wds<br />

persuasi<strong>on</strong> by jane austen<br />

chapter 1<br />

sir walter elliot, <strong>of</strong> kellynch hall, in somersetshire, was a man who,<br />

for his own amusement, never took up any book but the bar<strong>on</strong>etage;<br />

there he found occupati<strong>on</strong> for an idle hour, and c<strong>on</strong>solati<strong>on</strong> in a<br />

distressed <strong>on</strong>e; there his faculties were roused into admirati<strong>on</strong> and<br />

respect, by c<strong>on</strong>templating the limited remnant <strong>of</strong> the earliest patents;<br />

there any unwelcome sensati<strong>on</strong>s, arising from domestic affairs<br />

changed naturally into pity and c<strong>on</strong>tempt as he turned over<br />

the almost endless creati<strong>on</strong>s <strong>of</strong> the last century; and there,<br />

if every other leaf were powerless, he could read his own history<br />

with an interest which never failed. this was the page at which<br />

the favorite volume always opened:<br />

"elliot <strong>of</strong> kellynch hall.<br />

"walter elliot, born march 1, 1760, married, july 15, 1784, elizabeth,<br />

daughter <strong>of</strong> james stevens<strong>on</strong>, esq. <strong>of</strong> south park, in the county <strong>of</strong><br />

gloucester, by which lady (who died 1800) he has issue elizabeth,<br />

(10) 17%tr -sc ’A-Za-z’ ’\012’ < persu11.low > persu11.wds<br />

18%wc -l persu11.wds<br />

84125 persu11.wds<br />

19%more persu11.wds<br />

persuasi<strong>on</strong><br />

by<br />

jane<br />

austen<br />

chapter<br />

sir<br />

walter<br />

elliot<br />

<strong>of</strong><br />

kellynch<br />

hall<br />

in<br />

somersetshire<br />

was<br />

a<br />

man<br />

who<br />

for<br />

his<br />

own<br />

amusement<br />

never<br />

Why has the number <strong>of</strong> words increased from what we had in 3% <strong>of</strong> (5)? (Think about what happened<br />

119

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!